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

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.