Page 1 of 1

.BottomAxis.Title.Caption and #13

Posted: Thu Apr 16, 2015 12:28 pm
by 16573450
dear Support,
I am using the latest release of TeeChartPro and I am trying to somehow get my application behavior similar to what I had with the 2013 version.
On one of the charts, i set:
(myTChart).BottomAxis.Title.Caption= #13 + 'the x-axis title'; // the caption is made of two lines here and the first line is empty!

unfortunately when i draw the chart, the title will show only the first Line and not the second part.
Do you know how I can handle that here?
Thanks

Re: .BottomAxis.Title.Caption and #13

Posted: Fri Apr 17, 2015 8:52 am
by yeray
Hello,

Try with #10#13 instead of just #13.

Re: .BottomAxis.Title.Caption and #13

Posted: Fri Apr 17, 2015 2:19 pm
by 16573450
this does not solve the issue. I explicitely need to set a blank. thanks

Re: .BottomAxis.Title.Caption and #13

Posted: Fri Apr 17, 2015 3:29 pm
by yeray
Hello,

I've made a simple test application:
testCarriageReturn.zip
(1.36 KiB) Downloaded 628 times
This is how it looks with v2013.08:
v2013.08.png
v2013.08.png (28.26 KiB) Viewed 14050 times
This is how it looks with v2015.14:
v2015.14.png
v2015.14.png (29.71 KiB) Viewed 14053 times
Note the #13 is the Carriage Return character. I'm not sure to understand how would you expect a string starting with a carriage return to be drawn.

Re: .BottomAxis.Title.Caption and #13

Posted: Mon May 04, 2015 10:05 am
by 16573450
Hi,
I downloaded the sample you kindly posted, but unfortunately, it does not work. I don't even see the text label:
myText:=#13 + 'this is my text';
I am using the official 2013 version, namely: 2013.09.131119 and I am running it with Embarcadero® Delphi® XE2 Version 16.0.4429.46931
How can i apply an offset to the title of an axis?
thanks

Re: .BottomAxis.Title.Caption and #13

Posted: Tue May 05, 2015 9:16 am
by yeray
Hello,
cssesuc wrote:I downloaded the sample you kindly posted, but unfortunately, it does not work. I don't even see the text label:
myText:=#13 + 'this is my text';
I am using the official 2013 version, namely: 2013.09.131119 and I am running it with Embarcadero® Delphi® XE2 Version 16.0.4429.46931
I get this with XE2 and TeeChart v2013.09:
2015-05-05_1113.png
2015-05-05_1113.png (25.44 KiB) Viewed 13988 times
Aren't you getting the same?
cssesuc wrote:How can i apply an offset to the title of an axis?
Isn't this the same you asked here?
http://www.teechart.net/support/viewtop ... =3&t=15567

Re: .BottomAxis.Title.Caption and #13

Posted: Wed May 06, 2015 3:55 pm
by 16573450
Hi
can one expert please tell me how to solve this issue. I implemented the solution suggested on one other post, but this is not really elegant.
Find attached a basic project, for which you can see the issue
As I said, if I implement:
chart1.BottomAxis.Title.Text:= 'hello' + TeeLineSeparator + 'this is my axis title';
it will show ONLY 'hello'
Playing on the margin does not help.
I attach to this post the output canvas as well as the entire project, such that it can be checked.
Do you have some solution/ suggestion to the issue here. I could see that TLineSeparator was reported to behave problematically in the past.
For info, I am using TeeChart2013.09131119 with source code

THANKS

Re: .BottomAxis.Title.Caption and #13

Posted: Thu May 07, 2015 7:41 am
by 16573450
Hi,
I believe there is a bug in the approach used here which explains why if a title contains a #13, any string after is simply ignored. IMHO the way the GetCaption is implementing the call to the TeeExtractField is buggy
thanks.

Re: .BottomAxis.Title.Caption and #13

Posted: Thu May 07, 2015 8:25 am
by yeray
Hi,
cssesuc wrote:can one expert please tell me how to solve this issue. I implemented the solution suggested on one other post, but this is not really elegant.
Find attached a basic project, for which you can see the issue
As I said, if I implement:
chart1.BottomAxis.Title.Text:= 'hello' + TeeLineSeparator + 'this is my axis title';
it will show ONLY 'hello'
Playing on the margin does not help.
I attach to this post the output canvas as well as the entire project, such that it can be checked.
Do you have some solution/ suggestion to the issue here. I could see that TLineSeparator was reported to behave problematically in the past.
For info, I am using TeeChart2013.09131119 with source code
I see the project you attached reproduces the problem in v2013.09. However, it seems to work fine in the actual version, v2015.15:
2015-05-07_1001.png
2015-05-07_1001.png (3.91 KiB) Viewed 13940 times
So the easier way around is using the latest version.
cssesuc wrote:I believe there is a bug in the approach used here which explains why if a title contains a #13, any string after is simply ignored. IMHO the way the GetCaption is implementing the call to the TeeExtractField is buggy
I've checked the three functions you highlighted and I can confirm they haven't been modified between v2013.09 and v2015.15.
Investigating a bit more, I see it was fixed between v2014.12 and v2015.14, probably when fixing this one:
http://bugs.teechart.net/show_bug.cgi?id=947

There were many changes here so it's difficult to extract the minimal code for you to apply it on an old release such as v2013.09.

Re: .BottomAxis.Title.Caption and #13

Posted: Thu May 07, 2015 12:55 pm
by 16573450
Hi,
many thanks for the clarification. If I understand it from your email, if we stick to the 2013.09 version, we have to live with this bug and we should not expect any patch, right?
Could you clarify the release approach which is used. We decided to use the official 2013.09 release, since we could see that 2015 is rather unstable (for our application)
Do you know for how long this release is supported?
thanks, nabil

Re: .BottomAxis.Title.Caption and #13

Posted: Fri May 08, 2015 11:15 am
by yeray
Hello,

In general, note we develop the component in a linear basis. This means the new features and the bugfixes are implemented in the latest sources, and each new maintenance release replaces the last one.
There's always place for exceptions when we see a considerable number of customers affected, or if a bug is critical enough to justify an old release to be rebuilt.
In this case, I'm afraid it's not an easy task. Note there's almost a year of changes (and several maintenance releases) between v2013.09 and the point where the sources make your test application to work fine.

After further investigation I've found the changes that make your test application to work fine wasn't exactly were I initially thought. Instead, the changes were made a few days earlier where the procedure TChartAxis.DrawTitle at TeEngine.pas was completely rewritten to allow rotated HTML text in the Axis Title.
I've also been able to apply the necessary changes to the v2013.09 sources and I've checked the test application you posted earlier here work fine with them. I'm sending the affected units to the mail account you have registered in this forum so you can recompile it.

Maybe you can tell us what are the exact problems you are finding with the actual version so we can address them and provide a working environment for you.
I find this post from you reporting your application hangs when you use the latest version. We'd appreciate if you could provide more details about how to reproduce the problem here so we can fix it.