Page 1 of 1

Legend border issue with 2014

Posted: Thu Jun 19, 2014 2:33 pm
by 10046032
Hello,

Attached you can see that switching the visibility of the legend title affects the border rectangle (latest TChar Pro 2014, XE6, Windows 8.1)

Re: Legend border issue with 2014

Posted: Fri Jun 20, 2014 11:25 am
by yeray
Hello,

Take a look at the project attached. I can't reproduce the problem with it, can you?
testLegendTitle.zip
(1.88 KiB) Downloaded 145 times
Could you please modify it so we can reproduce the problem here?

Thanks in advance.

Re: Legend border issue with 2014

Posted: Fri Jun 20, 2014 12:55 pm
by 16567921
Hello,

Take a look now (I pasted my original plot). Please also notice that the left axis title does not appear to be drawn around the middle of the axis rather than starts from the middle.

Regards

Re: Legend border issue with 2014

Posted: Fri Jun 20, 2014 3:31 pm
by yeray
Hello,
johnnix wrote:Take a look now (I pasted my original plot).
I've reproduced it with v2014.11 but not with the actual sources, so I'd expect this to be fixed with the next maintenance release.
At Chart.pas you'll find a nested function with the signature:

Code: Select all

Function CalcColumnsWidth(NumLegendValues:Integer):Integer;
Just add this at the beginning of this function:

Code: Select all

ParentChart.Canvas.AssignFont(Font);
johnnix wrote:Please also notice that the left axis title does not appear to be drawn around the middle of the axis rather than starts from the middle.
I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=809

Re: Legend border issue with 2014

Posted: Fri Jun 20, 2014 5:43 pm
by 16567921
This is great, thank you so much!!!!

Regards

John