Can you explain why we need variable axisSize?
And in code line 'tChart1.Axes.Right.EndPosition = zeroPos - 38' what is 38?
Thanks.
Map 0 from Axes.Left to 0 from Axes.Right
Re: Map 0 from Axes.Left to 0 from Axes.Right
Hello Neelam,
Thanks,
Sorry, I forgot remove it.Can you explain why we need variable axisSize?
It is 38 because it depends the number of values there are in the axes right and I have adapted this value for your code. It must be to adjust 0 of axis Right, with 0 of axis Left, because always there are a few pixels of difference. Would be appropriate; find a property works as this constant but for the moment I haven't found any.And in code line 'tChart1.Axes.Right.EndPosition = zeroPos - 38' what is 38?
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: Map 0 from Axes.Left to 0 from Axes.Right
It does not work for me. If bar values changes or we have to set Offset property ( to show labels inside chart) 0 Position way out of right position. If you max the screen, 0 on right axis jumps out. You should create property to adjust position to 0 position and introduce it in new release.
Re: Map 0 from Axes.Left to 0 from Axes.Right
Hello Neelam,
I have added your request in the bug list with number [TF02015166]. We will try to fix it for next maintenance releases of TeeChart.Net
Thanks,
I have added your request in the bug list with number [TF02015166]. We will try to fix it for next maintenance releases of TeeChart.Net
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: Map 0 from Axes.Left to 0 from Axes.Right
Hello Neelman,
I have informed you that this bug (TF02015166) is not a bug. Because, Axis.StartPosition and Axis.EndPosition are not absolute values when Axis.StartEndPositionUnits=Pixels but that Axis.CalcPosValue() does return an absolute value. StartPosition is zero even when Axis.StartEndPositionUnits=Pixels. This means that the absolute position of the start of the axis, IStartPos, has to be subtracted from zeroPos. Following code works fine:
I hope will helps.
Thanks,
I have informed you that this bug (TF02015166) is not a bug. Because, Axis.StartPosition and Axis.EndPosition are not absolute values when Axis.StartEndPositionUnits=Pixels but that Axis.CalcPosValue() does return an absolute value. StartPosition is zero even when Axis.StartEndPositionUnits=Pixels. This means that the absolute position of the start of the axis, IStartPos, has to be subtracted from zeroPos. Following code works fine:
Code: Select all
private Steema.TeeChart.Styles.Line line1, line2;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line2 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Left;
line2.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Right;
for (int i = 0; i < 10; i++)
{
line1.Add(i, i - 5);
line2.Add(i, i);
}
tChart1.Draw();
tChart1.Axes.Right.StartEndPositionUnits = Steema.TeeChart.PositionUnits.Pixels;
int zeroPos = tChart1.Axes.Left.CalcPosValue(0.0);
tChart1.Axes.Right.EndPosition = zeroPos - tChart1.Axes.Right.IStartPos;
}
Thanks,
Re: Map 0 from Axes.Left to 0 from Axes.Right
Thank you so much. Now it's working perfectly.
Re: Map 0 from Axes.Left to 0 from Axes.Right
Hello Neelman,
I am glad that solution works fine for you .
Thanks,
I am glad that solution works fine for you .
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 |