TChartShape series problem

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
mpv
Newbie
Newbie
Posts: 6
Joined: Thu Sep 24, 2009 12:00 am

TChartShape series problem

Post by mpv » Tue May 25, 2010 7:46 am

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

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TChartShape series problem

Post by Yeray » Tue May 25, 2010 11:43 am

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);
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

mpv
Newbie
Newbie
Posts: 6
Joined: Thu Sep 24, 2009 12:00 am

Re: TChartShape series problem

Post by mpv » Tue May 25, 2010 3:14 pm

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

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TChartShape series problem

Post by Yeray » Tue May 25, 2010 3:25 pm

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply