Pre loader

XAxis.GetGetCurrentCoordinateCalculator size is 0


ICoordinateCalculator calculator = this.SciChart.XAxis.GetCurrentCoordinateCalculator();

During the first run, the xAxis and calculator both are not null nor empty, but only the calculator.size is 0. Only after the second run the size has value. Why is this happening? Or is there any alternative way to get the calculator.size?

  • You must to post comments
Great Answer

Hi Adrian,

The coordinate calculators cannot provide you with a conversion until the chart has been drawn. This is because we must have the chart size, as well as data ranges (output by Axis AutoRange) before we can do data to pixel coordinate conversions.

The only workaround is to await a SciChartSurface.Rendered event and ensure that coordinate calculations are updated after the chart has drawn.

Let me know if you have any other questions,

Best regards,

  • 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