Hi,
I am facing a strange problem with silverlight radchart.
Code:
// Name the x-axis scale items
TickPointCollection tickPoints = radChart1.DefaultView.ChartArea.AxisX.TickPoints;
string[] months = new string[] { "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "Jan", "Feb", "Mar" };
for (int i = 0; i < tickPoints.Count; i++)
{
radChart1.DefaultView.ChartArea.AxisX.TickPoints[i].Label = months[i];
}
This code is to label the x-axis with the months names. Few times, this code works beautiful - but most of the time, it results in a out of index exception.
When we try to debug this code and see the quick watch value of Tickpoints[i] in the for loop, we can see the Tickpoints number shows 11 at some time and 0 at sometimes. I am not able to understand what is missing here?
Any help is highly appreicated.
Thanks & Regards,
YK
I am facing a strange problem with silverlight radchart.
Code:
// Name the x-axis scale items
TickPointCollection tickPoints = radChart1.DefaultView.ChartArea.AxisX.TickPoints;
string[] months = new string[] { "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "Jan", "Feb", "Mar" };
for (int i = 0; i < tickPoints.Count; i++)
{
radChart1.DefaultView.ChartArea.AxisX.TickPoints[i].Label = months[i];
}
This code is to label the x-axis with the months names. Few times, this code works beautiful - but most of the time, it results in a out of index exception.
When we try to debug this code and see the quick watch value of Tickpoints[i] in the for loop, we can see the Tickpoints number shows 11 at some time and 0 at sometimes. I am not able to understand what is missing here?
Any help is highly appreicated.
Thanks & Regards,
YK