Pre loader

Axis Synchronization in Android

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

0
0

in IOS SDK there are SCIAxisRangeSyncronization and SCIAxisAreaSizeSyncronization for dealing with axis sync. I would like to ask are there any similar classes in Android to do this ? Thanks.

Version
v1.2.1
  • You must to post comments
0
0

Hi Ray,

You can synchronize VisibleRange by setting same IRange instance for all your axes. Please take a look on Sync Multiple Charts example. There you can see code like this which does this:

private IRange sharedXRange = new DoubleRange(0d, 1d);

final NumericAxis xAxis0 = sciChartBuilder.newNumericAxis()
            .withVisibleRange(sharedXRange)
            .build();

final NumericAxis xAxis1 = sciChartBuilder.newNumericAxis()
                .withVisibleRange(sharedXRange)
                .build();

To synchronize axes sizes you can use SciChartVerticalGroup class but for it supports only synchronization of vertically placed axes. Please take a look on Multi-Pane Stock Charts example. There you can see code like this which adds 4 surfaces into on vertical group which synchronizes size of vertical axes ( in our case all yAxes on the right side ):

  private final SciChartVerticalGroup verticalGroup = new SciChartVerticalGroup();

  initChart(priceChart, pricePaneModel, true);
  initChart(macdChart, macdPaneModel, false);
  initChart(rsiChart, rsiPaneModel, false);
  initChart(volumeChart, volumePaneModel, false);

  private void initChart(SciChartSurface surface, BasePaneModel model, boolean isMainPane) {
       ...

       verticalGroup.addSurfaceToGroup(surface);
  }

Hope this will help you!

Best regards,
Yura

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

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

Start TrialCase Studies