I have a PolarBar chart and it appears that the labels on the bottom axis aren't aligned with the corresponding "ring". in the attached picture, if you look at the 0.65 ring, it lines up with the left, top, and right labels, but not with the bottom.
we are using TChart version 4.1.2011.4193. is this a bug? if so, has it been corrected in a more recent release?
i have gotten around this by using the following code right after adding the series to the chart.
ISOCntrAngleChart.Axes.Left.SetMinMax(ISOCntrAngleChart[0].MinYValue(), ISOCntrAngleChart[0].MaxYValue());
ISOCntrAngleChart.Axes.Right.SetMinMax(ISOCntrAngleChart[0].MinYValue(), ISOCntrAngleChart[0].MaxYValue());
ISOCntrAngleChart.Axes.Top.SetMinMax(ISOCntrAngleChart[0].MinYValue(), ISOCntrAngleChart[0].MaxYValue());
ISOCntrAngleChart.Axes.Bottom.SetMinMax(ISOCntrAngleChart[0].MinYValue(), ISOCntrAngleChart[0].MaxYValue());
PolarBar bottom axis labels are misaligned.
PolarBar bottom axis labels are misaligned.
- Attachments
-
- polar chart labels.jpg (67.9 KiB) Viewed 6949 times
Re: PolarBar bottom axis labels are misaligned.
after a bunch of experimentation, it turns out that i only need to set the Min/Max of the Left and Bottom. Left uses Min/Max Y and Bottom uses Min/Max X.
Re: PolarBar bottom axis labels are misaligned.
Hello Pete,
Using next code in last version of TeeChartFor.Net, your problem doesn't appear:
Could you confirm us if your problem is solved using last version of TeeChartFor.Net?
Thanks,
Using next code in last version of TeeChartFor.Net, your problem doesn't appear:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.Polar polar1 = new Polar(tChart1.Chart);
tChart1.Aspect.View3D = false;
polar1.Circled = true;
tChart1.Dock = DockStyle.Fill;
polar1.Brush.Visible = false;
polar1.Add(0, 0.65);
polar1.Add(320, 0.58);
polar1.Pen.Visible = false;
polar1.ClockWiseLabels = true;
polar1.RotationAngle = 90;
tChart1.Axes.Left.SetMinMax(0, tChart1[0].MaxYValue()+0.1);
tChart1.Axes.Right.SetMinMax(0, tChart1[0].MaxYValue()+0.1);
tChart1.Axes.Top.SetMinMax(0, tChart1[0].MaxYValue()+0.1);
tChart1.Axes.Bottom.SetMinMax(0, tChart1[0].MaxYValue()+0.1);
}
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: PolarBar bottom axis labels are misaligned.
Hi Sandra,
I'm glad to see that it doesn't happen in the version you are using. unfortunately, this chart is embedded in a number of custom controls that we have as part of our solution, and, to change them out might be a bit of a challenge, as i didn't write any of the controls.
i would imagine that simply having the comment in the thread that this appears to have been resolved in the latest .NET version, might make a future code seeker feel better at ease.
if i do get a chance to test this, i will definitely post my results.
thanks,
pete.
I'm glad to see that it doesn't happen in the version you are using. unfortunately, this chart is embedded in a number of custom controls that we have as part of our solution, and, to change them out might be a bit of a challenge, as i didn't write any of the controls.
i would imagine that simply having the comment in the thread that this appears to have been resolved in the latest .NET version, might make a future code seeker feel better at ease.
if i do get a chance to test this, i will definitely post my results.
thanks,
pete.
Re: PolarBar bottom axis labels are misaligned.
i'm not sure if it makes a difference, but the series we're adding to the chart is a PolarBar, not a plain "Polar" series.
below is the code ...
Steema.TeeChart.Styles.PolarBar PolarSeries = new Steema.TeeChart.Styles.PolarBar();
PolarSeries.Circled = true;
PolarSeries.Pen.Visible = false;
PolarSeries.Pointer.Pen.Color = Color.Aqua;
PolarSeries.Pointer.HorizSize = 2;
PolarSeries.Pointer.VertSize = 2;
PolarSeries.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Diamond;
PolarSeries.CircleLabels = true;
PolarSeries.CircleLabelsRotated = false;
PolarSeries.LabelsMargin = 1;
PolarSeries.RotationAngle = 90;
foreach (GantryBeamInfo rs in Results)
PolarSeries.Add(rs.BeamCalcAngle, rs.BeamDistance);
ISOCntrAngleChart.Series.Add(PolarSeries);
right after this is where i added the SetMinMax calls that correct the label behavior.
thanks,
pete.
below is the code ...
Steema.TeeChart.Styles.PolarBar PolarSeries = new Steema.TeeChart.Styles.PolarBar();
PolarSeries.Circled = true;
PolarSeries.Pen.Visible = false;
PolarSeries.Pointer.Pen.Color = Color.Aqua;
PolarSeries.Pointer.HorizSize = 2;
PolarSeries.Pointer.VertSize = 2;
PolarSeries.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Diamond;
PolarSeries.CircleLabels = true;
PolarSeries.CircleLabelsRotated = false;
PolarSeries.LabelsMargin = 1;
PolarSeries.RotationAngle = 90;
foreach (GantryBeamInfo rs in Results)
PolarSeries.Add(rs.BeamCalcAngle, rs.BeamDistance);
ISOCntrAngleChart.Series.Add(PolarSeries);
right after this is where i added the SetMinMax calls that correct the label behavior.
thanks,
pete.
Re: PolarBar bottom axis labels are misaligned.
Hello Pete,
The same code using a PolarBar works in correct way using last version:
Thanks,
The same code using a PolarBar works in correct way using last version:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.PolarBar polar1 = new PolarBar(tChart1.Chart);
tChart1.Aspect.View3D = false;
polar1.Circled = true;
tChart1.Dock = DockStyle.Fill;
polar1.Brush.Visible = false;
polar1.Add(0, 0.65);
polar1.Add(320, 0.58);
polar1.Pen.Visible = false;
polar1.ClockWiseLabels = true;
polar1.RotationAngle = 90;
tChart1.Axes.Left.SetMinMax(0, tChart1[0].MaxYValue() + 0.1);
tChart1.Axes.Right.SetMinMax(0, tChart1[0].MaxYValue() + 0.1);
tChart1.Axes.Top.SetMinMax(0, tChart1[0].MaxYValue() + 0.1);
tChart1.Axes.Bottom.SetMinMax(0, tChart1[0].MaxYValue() + 0.1);
}
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |