Open the section Performance practices and look at this header Restricting OnRender() calculations to visible ChartBars
The loop "for" is endless in this case because the condition "ChartBars.FromIndex <= ChartBars.ToIndex" is always true! To make it working, It needs change It like this
before:
for (int barIndex = ChartBars.FromIndex; ChartBars.FromIndex <= ChartBars.ToIndex; barIndex++)
after:
for (int barIndex = ChartBars.FromIndex; barIndex <= ChartBars.ToIndex; barIndex++)
Comment