Page 1 of 1

TDrawLine Tool

Posted: Wed Oct 28, 2015 10:31 pm
by 16476641
Hello,

We are trying to use the TDrawLine Tool (Teechart Pro V2015 and Delphi XE6) to add lines over a "Pie" chart, but it is not working properly.
Could you tell us if it's possible to do this? Could you provide us back an example on how to do it?
If we change the Chart style from "Pie" to "Pyramid" and create a line using TDrawLine and change back the chart style to "Pie", then the TDrawLine Tool can be used.

Thanks,

Re: TDrawLine Tool

Posted: Fri Oct 30, 2015 2:53 pm
by yeray
Hello,

The TPieSeries doesn't use the regular axes (Bottom and Left), so both axes have Minimum and Maximum = 0. This makes the TDrawLineTool unusable with it if you don't set a range manually. Ie:

Code: Select all

  Chart1.Axes.Left.SetMinMax(0, Series1.YValues.Total);
  Chart1.Axes.Bottom.SetMinMax(-0.5, 0.5);
In the code above I've set the same ranges the TPyramidSeries will use, in case you change to it later.
Alternatively, you can use any Minimum and Maximum for the TPieSeries and then make sure to set both axes Automatic:=true if you change to another series. But then the lines drawn will change their position in the screen.

Re: TDrawLine Tool

Posted: Tue Nov 17, 2015 7:12 pm
by 16476641
Thank you