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


Hi im trying to create a screen with multiple charts (once candle stick the other bar) that are both dynamically updated every second with a new point.

…Ive done that bit.

But when I pan one chart I want it to update the pan position of the other chart
I’ve used the CreateMultiPaneStockChartsFragment as reference to try and do this.

I’ve tried..

            UpdateSuspender.using(sciChartSurface, new Runnable() {
            public void run() {
                Collections.addAll(sciChartSurface.getRenderableSeries(), candlestickSeries);

and then added the surface to the vertical group.

Also while im at it, the documentation doesnt give any explanation for what stuff does.
Some nice tutorials would be nice that actually explain what methods do.

…I dont even know what “updateSuspender” does.


  • You must to post comments
Best Answer

Hi Aidan,

Thanks for your questions.

To share touch events among modifiers from several charts you need to add chart modifiers collection into same motion event group:

            //add modifier group from chart1 into shared motion event group
            // need to set receiveHanldeEvents flag to receive events from other chart

            //add modifier group from chart2 into shared motion event group
            // need to set receiveHanldeEvents flag to receive events from other chart

This should fix the problem with pan between several charts.

Regarding the purpose of VerticalGroup class – it is helper class which is used to synchronize width of y axes which are placed in several charts. If you take a look on Multi-Pane Stock Chart example you should notice that the width of all YAxes on the right side is the same – all YAxes in vertical group reserve space which is required to draw axis with largest labels. This allows to synchronize size of viewport area ( place where all renderable series are drawn ) in case if you use several charts which are stacked vertically.

Regarding UpdateSuspender.using() method – it is helper method which is used to avoid unnecessary redrawing of chart. It suspends redrawing of chart while the specified Runnable is executed. In case of Multi-Pane Stock Chart example this allows to add all axes and renderable series with data series and redraw chart only once after all parts of chart are ready for drawing. This allows to reduce CPU usage and improve chart framerate. Without suspending updates chart automatically tries to redraw itself if you change something ( add axes, renderable series, change series style etc )

And yes, we’re working on new tutorials and extension of our documentation. We hope to release it in the nearest future.

Hope it helps!

Best regards,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.