Pre loader

AnimatingLineChart YAxis Intervals

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

Hello,

I am developing a finance application and I am using AnimatingLineChart for it. I want prices like tickLine to be displayed instantly on this screen. But I’m having 2 problems while developing.

1- As I have included in the screenshot, the price movement seems to be in a straight line because the y-axis ranges are too much. I want to reduce the range here and show the price action in a healthier way. In the screenshot, the blue color is the graph drawn by the line graph, and the red color is the graph I want to draw. I create a very low range when determining the range, but this is not reflected in the chart. I am attaching the code I used below;

final NumericAxis yAxis = sciChartBuilder.newNumericAxis()
.withVisibleRange(new DoubleRange(1.095, 1.096))
.withGrowBy(new DoubleRange(0.1d, 0.1d))
.build();

2- Can I do this without entering a min and max value for Y axis while using this chart type? I want to create a structure in which it will dynamically determine the max and min values according to the price data it receives.

Do you have any suggestions for improving these or a better graphic type for it?

Thank you and have nice work.

Version
4.4.0.4739
Images
  • You must to post comments
0
0

Hi Andrew,

Thank you for your response. I tried your suggestions but the result did not change. After that, I tried with FifoCharts and LineChart, but the range remained the same. As far as I understand, the problem is not with the graphics type.

The last settings I used are as follows, but the image is the same as in the screenshot I shared with you. I need to find a way to lower the range here as I want.

 yAxis2 = sciChartBuilder.newNumericAxis().withGrowBy(0.0001d, 0.0001d).withAutoRangeMode(AutoRange.Always).build();
yAxis2.setVisibleRange(new DoubleRange(1.10, 1.101));

Best Regards.

  • You must to post comments
0
0

Hi Devrim

This looks like a problem related to axis ranging, and unrelated to animating line chart.

If you set the axis range to new DoubleRange(1.095, 1.096) it should immediately draw that range. Setting .withGrowBy(new DoubleRange(0.1d, 0.1d)) means the chart should have a 10% padding above/below the maximum on the lines on the screen but it looks like it might be adding 0.1 instead (look at your axis ranges — they seem to be around 1.085 to 1.196 — +/- 0.1)

  • Try removing the withGrowBy line and see if the axis behaves as expected.
  • Try experimenting with autoRange.Never since you are setting the axis range explictly.
  • Try simplifying the example and using a standard line series (not animating)

Let me know if either of those help narrow down the problem

Best regards
Andrew

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.