Page 1 of 1

TChartShape series problem

Posted: Tue May 25, 2010 7:46 am
by 10554308
Hi,

I want to report a problem I encountered, using Delphi 2009 and TeeChart 8.06 (VCL version).
When I use a TChartShape series with XYStyle:=xysAxisOrigin, it works fine in design mode. Then, when you run the program, the coordinates are way off, the shape appears much too large in a totally wrong part of the chart.
If you next set all properties of the series in code, then it works fine again. Puzzling!

Regards, Matt

Re: TChartShape series problem

Posted: Tue May 25, 2010 11:43 am
by yeray
Hi Matt,

This property corresponds to the following at design time: Series/Format/Position/Units:Axis Origin
If I set this property, I can see the same behaviour than setting the property at runtime as you say. Could you please confirm this?

Note that with this property you are setting the shape to start at the axes coordinate (X0, Y0) and to have a width and height of X1 and Y1, in pixels.

But, as you've noticed, the automatic axes aren't focusing the shape correctly so I've added it to the wish list to be implemented in future releases (TV52014912).
In the meanwhile, you could use axes SetMinMax function to correct it. For example:

Code: Select all

Chart1.Axes.Left.SetMinMax(Series1.Y0 - 100, Series1.Y0);

Re: TChartShape series problem

Posted: Tue May 25, 2010 3:14 pm
by 10554308
Hi Yeray,
> If I set this property, I can see the same behaviour than setting the property at runtime as you say.
> Could you please confirm this?
>
Yes, that is the same setting. It is very handy to add a text box to the graph with a box that does not change in size when zooming.
There is no real problem, as it works fine if you set the X and Y values in code, which I wanted to do anyway. It is just that I use the designer mode to test new stuff, and noticed it did not work as expected.

Regards and thanks, Matt

Re: TChartShape series problem

Posted: Tue May 25, 2010 3:25 pm
by yeray
Hi Matt,
mpv wrote:Yes, that is the same setting. It is very handy to add a text box to the graph with a box that does not change in size when zooming.
If that's what you need, I'd recommend you to use annotation tools.