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

0 votes

I have stock charts and want to prevent the user to go beyond the Min/Max datetimes (left, right). I tried applying setVisibleRangeLimitMode() to XAxis but it has no effect:

private final DoubleRange sharedXRange = new DoubleRange();

//sharedXRange.setMinMax(0d, response.body().getData().size()-1d); // not helping
final CategoryDateAxis xAxis = sciChartBuilder.newCategoryDateAxis()
        .withVisibility(isMainPane ? View.VISIBLE : View.GONE)
        .withGrowBy(0.1d, 0.1d)

xAxis.setMinimalZoomConstrain(10d); // minimum 10 points
xAxis.setVisibleRangeLimitMode(RangeClipMode.MinMax); // not working
//xAxis.setVisibleRangeLimit(new DoubleRange(-5d,5d));

I am thinking that maybe I should set Min and Max to sharedXRange, but couldn’t find in the docs what value to put into (tried with index, and Date without luck).

  • Primoz asked 1 month ago
  • last active 1 month ago
0 votes

Hi, guys

My axis is SCICategoryDateTimeAxis type. And using SCIZoomPanModifier (SCIClipMode_ClipAtExtents) to scroll chart

I’m using setVisibleRangeLimit: method to clip the axis during ZoomExtents

Until v. it’s work like a charm. But now something had have broken. And it’s doesn’t allow me to scroll chart at right way. It show me all of the data range on chart or only left side.

So can you fix it?

Best regards,
Sushynski Andrei

0 votes

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.

  • Andrew asked 4 years ago
  • last active 4 years ago
1 vote

I made an example based on the “Vertically Stacked Axes” from SciChart Examples. The main difference is that I can add DataSeries / YAxes on the fly.

The problem is that when I set VisibleRange and VisibleRangeLimit it does not crop the trace (as you can see on the Tan traces that are drawn on the whole surface).

Is there any way to crop the traces to VisibleRange of corresponding Axis?

  • Jan Kaiser asked 4 years ago
  • last active 4 years ago
Showing 4 results
This template supports the sidebar's widgets. Add one or use Full Width layout.