PolarChart: Inconsistent data display on ClockWiseLabels
Posted: Tue Dec 02, 2014 8:55 am
The label direction on Polar series can be set by the ClockWiseLabels property. I found the following behaviour in TeeChart 1.2014.8123:
The following code draws data at the wrong positions. E.g. the value "2" is drawn at 270° instead of 90°.
The following code draws data at the correct positions.
Is this behaviour expected or is that a bug in TeeChart?
I have attached a sample which demonstrates the behaviour.
- When I set the direction and then add data, the data is drawn at the wrong polar angles.
When I add data and then set the direction, the data is drawn as expected.
The following code draws data at the wrong positions. E.g. the value "2" is drawn at 270° instead of 90°.
Code: Select all
private void btnDirectionBeforeData_Click(object sender, EventArgs e)
{
Polar newSeries = new Polar();
newSeries.CircleLabels = true;
newSeries.Color = Color.Red;
newSeries.ClockWiseLabels = true;
newSeries.Add(0, 10);
newSeries.Add(90, 2);
newSeries.Add(180, 4);
newSeries.Add(270, 8);
tChart1.Series.Add(newSeries);
}
Code: Select all
private void btnDataBeforeDirection_Click(object sender, EventArgs e)
{
Polar newSeries = new Polar();
newSeries.CircleLabels = true;
newSeries.Color = Color.DarkGreen;
newSeries.Add(0, 10);
newSeries.Add(90, 2);
newSeries.Add(180, 4);
newSeries.Add(270, 8);
newSeries.ClockWiseLabels = true;
tChart1.Series.Add(newSeries);
}
I have attached a sample which demonstrates the behaviour.