Pre loader

How can I create two multiple mountain chart like Binance ?

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

1
0

How to create the order book depth chart with SciChart?

enter image description here

Version
2.2.2.2410
Images
  • You must to post comments
1
0

Hi Nizzle Bizzle,

Well I don’t see any problems with this. You just need to add 2 FastMountainRenderableSeries in same chart and provide data for both series. I’ve modified one of our examples to show it:

    final IAxis xBottomAxis = sciChartBuilder.newNumericAxis().withGrowBy(0.1d, 0.1d).build();
    final IAxis yRightAxis = sciChartBuilder.newNumericAxis().withGrowBy(0.1d, 0.1d).build();

    final IXyDataSeries<Double, Double> ds0 = sciChartBuilder.newXyDataSeries(Double.class, Double.class).build();
    final IXyDataSeries<Double, Double> ds1 = sciChartBuilder.newXyDataSeries(Double.class, Double.class).build();

    ds0.append(0d, 10d);
    ds0.append(10d, 0d);

    ds1.append(10d, 0d);
    ds1.append(20d, 10d);

    final FastMountainRenderableSeries rs0 = sciChartBuilder.newMountainSeries()
            .withDataSeries(ds0)
            .withStrokeStyle(0xFF00FF00, 1f, true)
            .withAreaFillColor(0x7700FF00)
            .build();

    final FastMountainRenderableSeries rs1 = sciChartBuilder.newMountainSeries()
            .withDataSeries(ds1)
            .withStrokeStyle(0xFFFF0000, 1f, true)
            .withAreaFillColor(0x77FF0000)
            .build();

    UpdateSuspender.using(surface, new Runnable() {
        @Override
        public void run() {
            Collections.addAll(surface.getXAxes(), xBottomAxis);
            Collections.addAll(surface.getYAxes(), yRightAxis);
            Collections.addAll(surface.getRenderableSeries(), rs0, rs1);
            Collections.addAll(surface.getChartModifiers(), sciChartBuilder.newModifierGroupWithDefaultModifiers().build());
        }
    });

Is this suitable for your needs?

Hope this will help you!

Best regards,
Yura

Images
  • 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