By default, the angles on the polar chart go from 0 to 360 in a clockwise direction but I want them to go counter clockwise (anticlockwise)
chart.ChartAreas[0].AxisX.Title = "Elevation";
chart.ChartAreas[0].AxisY.Title = "Power(dBm)";
chart.ChartAreas[0].BackColor = System.Drawing.Color.FromArgb(211, 223, 240);
chart.ChartAreas[0].BorderColor = System.Drawing.Color.FromArgb(26, 59, 105);
chart.ChartAreas[0].AxisY.IsStartedFromZero = false;
chart.PrePaint += new EventHandler<ChartPaintEventArgs>(chart_prePaint);
I've tried changing the labels per some example code I found like this:
CustomLabelsCollection labels = chart.ChartAreas[0].AxisX.CustomLabels;
if (labels == null) return;
for (int i = 0; i < labels.Count - 1; i++)
{
if (labels[0].Text == "360") break;
labels[i].Text = (360 - int.Parse(labels[i].Text)).ToString();
labels[i].ToolTip = "Angle in Degrees";
}
The code changes the labels in the object but not on the graph. And every time the event is fired and we come back into this event handler, the labels have been reset to the way it was originally.And the tooltips have been reset.
To add to the confusion, I'm not sure why the CustomLabels object is populated in the first place - I didn't do it.
Any idea why the changes are having no effect?
Thanks in advance!