SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0 votes
490 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
503 views

Hello,
i have a chart with Xaxis as datetimeaxis and several Yaxes, when ZoomExtentsModifier is used, some YAxes disappear This problem can be solved with HighPrecisionNumericAxis, but the performance suffers
Version: v6.1.0 Build: 13075

  • Son Vu asked 7 months ago
  • last active 7 months ago
0 votes
958 views

Hello.

It’s very strange, but chart can not be zoomed with pinch, only by double tap fitting full screen.
And when trying to zoom app freezes and CPU load became 100%.

func installChart() {
    sciChartSurface = SCIChartSurface(frame: self.view.bounds)
    sciChartSurface?.translatesAutoresizingMaskIntoConstraints = false


    self.vGraphBox.subviews.forEach({ $0.removeFromSuperview() })

    self.vGraphBox.addSubview(sciChartSurface!)

    NSLayoutConstraint.activate([
        sciChartSurface!.leftAnchor.constraint(equalTo: self.vGraphBox.leftAnchor),
        sciChartSurface!.rightAnchor.constraint(equalTo: self.vGraphBox.rightAnchor),
        sciChartSurface!.bottomAnchor.constraint(equalTo: self.vGraphBox.bottomAnchor),
        sciChartSurface!.topAnchor.constraint(equalTo: self.vGraphBox.topAnchor)
        ])

    // Add the SCIChartSurface as a subview
    self.vGraphBox.addSubview(sciChartSurface!)

    let xAxis = SCILogarithmicNumericAxis()
    xAxis.growBy = SCIDoubleRange(min: SCIGeneric(0.1), max: SCIGeneric(0.1))
    xAxis.scientificNotation = .logarithmicBase
    //xAxis.textFormatting = "#.#E+0"
    xAxis.logarithmicBase = 10.0
    xAxis.visibleRange = SCIDoubleRange(min: SCIGeneric(100), max: SCIGeneric(22000.0))

    let yAxis = SCINumericAxis()
    yAxis.autoRange = .never
    yAxis.visibleRange = SCIDoubleRange(min: SCIGeneric(-300.0), max: SCIGeneric(0.0))

    lineRenderableSeries.dataSeries = self.dataSeries
    lineRenderableSeries.strokeStyle = SCISolidPenStyle(colorCode: 0xFFE13219, withThickness: 1)

    //self.sciChartSurface?.chartModifiers.add(pinchZoomModifier) //Causes freeze
    self.sciChartSurface?.chartModifiers.add(SCIZoomPanModifier())
    self.sciChartSurface?.chartModifiers.add(SCIZoomExtentsModifier())

    SCIUpdateSuspender.usingWithSuspendable(sciChartSurface!) {
        self.sciChartSurface?.xAxes.add(xAxis)
        self.sciChartSurface?.yAxes.add(yAxis)
        self.sciChartSurface?.renderableSeries.add(self.lineRenderableSeries)
        self.sciChartSurface?.renderableSeries.add(self.lineRenderableSeriesMax)
    }
}
0 votes
2k views

I have to show multiple charts in the UI. so, I’m using a ListView and adding SciChart in the DataTemplate.
Please refer the files for more details

After the data is loaded, there is a lot of lag in zoom in, zoom out and Rubberband functionality.

Note: I’ve to load more than 4000 XY values in the series.

Could you please take a look at the same and provide some tips for improving the performance and also let me know if there is any alternative for what I’m doing?

Thanks,
Manoj

0 votes
3k views

I’m pretty sure the modifier ZoomExtents fits the entire graph to the screen. But a lot of my interesting data happens right at the far right edge of my graph. So I want to add a buffer.

I’d like to zoom to XMin – XMax0.05 and XMax +XMax0.05.

I do this when loading my graph, and I’d like the double tap of my graph to also zoom to that range.

Any ideas?

0 votes
4k views

Hi,

Are there any events on the chart which fires on zoom starts and zoom ends which i can use to calculate the time taken for the zoom operation.

Thanks,

Pruthvi Sagar

0 votes
5k views

Hi I am using scichartsurface with multiple y axes and a single x axis. I would want the zooming to work in a block basis as shown in the attachments.
For ex: In the first attachment I am selecting the block from 08:00:00(xaxis) and 0.76(y axis), and moving on upto 09:30:00(approx) and -22(approx). So when i start zooming the area, is it possible that it selects the entire block(A block would be distance from one major grid line to the next immediate major grid line across X axis). Please refer to 2nd attachment if unclear.

Does SciChart provide any such feature?

  • Kedar k asked 5 years ago
  • last active 5 years ago
0 votes
6k views

i have a problem with zoom : i can’t declare my function for charting inside the constructor of my class no also in the function loaded for the simple reason because i must pass two list for this function “public void CreateDataSetAndSeries(List lstX, List lstY)”, so, i create my function like this in my .XAM.cs class :

public void CreateDataSetAndSeries(List lstX, List lstY)
{
series0 = new XyDataSeries<DateTime, double>();

        using (this.sciChartSurface.SuspendUpdates())
        {

               series0.Append(lstX, lstY);

        }           
        lineSeries.DataSeries = series0;
        sciChartSurface.ZoomExtentsY();
   }

and for my class.xaml i write this :
<SciChart:SciChartSurface.ChartModifier>

<SciChart:RubberBandXyZoomModifier/>

                <SciChart:ZoomPanModifier ExecuteOn="MouseRightButton"/>
                    <SciChart:ZoomExtentsModifier ExecuteOn="MouseDoubleClick"/>

                <SciChart:CursorModifier ReceiveHandledEvents="True" ShowAxisLabels="True"  ShowTooltip="True" ShowTooltipOn="MouseRightButtonDown"/>

the problem i can’t did the zoom So what i can do ?
waiting for your response thank you !

  • sahar Les asked 6 years ago
  • last active 6 years ago
0 votes
8k views

We were recently asked on priority support tickets ‘How do I ZoomExtents a SciChartSurface to a specific range, e.g. VisibleRangeLimit, when double clicking on the chart’.

For the benefit of our user-base our solution is below.

1 vote
0 answers
6k views

What’s happening when i am double click on the chart surface?How Zoom extents modifier calculate the visible range?.I need to know in order to use the same calculation in my code.

  • Raghupathy asked 6 years ago
  • last active 6 years ago
2 votes
7k views

Hi,
I have a SciChartSurfacewith one xaxis an four yaxis and a dynamic number of series which are added at runtime.
Also I have some modifiers especially the ZoomExtentsModifier( ExecuteOn=”MouseDoubleClick” XyDirection=”XDirection”) and for each yaxis a yaxisdragmodifier.
Is it possible to double click on a single yaxis and ZoomExtends only this yaxis?

Regards Markus

Showing 11 results
This template supports the sidebar's widgets. Add one or use Full Width layout.