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

0 votes
7k views

How to move chart scroll by arrow key? For example, When I pressed the Right Arrow Key, the bars in the chart will move Right one Bar position, vice versa. Thanks.

  • fxchenlin asked 6 years ago
  • last active 5 years ago
0 votes
5k 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 5 years ago
  • last active 5 years ago
0 votes
2k views

Hi, guys

My X axis is SCICategoryDateTimeAxis type.

And i have a huge amount of data to display. So i need to display it by scrolling of the chart surface.
So what is the best practice to update data series on the fly and display it at the chart surface?

Best regards,
Sushynski Andrei

1 vote
851 views

Hello everyone.

I have chart with adding data every second.

What i want to do:
– by dragging finger left, right – chart scrolls left and right (can go to past data, etc)
– by two fingers zoom gesture – it zooms (only horizontally with autorange by Y axis)
– i set a visible range limit to the right in this way: user can scroll to the right xMax to be in the middle (currently this part not working – and axis zooming, when i continue scrolling to the right)

I tried a lot of different modifiers, but none of them was ok.

My setup:

lineDataSeries.addObserver(new IDataSeriesObserver() {
            @Override
            public void onDataSeriesChanged(IDataSeries<?, ?> iDataSeries, int i) {

                long addTime = 30_000 * currentTimeframe;

                runOnUiThread(() -> {
                    DateRange dateRange = new DateRange();

                    dateRange.setMinMax(new Date(0), new Date(lineDataSeries.getXRange().getMax().getTime() + addTime));

                    mSciChartSurface.getXAxes().getDefault().setVisibleRangeLimit(dateRange);
                });
            }
        });

final DateAxis dateAxis = sciChartBuilder.newDateAxis()
            .withAutoRangeMode(AutoRange.Never)
            .withDrawMajorTicks(true)
            .withDrawMinorTicks(false)
            .withDrawMinorGridLines(false)
            .withAutoFitMarginalLabels(false)
            .withTextFormatting("HH:mm:ss")
            .build();
    dateAxis.setMinimalZoomConstrain(25_000L * currentTimeframe); // 25 - 300 points
    dateAxis.setMaximumZoomConstrain(300_000L * currentTimeframe);

final NumericAxis yAxis = sciChartBuilder.newNumericAxis()
            .withAutoRangeMode(AutoRange.Always)
            .withGrowBy(new DoubleRange(0.1d, 0.1d))
            .withTextFormatting("#.000000")
            .withAutoFitMarginalLabels(false)
            .withDrawMinorTicks(false)
            .withDrawMinorGridLines(false)
            .build();
    yAxis.setMinimalZoomConstrain(0d);

ModifierGroup additionalModifiers = sciChartBuilder.newModifierGroup()
            .withPinchZoomModifier().withXyDirection(Direction2D.XDirection).withScaleFactor(2).build()
            .withZoomPanModifier().withReceiveHandledEvents(true).withXyDirection(Direction2D.XDirection).withClipModeX(ClipMode.ClipAtMax).build()
            //.withZoomExtentsModifier().withReceiveHandledEvents(true).withXyDirection(Direction2D.XDirection).build()
           //
            .withXAxisDragModifier().withReceiveHandledEvents(true).withDragMode(AxisDragModifierBase.AxisDragMode.Pan).withClipModeX(ClipMode.ClipAtMax).build()
            //.withYAxisDragModifier().withReceiveHandledEvents(false).withDragMode(AxisDragModifierBase.AxisDragMode.Scale).build()
            .build();
  • Kirey Vadim asked 10 months ago
  • last active 10 months ago
0 votes
714 views

Hello everyone.

I have 2 stacked horizontally charts with

 .withMotionEventsGroup("ModifiersSharedEventsGroup").withReceiveHandledEvents(true)

so they drag and zoom in same way.

But when i put one finger on first chart, second finger on second chart – then total apocalypse happens.
Is it possible to zoom it, like two fingers on one chart or disable zoom in that situation, so charts will have no conflict?

(I think both chart just dragging in different directions in my case, but because they are linked – everything just shakes)

Edit:

Collections.addAll(mSciChartMainSurface.getChartModifiers(), sciChartBuilder.newModifierGroup()
                        .withPinchZoomModifier().withXyDirection(Direction2D.XDirection).withScaleFactor(SCALE_FACTOR_X_AXIS).build()
                        .withZoomPanModifier().withReceiveHandledEvents(true).withXyDirection(Direction2D.XDirection).build()
                        .withMotionEventsGroup(MODIFIER_SHARED_EVENTS_GROUP_NAME).withReceiveHandledEvents(true)
                        .withXAxisDragModifier().withReceiveHandledEvents(true).withDragMode(AxisDragModifierBase.AxisDragMode.Pan).build()
                        .build());



Collections.addAll(mSciChartBotIndicatorSurface.getChartModifiers(), sciChartBuilder.newModifierGroup()
                    .withMotionEventsGroup(MODIFIER_SHARED_EVENTS_GROUP_NAME).withReceiveHandledEvents(true)
                    .withPinchZoomModifier().withXyDirection(Direction2D.XDirection).withScaleFactor(SCALE_FACTOR_X_AXIS).build()
                    .withZoomPanModifier().withReceiveHandledEvents(true).withXyDirection(Direction2D.XDirection).build()
                    .withXAxisDragModifier().withReceiveHandledEvents(true).withDragMode(AxisDragModifierBase.AxisDragMode.Pan).build()
                    .build());
  • Kirey Vadim asked 10 months ago
  • last active 10 months ago
1 vote
2k views

I evaluating Scichart for our application and have been testing the Realtime FIFO example.

I have made the following modifications to the example
– Increased number of samples added per timer tick
– Replaced a sin wave with a recording of FPS
– Swapped to DX10 render surface
– Changed Plot Theme
– Added Plot Modifiers for manipulation

When FIFO is enabled and more than 5052 points are added unusual behavior occurs, the line seems to slide backwards and faster than the plot does and there are lines connecting the start and end of the plot.

I have recorded a video that compares running with FIFO enabled vs FIFO disabled.

https://youtu.be/SKi1zRDhq60

I forgot to add that I can get a similar but slightly different glitch by taking the example straight from the example browser and increasing the FIFO length to 10000, see attached image.

  • Hugoagogo asked 3 years ago
  • last active 3 years ago
Showing 6 results
This template supports the sidebar's widgets. Add one or use Full Width layout.
SciChart WPF v6 BETA released! Note pricing/licensing changes are coming. Contact us to beat the rise!Read more
+