ShinobiChart: When does the axisRange gets populated?


I use monotouch.

Here is my snippet:

Shinobi Chart _mainChart = new ShinobiChart (frame, SChartAxisType.DateTime, SChartAxisType.Number);

_mainChart.LicenseKey = ShinobiLicense.GetLicenseKey ();

//standart datasource from examples

_mainChart.DataSource = _chartDataSource;

//setting zooming and panning

_mainChart.XAxis.AxisRange.Minimum  / /AxisRange == null at that point

I was wondering if there is a way to trigger the AxisRange to be calculated/instanciated?

I need the AxisRanges to set up Annotations…


Hi tomtom,

In general, the axis ranges won’t be calculated until the chart has loaded its data, at which point it will know what the data range is. On approach you could take would be to implement the OnRenderFinished method in your SChartDelegate class, and set up annotations there, but you will need some logic to ensure you are not doing it repeatedly.


Robin Sillem


Thank you for the response. I think this would work.

I will give it a try this afternoon.

I think I can check if I already set up annotations, and if so just return.