Pre loader

Tag: zoom

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

4 votes
25k views

How do I implement zooming in real time charts. The examples are all static data, and the zooming works, and a couple of links I found, do not explain it very well.

How can I accomplish zooming on a real time SciChart?

  • darlon asked 10 years ago
  • last active 6 years ago
1 vote
15k views

Hi,
I am trying to implement pan and zoom functionalities for real time charts present in Sci chart demo application
Can any one please suggest me on how to implement the same

Thanks in advance

0 votes
15k views

Hi,

I have medical data displaying every 1s with Date as XAxis and ml/hr as YAxis. I want to control the display to let say, 6hr window in the current display by default whereas zoom-in can go to precisely 1hr and not below that and zoom-out reset to 6hr. How can I achieve this?

FYI, my data retention is for 72hrs.

BR,
Praween K.

1 vote
14k views

How do I implement mouse wheel zooming so that the point under the mouse pointer (before zoom), will also be under the mouse pointer after the zoom?
The chart is a 2D chart with DateTime X axis and multiple value Y axes.

0 votes
14k views

Good day, everybody!
I’ve got a problem. I’m working with inherited class from LineAnnotation- MarkerLineAnnotation. I’ve added some fields to the class. When I set X1=0 and X2=100000, displayed the element on SciChartSurface, I tried to zoom in. But after a few zooms my MarkerLineAnnotations had disappeared.
After that situation I set X1=0 and X2=10000 and tried to zoom in. I could zoom in my custom annotations for a long time, but they had disappeared too.

How can I solve this problem?
I’ve attached screenshots describing this problem. (Image 1-normal size for line with X1=0 and X2=10000 , Image 2-zoom, when disappearing took place for line with X1=0 and X2=10000; Image 3-normal size for line with X1=0 and X2=100000 , Image 4-zoom, when disappearing took place for line with X1=0 and X2=10000)
Thanks in advance.

  • Egor asked 9 years ago
  • last active 9 years ago
0 votes
14k views

Hello,

I am currently using a rollover modifier to display tooltip values on the trend. Whenever a data point is clicked however, the trend stretches so this point is along the right hand axis, and it pans so this point is along the x-axis. Is there a way to disable this feature?

Here are my modifier declarations:

<SciChart:SciChartSurface.ChartModifier>
            <SciChart:ModifierGroup>
                <SciChart:RubberBandXyZoomModifier  IsXAxisOnly="False"/>
                <SciChart:XAxisDragModifier/>
                <SciChart:CursorModifier ShowAxisLabels="False"/>
                <SciChart:RolloverModifier ReceiveHandledEvents="False" ShowTooltipOn="Always" ShowAxisLabels="True" UseInterpolation="True" SnapsToDevicePixels="False" TooltipLabelTemplate="{StaticResource RolloverLabelTemplate}"/>
            </SciChart:ModifierGroup>
        </SciChart:SciChartSurface.ChartModifier>

Thanks,
Andrew

0 votes
13k views

Hello.

Thank you for creating great chart library.
I’m now using a trial version for test that is enable to use at project that I’m concerned.

I have one problem that when I set zoom function to chart, and zoomed too much, axis label disappears.
(I used mouse scroll zoom, I attached zoom before image and after image)

How can I control this problem?
Is there any properties or setting for this?

0 votes
13k views

I have an unfinished project using the trial version on Visblox. I did not buy the licence since the performance was not good enough. Now Visiblox stopped support and so I am migrating to SciCharts. I have some questions though hope you can help.

  1. The chart is DateTime,Double type, and there are multiply datapoints on some dates. When editing I need to delete particular points but the Remove method seems to remove all Y values for specific X value. So is it possible to remove a particular X,Y datapoint only from the chart?

  2. I need to give each datapoint a name and I was using TextAnnotations on Visiblox (which had a datapoint property). However on SCIcharts the TextAnnotations does not have Datapoint property. How can I do this please?

  3. I have 2 charts showing audio waveforms. One showing the full time and one showing a zoomed section. When I hit Play I need the zoomed chart to follow the music waveform. With Visiblox I was using a dispatcher timer and on every tick(20ms) I update the Xaxis range, however the performance was not very good.
    What best method to use for SCI charts please?

0 votes
12k views

Hi;

I have a problem with the zoom on stock chart.
If i have 2,3,4… windows opened with stock chart on each, and if I zoom on one an window, the zoom works on all window.
But I want to zoom only on selected chart.

How can I fix it please?

0 votes
12k views

We are transitioning from using oxyplot to sci-chart for the increased performance it offers.

In oxyplot you are able to configure the plot to allow you to click and drag on an axis to zoom only that axis.

I have found RubberBandXyZoomModifier, and can see how it can be set up to only zoom the x or y axis, but cant see any way to allow zooming a specific x or y axis when the click and drag occurs on that axis.

Before I dive into the modifiers API and start to figure out how to do this from scratch, am I missing something, or do you have any pointers on how to achieve this functionality as I believe it is a pretty common use case.

  • Hugoagogo asked 7 years ago
  • last active 7 years ago
0 votes
12k views

I have DateAxis as X Axis, so I want to trigger a button to zoom In/Out to a specific time at the latest plotted point (Price).
Example: I have zoom button 30 minutes, 15 minutes, 5 minutes and 2 minutes….

0 votes
12k views

How to scale axes with different scale factor using pinch zoom?
For example, scale x axis only or scale x axis greater then y axis.

0 votes
11k views

I followed this post http://support.scichart.com/index.php?/Knowledgebase/Article/View/17244/39/tutorial—custom-legend-with-color-picker-and-custom-point-markers for creating a custom Chart Legend and it worked great. One feature of it that I really liked was the checkbox behavior: CheckedChangeZoomExtentsBehaviour.EnableZoomExtentsOnChecked=”True” which zooms the chart to extents everytime you show or hide a series.

This checkbox behavior breaks when I move the Legend outside of the chart, which I accomplished by following this post: https://www.scichart.com/questions/question/moving-legend-outside-sci-chart-plots

How can I keep this checkbox behavior when moving the Legend outside of the Chart area?

Note: if I set ShowLegend=”True” in my s:LegendModifie> tag, the behavior properly works with the legend outside the Chart area, but now I have duplicate legends both inside and outside my chart area with this setting set.

<!-- LEGEND_ITEM_TEMPLATE -->
<DataTemplate x:Key="LegendItemTemplate" DataType="s:SeriesInfo">
            <!-- DataContext is of type SeriesInfo -->
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <!-- Visibility checkbox, bound to SeriesInfo.RenderableSeries.IsVisible -->
                <CheckBox Margin="5,0,0,0"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    behaviors:CheckedChangeZoomExtentsBehaviour.EnableZoomExtentsOnChecked="True"
                    Foreground="{StaticResource LegendTextBrush}"
                    IsChecked="{Binding RenderableSeries.IsVisible, Mode=TwoWay}"
                    Visibility="{Binding LegendData.ShowVisibilityCheckboxes, RelativeSource={RelativeSource AncestorType=s:SciChartLegend}, Converter={StaticResource BooleanToVisibilityConverter}}" />

                <s:PointMarker Grid.Column="1" Margin="5,0,0,0" Width="40" Height="10" VerticalAlignment="Center" HorizontalAlignment="Center"
                    DataContext="{Binding RenderableSeries}"
                    DeferredContent="{Binding LegendMarkerTemplate}"
                    Visibility="{Binding ShowSeriesMarkers, RelativeSource={RelativeSource AncestorType=s:SciChartLegend}, Converter={StaticResource BooleanToVisibilityConverter}}" />

                <!-- Series Name, bound to SeriesInfo.SeriesName -->
                <TextBlock Margin="5,0,5,0"
            Grid.Column="2"
            HorizontalAlignment="Left"
            Foreground="{StaticResource LegendTextBrush}"
            Text="{Binding SeriesName}" />
            </Grid>
        </DataTemplate>

<!-- LEGEND MODIFIER -->
    <s:LegendModifier x:Name="ChartLegend" ShowLegend="True" GetLegendDataFor="AllSeries" LegendItemTemplate="{StaticResource LegendItemTemplate}" ShowVisibilityCheckboxes="True"   />

<!-- MY LEGEND CONTROL ELSEWHERE ON THE PAGE -->
<s:SciChartLegend x:Name="legendControl" DockPanel.Dock="Top"
                                       Orientation="Horizontal" Margin="10"


                                       ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                       ScrollViewer.VerticalScrollBarVisibility="Auto"
                                       LegendData="{Binding LegendData, ElementName=ChartLegend, Mode=OneWay}"
                                       ShowVisibilityCheckboxes="True" />           
0 votes
11k views

I’m trying to properly display a circle series as a circle. I’ve made sure the graph is not resizable, and set the GridLinesPanelStyle to ensure that it’s square. However, when do ZoomExtents on the ViewPortManager, it always adds a little buffer space on the Y axis but not the X so you end up with an ellipse. Is there any way to set and/or remove this buffer? You can see this in the image, the graph itself is square and the range on the X axis is 300, but on Y it’s a little bit bigger so what you see isn’t really a circle. Thank you.

  • AE Admin asked 7 years ago
  • last active 7 years ago
0 votes
10k views

I manually re-calculate my displayed axis ranges when new data points are appended or when a specific portion of the data is selected to view from a ListBox, but I would like to leave the axis ranges as-is if the user has zoomed-in (using the built-in ZoomModifiers). Is there a way for my ViewModel to know this has happened so I can avoid recalculating in that case?

Thanks!

0 votes
10k views

Hi!
I have the following xaml code for HorizontalLineAnnotations. I have a viewmodel with simple properties for WasteMaxValue etc.
I don’t get any binding errors. Sometimes everything works as expected when I start up. Sometimes the lines show up but they wont follow when I resize the view (and the graph). Sometimes the lines don’t show up at all.
If I do a very fast “pan” with the mouse so that the graph data moves outside the graph, the lines show up and they follow when I resize the view and the graph. Have you experienced this before? Is it an obvious error?

            <s:SciChartSurface.Annotations>
                <s:HorizontalLineAnnotation HorizontalAlignment="Stretch" 
                    Y1="{Binding WasteMaxValue}" Stroke="Red" StrokeThickness="2">
                </s:HorizontalLineAnnotation>
                <s:HorizontalLineAnnotation HorizontalAlignment="Stretch" 
                    Y1="{Binding WasteMinValue}" Stroke="Red" StrokeThickness="2">
                </s:HorizontalLineAnnotation>
                <s:HorizontalLineAnnotation HorizontalAlignment="Stretch" 
                    Y1="{Binding WarningMaxValue}" Stroke="Yellow" StrokeThickness="2">
                </s:HorizontalLineAnnotation>
                <s:HorizontalLineAnnotation HorizontalAlignment="Stretch" 
                    Y1="{Binding WarningMinValue}" Stroke="Yellow" StrokeThickness="2">
                </s:HorizontalLineAnnotation>
                <s:HorizontalLineAnnotation HorizontalAlignment="Stretch" 
                    Y1="{Binding SetValue}" Stroke="Green" StrokeThickness="2">
                </s:HorizontalLineAnnotation>
        </s:SciChartSurface.Annotations>
0 votes
10k views

I am trying to call the ZoomBy() method of SciChart control from ViewModel. The ZoomBy() is easily available in the xaml.cs file like below:

// TODO: Need to implement zoom using MVVM
    private void BtnZoomIn_Click(object sender, RoutedEventArgs e)
    {
        TemperatureGraph.ChartModifier.XAxis.ZoomBy(-0.1, -0.1);
    }

The same functionality I need to implement using the ViewModel pattern.

However the ZoomExtents method is easily being called using ViewportManager of SciChart control. E.g. below: XAML file

<RocheButton Name="BtnZoomOut" DockPanel.Dock="Top" Icon="{IconResource Icon=ZoomOut}" HorizontalAlignment="Right" Command="{Binding ZoomOutCommand}" />    
<s:SciChartSurface x:Name="TemperatureGraph" Grid.Column="0" s:ThemeManager.Theme="BrightSpark"  
                           RenderableSeries="{s:SeriesBinding TemperatureGraphViewModel}" DockPanel.Dock="Bottom"
                           ViewportManager="{Binding ViewportManager}">

And the ViewModel Code:

public class TemperatureSummaryGraphViewModel : ViewModelBase
    {
        #region Private Members

        private IXyDataSeries<TimeSpan, double> TemperatureDataSeries = new XyDataSeries<TimeSpan, double>();
        private IXyDataSeries<TimeSpan, double> AcquisitionPointDataSeries = new XyDataSeries<TimeSpan, double>();
        private DefaultViewportManager _viewportManager = new DefaultViewportManager();
        private ICommand _zoomOutCommand;

        #endregion

        #region Constructor

        public TemperatureSummaryGraphViewModel()
        {
            ZoomOutCommand = new DelegateCommand(() => ZoomOutTemperatureGrpah());
            GenerateDummySeries();

            TemperatureGraphViewModel.Add(new LineRenderableSeriesViewModel()
            {
                DataSeries = TemperatureDataSeries,
                StyleKey = "LineSeriesStyle0"
            });

            TemperatureGraphViewModel.Add(new XyScatterRenderableSeriesViewModel()
            {
                DataSeries = AcquisitionPointDataSeries,
                StyleKey = "ScatterSeriesStyle0"
            });
        }

        #endregion

        #region Public Properties

        public ObservableCollection<IRenderableSeriesViewModel> TemperatureGraphViewModel { get; } = new ObservableCollection<IRenderableSeriesViewModel>();

        public IViewportManager ViewportManager
        {
            get
            {
                return _viewportManager;
            }

            set
            {
                if (ReferenceEquals(value, _viewportManager))
                {
                    return;
                }

                _viewportManager = (DefaultViewportManager)value;
                OnPropertyChanged("ViewportManager");
            }
        }

        public ICommand ZoomOutCommand
        {
            get
            {
                return _zoomOutCommand;
            }

            set
            {
                if (ReferenceEquals(value, _zoomOutCommand))
                {
                    return;
                }

                _zoomOutCommand = value;
                OnPropertyChanged(nameof(ZoomOutCommand));
            }
        }

        #endregion

        #region Public Methods

        /// <summary>
        /// To generate dummy data
        /// // TODO: Need to integrate it with RunEditor with the actual data
        /// </summary>
        public void GenerateDummySeries()
        {
            double y = 80.5, yVar = 30.0;

            TemperatureDataSeries.Append(TimeSpan.FromMinutes(1), 40.0);
            TemperatureDataSeries.Append(TimeSpan.FromMinutes(2), 80.5);
            for (int x = 2; x < 50; x++)
            {
                TemperatureDataSeries.Append(TimeSpan.FromMinutes(x), y);

                yVar *= -1;
                y += yVar;
            }

            for (var i = 5.4; i < 50; i += 2)
            {
                AcquisitionPointDataSeries.Append(TimeSpan.FromMinutes(i), 60.0);
            }
        }

        public void ZoomOutTemperatureGrpah()
        {
            _viewportManager.ZoomExtents();
        }

        #endregion
    }
}

This code is working fine and zooming out the scichart control to 100%.

I want to implement the same using the ZoomBy().

Please help!

0 votes
10k views

I was wondering about the possibilities to show markers. I dug a while in the examples and played with default interactions, which use dragging to update the position of the marker.

On mobile devices this conflicts a little with the pan interaction to move the chart. I saw there’s also the possibility to pan using the axes area. There’s also the possibility to just tap on the chart, which doesn’t conflict with other interactions, to show a marker, but I couldn’t find how to do this. At least there doesn’t seem to be built in support for it? How should this be done?

Additionally I would like once a marker appears to either be able to update only by tapping again at other place on the chart (simple solution) or temporarily disabling the panning such that this gesture only moves the marker and not the chart (preferred, but probably less simple solution). So tapping on the chart would enter “marker mode” which disables zooming and panning and some other gesture – e.g. using an external button on the chart, would leave “marker mode” and enter zoom/pan mode again.

Any ideas how to achieve this? Thanks in advance!

P.S. I’m also using a real time chart, though this probably doesn’t make a difference concerning this.

0 votes
9k views

Hi,

I’m working on the iOS and android version. I’m trying to implemented an animated visible range change on Y axis when zooming/panning X axis.

On iOS, I just have to do:
yAxis.autoRange = .always
yAxis.animateVisibleRangeChanges = true
yAxis.animatedChangeDuration = 0.5

But I can’t find a way to do that on Android, is it hidden somewhere else?

Kind Regards,
Alexis

0 votes
9k views

I want to zoom the chart using mouse wheel. But not zoom at mouse point center, but at the specified point center I set.

How can I do it?
Is there any properties for MouseWheelZoomModifier?

0 votes
9k views

Hi,

I’ve been wondering. In SciChart’s current WPF version, is there any way to configure the default ViewportManager (or create a new customized one in a simple way) such that whenever I call its ZoomExtents method, the X and Y axes’ ranges will include any custom annotations I’ve added to the chart’s annotations collection?

My custom annotations are basically Images, with fixed Width and Height, and I set their X1 and Y1 properties to hold certain data points I have on the chart. The issue is, I need axes’ ranges to include the Image in it’s entirety, meaning I would have to somehow convert their Widths and Heights to “data point values”, since the new visible range should be in terms of data values, if I’m not mistaken.

Any good example to how this could be done?

  • Ilan Rozen asked 4 years ago
  • last active 4 years ago
0 votes
9k views

I’m looking to either extend the RubberBandXyZoomModifier to provide this size growing behavior when the mouse has left the chart area (shown in the attached image) or build one from scratch (having to rebuild the normal box-zoom components (the box etc).

I assume from reading around the the latter option will be the only option.

Thanks!

0 votes
9k views

I want to display auto format date on xAxis (DateAxis) while zooming but I cannot find SubDayTextFormatting function.Is there any way to display minutes and seconds after init months ?there is no DateTime Axis on Android like on iOS ..Should I change to CategoryDate Axis?

Thanks in advance

  • Guest asked 8 years ago
  • last active 7 months ago
0 votes
8k views

I have uploaded little test project with data and small video (1.8 Mb) showing the problem here https://www.dropbox.com/s/cgevtl6gee74926/ZoomOutScroll.zip?dl=0

1) Bug report.
In new versions (3.23) MouseWheelZoomModifier won’t zoom out if first bar of DataSeries is already visible (no more data on the left of the chart). But in old versions (2.11) it works. Please see my video. I can’t tell in exactly what version this behavior has been changed. I remember I reported this bug 1 or 1.5 years ago, and it was fixed. But now I notice this again.
Please fix or describe how can I fix it for my charts (3.23).

2) Question.
Please see second half of the video (after 0:17).
On top there is SciChartSurface, on bottom there is SciStockChart.
ZoomPanModifier (scrolling the chart with pressed left mouse button) works differently: SciStockChart scrolls good, but SciChartSurface does zooming in instead of simple scrolling.
My question is how to set up SciChartSurface to make her ZoomPanModifier act as on SciStockChart. I used to work with SciChartSurface and don’t want to move to SciStockChart because I like to have more settings.

  • RTrade A asked 9 years ago
  • last active 9 years ago
0 votes
7k views

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support-dev.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

0 votes
7k views

Hi,

There are some methods exposed in the API, ZoomBy and ZoomExtent which can programmatically be called from the code behind.
I am binding the series using IRenderableSeriesViewModel in MVVM pattern. Can we zoom the sciChart surface on a button click in ModelView?

Appreciating your help on this.

Thanks

1 vote
7k views

Hi,

Am trying to limit the depth in which the user can zoom into and out of the graph. I came across the property minimalZoomConstrain in the header file and also the documentation and had attempted to use it.

The axis in question is a DateTimeAxis and I would want to limit the zoom in depth to 30 seconds and the zoom out the about 3 months. I understand that the type it takes is the GenericType, where I will have to use the SCIGeneric(x) to assign the value, but what value x am I required to use in this case?

I’ve tried the values ’30′(assuming it takes NSTimeInterval) and even attempted to pass in a NSDate value but nothing seems to work.

Thank you.

  • Elle Yeoh asked 7 years ago
  • last active 7 years ago
0 votes
7k views

Have a good day!

I’m using SciChart v3.5.0.7128 (1st Oct 2015). When I’m trying to zoom in scichart surface with fastbandrenderableseries, glitches appear. In the version (v3.4.1.6431) there are no such bugs. How soon will it be fixed?

I’ve attached gif and project with the bug.

https://yadi.sk/d/8RpVeiy3jZsMc

gif (if attached is not rendered)
https://yadi.sk/i/uja6KI5ejZsc7

  • Egor asked 8 years ago
  • last active 8 years ago
0 votes
7k views

Hi there,
I’m trying to catch a VisibleRangeChanged Event of a DateTimeAxisViewModel, but it is never called.
Strangely, it work’s with a numeric axis viewModel?!
I’m refering to the AxisBinding and Annotation Binding Example in the Examples Suite.
I added a MouseWheelZoomModifier to be able to change the VisibleRange

 <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:MouseWheelZoomModifier>
                    </s:MouseWheelZoomModifier>
                </s:ModifierGroup>
 </s:SciChartSurface.ChartModifier>

In the InitializeAxes method in SciChartMvvmBindingsViewModel two lines were added to catch the VisibleRangeChanged Event:

            var xNumAxis = new NumericAxisViewModel
            {
                AxisAlignment = AxisAlignment.Bottom,
                AxisTitle = "XAxis",
                DrawMajorBands = false,
                TextFormatting = "0.00#",
                VisibleRange = new DoubleRange(0, 10),
                BorderThickness = new Thickness(3),
                BorderBrush = new SolidColorBrush(Colors.CadetBlue)
            };
            xNumAxis.VisibleRangeChanged += xNumAxis_VisibleRangeChanged; //catch num axis event
            XAxes.Add(xNumAxis);

            var xDateTimeAxis = new DateTimeAxisViewModel
            {
                AxisAlignment = AxisAlignment.Top,
                Id = "DateTimeAxis",
                VisibleRange = new DateRange(new DateTime(2017, 1, 1), new DateTime(2017, 1, 31)),
                StyleKey = "DateTimeAxisStyle"
            };
            xDateTimeAxis.VisibleRangeChanged += xDateTime_VisibleRangeChanged; //catch date time axis event

            XAxes.Add(xDateTimeAxis);

Now, when I change the zoom level I jump into the xNumAxis_VisibleRangeChanged-method, but never in the xDateTime_VisibleRangeChanged-method.

  • Tim asked 6 years ago
  • last active 4 years ago
0 votes
7k views

We need to be able to set our chart’s Y axis to be 105. When we add new series (realtime plotting) and one of the points has a value over 105 we need the chart to start auto-scaling to match that new Y value. In other words, unless the user manually zooms we always want the chart to self-resize after starting at a fixed 105 on the Y axis.

This might seem like a strange request at first but our application is expecting a real time series to plot points whose X values might go from -10 to +10; however, the Y value could go from anywhere between 0 and 100 (sometimes higher – although that is not a typical expected value). When we are auto-scaling XY values realtime with no minimal limits the series points are effectively zoomed in really close giving the user a feeling of “noise” to a series that technically doesn’t really exist.

I’ve attached a couple images that demonstrate what a typical series looks like for us. Imaging if only a small portion of the series were currently on the chart and we were using auto-scaling.

Although the 2nd images is a noisy series. It’s REALLY exacerbated when the initial series is auto-scaling during the measurement making it look like the 3rd image.

0 votes
6k views

Hi,
Im tryin to create an effect where I have a static point on the Y Axis and I want to perform zoom in, so what I did is to increase or decrease the Max visible range, what I’m left with is the rubber band effect where my static point isn’t static anymore because the point in “Stretching” in the direction I’m zooming.

0 votes
6k views

Hi, guys

Is it possible to set min and max zoom constraints for renderable serie with one element ?
Default value (default_zoom.PNG) is too big.

Can you look at this?

Best regards,
Sushynski Andrei

0 votes
5k views

Hello
I have animated line renderable series – when new point added, whole x-axes moves to the right a little.

Everything is smooth until pinch zoom appears.
I think it’s conflict with animated viewport move and zooming.

Is there a way to know, when zooming appears?

E.g. if i know, when zoom started and finished – i can solve this.
Thanks

0 votes
5k views

I’m trying to accomplish 2 things:

First is that I would like to not be able to zoom out past the data, it does no good to zoom out if there is no more data to see. It would also be nice to have a little bounce/spring back if you zoom to far, like when zooming out on an image on an iPhone.

The second is that I only want to be able to pan to the data. If zoomed all the way out, then trying to pan would do nothing. If zoomed in you should be able to scroll around, but only to the end of the data.

I believe I have the first one accomplished by setting the maximalZoomContrain to be the same as the data range, although this doesn’t allow any kind of bounce.

What need to be done to make this work, this seems like a feature that is built into the SciChart Modifiers.

0 votes
5k views

We have a different legacy chart in our older applications. In this chart zooming happens when we pull down and to the right. We remove the zoom (zoom out to initial size) when we pull up to the left. Of course, this is all with the left mouse button pressed.

SciChart zooms, in my opinion, much better and more specific. However I’m sure my company would prefer the mouse down, pull up to the left to reset the zoom much like our legacy product.

Is this possible? Can I override the zoom effect?

0 votes
5k views

I have a screen with multiple chart surfaces stacked on top of each other within a ScrollView. I can’t use a single chart surface because each of the charts is combined with other types of views to display extra information about the data in the charts.

I have a few issues I’m trying to solve:

  1. Each of the charts uses the same x-axis range. When a user pinches to zoom or drags to pan on a chart, I want all the charts to be synchronized to zoom and pan at the same time. How can I do this?

  2. Because the charts are embedded in a ScrollView, when I use the following modifiers it is very difficult to smoothly zoom and pan without the ScrollView being activated to scroll up and down. How can I make it so that the ScrollView is deactivated from moving while the user is attempting to zoom or pan a chart

surface.chartModifiers.add(
XAxisDragModifier().apply {
dragMode = AxisDragModifierBase.AxisDragMode.Pan
minTouchArea = 1000.0f
}
)
surface.chartModifiers.add(
PinchZoomModifier().apply {
direction = Direction2D.XDirection
}
)

0 votes
5k views

Hi,

I’m using RubberBandXyZoomModifier for zooming and i want to reverse the process.
If i double tap to screen, i want the process to be reversed and back to last zooming level.
Firstly how can I dedect the double tap, and secondly how can I reverse the process?

Tnx.

0 votes
4k views

Is it possible to define custom extents such that when I call ChartSurface.ZoomExtents() it will zoom out to where I want instead of the default found by the chart?

I have a requirement that dictates the amount of padding around each axis. I use a custom ViewPortManager and override the OnCalculateNewYRange() and OnCalculateNewXRange() functions to set the range.

I use the ZoomState to decide whether to allow zoom to do its job versus my dictation of the range when the zoom has been to extents. This unfortunately shows an awkward bump between the 3 states.

  1. Zoomed
  2. Zoomed to extents
  3. Zoomed to my custom range

Between 2 and 3 there is a “bump” as the chart resizes. Imagine the user double clicks to ZoomExtents and the animation from zoomed goes out to extents and then suddenly does the same from extents to my custom range. It’s really awkward and I don’t want to lose the animation as it’s a very nice user experience instead of an abrupt switch from zoomed to extents.

So, it would be great to set the extents in my derived ViewPortManager such that a ZoomExtents zooms directly to my custom extents instead of the default.

1 vote
4k views

Hello, I’m using the trial version currently and everything is working great.
I was wondering is there is any way to freeze the chart like I’m looking at pictures while the chart appends new data or save somehow the data points until I will finish my zoom(also if I can move while zooming).
I’m new developer and I have some Idea how to do that but I don’t what will be the right way to do so.

0 votes
4k views

Hi,

Currently when we scroll the mouse pointer the zoom level is increasing/decreasing and when we click and drag the pan the chart. I want is when we scroll the chart should change the visible range (Pan chart), and clicking and selecting the area need to zoom like RubberBandXyZoomModifier. But I need to zoom only the X axis. Y axis should be the same as before zoom. Is this possible with SCI chart??

0 votes
3k views

It’s impossible to zoom a candlestick chart (other types as well) on mobile browsers & WebViews.
I’m trying to use pinch-to-zoom with my fingers on chart, but it doesn’t react on it. Only sliding on the left & right is possible.

I’ve even tried demo from documentation:
https://demo.scichart.com/javascript-realtime-ticking-stock-charts

The same is with my chart as well

How can I fix it?
Thank you

  • Roman Zio asked 3 years ago
  • last active 3 years ago
1 vote
3k views

We want to add a toggle button to our chart, that changes the view range between zooming to a particular region of the graph and showing the whole dataset.
To achieve so, we have followed this post that suggests overriding the methods OnCalculateNewYRange and OnCalculateNewXRange inside a custom viewport manager https://www.scichart.com/documentation/win/current/webframe.html#ViewportManager%20-%20Full%20Control%20over%20Axis%20Ranges%20and%20Viewport.html

However, we have found that always overriding those methods does not work, because they get called when the user zooms and pans around the chart, where you want the default range to be returned, not our custom computed one.
Adding a flag to only override the methods when you click the button has also proven tricky, as those methods get called internally many times and it is difficult to control.
Is there an easier way to achieve this behaviour?

Our overridden methods look something along these lines:

/// <inheritdoc/>
    protected override IRange OnCalculateNewXRange(
        IAxis axis )
    {
        var computedRange = base.OnCalculateNewXRange( axis );

        if ( !( GetXLimitsForCurrentVisibleRangeLevel is null ) ) 
        {
            // Method that returns our computed visible range as a function of the toggle button state (CurrentVisibleRangeLevel )
           // Returns null when a flag indicates that it has already been called after the toggle button was clicked
            var newRange = GetXLimitsForCurrentVisibleRangeLevel( CurrentVisibleRangeLevel );
            return newRange ?? computedRange;
        }

        return computedRange;
    }    

Many thanks in advance!

Malu

1 vote
3k views

Looking to try and “link” two timeseries charts when either one is zoomed. The link aspect would be updating the other chart to have the same visible range as the zoomed chart.

Each chart has its visibleRange property updated in response to separate socket events, that happen at similar intervals but different.

Originally, was hoping to have something similar to the onZoomExtents method that fires a callback that would allow me to grab the latest min/max of the visibleRangeProperty of the xAxes to then update the other chart.

Any suggestions on how I could go about doing this?

And if it is not clear what I am talking about I can provide some code snippets.

1 vote
2k views

Hi, I want to create an event that will run when the user checks a zoom square. (see picture: zoom_square.png)
My motivation:
I run realtime samples and set:

 AutoRange="Always"

It bothers me that I can’t zoom the X axis (because the AutoRange…) The way I found to solve it is to change the NumericAxis.GrowBy property. But I want it to happen automatically when the user checks a zoom square and not manually like it is now.

I added pictures:
1. A given situation in which the samples are seen. (AutoRange="Always")
2. What happens when you zoom (either with the zoom square or with the mouse wheel)- The Y axis is stretched but the X axis is not.
3. What does the graph look like if the user drags the X-axis to the sides and changes the NumericAxis.GrowBy ==> desired state.
I want step 3 to happen automatically according to the size of the square the user marked. (According to the size of the square, I will know how to define the appropriate NumericAxis.GrowBy)

thanks!

1 vote
2k views

Hello,

We have a heatmap where we can zoom in using the MouseWheelZoomModifier. Essentially we want to stop zooming at a certain visibleRange level and we cannot achieve it. Currently we have a heatmap that’s about 1500 pixels in width (with 1500 datapoints, 1-to-1), but the user can zoom so far you essentially see just 1 data point spread over the 1500 pixels.

We want to be able to zoom, but up to a certain limit, let’s say 100 datapoints visible. When visibleRange.max – visibleRange.min <= 100 we want to stop zooming.

We’ve tried suspendUpdates() and manually setting the visibleRange, but this doesn’t produce the desired results because suspendUpdates stops everything (including zooming out again) and resetting visibleRange solves it for a second, but the user is able to zoom in again. We also tried a custom mouseWheelModifier class and just removing the zoom in functionality at the treshold but that does not seem to work because scichart gives an error of having different mouseWheelModifiers.

I hope that this problem was expressed sufficiently. Please let us know if you have any questions.

  • Zino As asked 10 months ago
  • last active 10 months ago
Showing 45 results

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies