Page 1 of 1

Series Marks Overlaps/Cuts off Right Side

Posted: Fri Feb 14, 2014 6:09 pm
by 16565416
Delphi XE2, TChart 2012.07.121105 32bit (I know there is an update but the WMF rendering of charts is causing problems so I am using an old version for now)

In my attached demo, (1) the marks for the two series overlap and (2) the text for the last one cuts off the right side. How can I fix this? My customer is frustrated with me.

Thank you,

Ed Dressel

Re: Series Marks Overlaps/Cuts off Right Side

Posted: Mon Feb 17, 2014 10:25 am
by yeray
Hello Ed,

I can think on some different alternatives:

- For both (1) and (2), you could add a TDragMarksTool. Then, you customer can directly drag the marks and move them around to where he/she prefers. However, this is not an automatized way.

- For (2) you could simply add some extra margin in the right. If this has to be calculated automatically, you could force a chart repaint and then calculate the boundaries of the series marks, and if any of them is going to be drawn out of the chart boundaries, then you could increment the chart margin.

- For both (1) and (2), you could implement some algorithm to reposition the marks. Take a look at the following threads. They suggest solutions to avoid the overlapping, but it shouldn't be difficult to add some condition to also check the marks fit into the ChartRect boundaries.
http://www.teechart.net/support/viewtop ... ap*#p47893
http://www.teechart.net/support/viewtop ... ap*#p46555
http://www.teechart.net/support/viewtop ... 150#p57150