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

Answered
0
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?

Version
5.4.0.12119
  • You must to post comments
Great Answer
1
0

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,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.