Strange characters in axis labels.
Strange characters in axis labels.
See the attached image.
I selected Axis->Labels->Style->Multi-Line, and then tried setting the x axis label to have two rows.
But I get the strange character. I initially tried sending a Unicode string, then tried a UTF8 string, both have the strange character in it.
Is there any way around this?
I selected Axis->Labels->Style->Multi-Line, and then tried setting the x axis label to have two rows.
But I get the strange character. I initially tried sending a Unicode string, then tried a UTF8 string, both have the strange character in it.
Is there any way around this?
- Attachments
-
- TChart_funny_chars.jpg (17.15 KiB) Viewed 19037 times
Re: Strange characters in axis labels.
Hi Tony,
Try with vbCr instead of vbNewLine in VB6:
Try with vbCr instead of vbNewLine in VB6:
Code: Select all
TChart1.AddSeries scHorizBar
TChart1.Series(0).Add 100, "top line" + vbCr + "example", clTeeColor
TChart1.Header.Text.Text = "hello" + vbCr + "world"
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Strange characters in axis labels.
I'm using MSC++. VB is not an option for me.
I've tried replacing \n with \r and \r with \n. I always get the funny space character.
I've tried replacing \n with \r and \r with \n. I always get the funny space character.
Re: Strange characters in axis labels.
Hi Tony,
Only the \n seems to work fine for me here. Does it work for you?
Only the \n seems to work fine for me here. Does it work for you?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Strange characters in axis labels.
No.
I've got
CString strModifiedTitle.Format(_T("Line 1\nLine 2"));
pTChart->Series(0).GetAsGantt().AddGantt( 0 , 0 , 0 , strModifiedTitle);
And I get "Line 1[] line 2" (so not multi line any more). The "[]" is the funny character I reported originally.
It's the Unicode build if that makes any difference.
I've got
CString strModifiedTitle.Format(_T("Line 1\nLine 2"));
pTChart->Series(0).GetAsGantt().AddGantt( 0 , 0 , 0 , strModifiedTitle);
And I get "Line 1[] line 2" (so not multi line any more). The "[]" is the funny character I reported originally.
It's the Unicode build if that makes any difference.
Re: Strange characters in axis labels.
Bump. Any ideas/workarounds?
Re: Strange characters in axis labels.
Hi Tony,
The following seems to work fine for me in VC++ 6.0
If you still have problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
The following seems to work fine for me in VC++ 6.0
Code: Select all
m_Chart1.AddSeries(scGantt);
CString strModifiedTitle = "Line 1\rLine 2";
m_Chart1.Series(0).GetAsGantt().AddGantt( 0 , 0 , 0 , strModifiedTitle);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Strange characters in axis labels.
I could upload a .TEE file. Would that help?
If I knew what the strange chars are I could remove/replace them before sending to TChart, but I cannot figure them out.
If I knew what the strange chars are I could remove/replace them before sending to TChart, but I cannot figure them out.
Re: Strange characters in axis labels.
Hi Tony,
I think that this problem could be very related to the exact type of project you are developing. That's why I asked for a simple project.
I'm doing the tests modifying the example at "C:\Program Files\Steema Software\TeeChart Pro v8 ActiveX Control\Examples\Visual C++\Version 6\Add data arraysVCTeeChart5.dsw" with VC++ 6.0, but this may be different than what you are doing.
A tee file could still give a different result if you generated it in an environment and I load it into another one.
I think that this problem could be very related to the exact type of project you are developing. That's why I asked for a simple project.
I'm doing the tests modifying the example at "C:\Program Files\Steema Software\TeeChart Pro v8 ActiveX Control\Examples\Visual C++\Version 6\Add data arraysVCTeeChart5.dsw" with VC++ 6.0, but this may be different than what you are doing.
A tee file could still give a different result if you generated it in an environment and I load it into another one.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Strange characters in axis labels.
The string comes from an editbox in MSVC++ 2008. The project is unicode.
If I process each string with the following function before passing to TChart, it seems to be ok. But will it be fixed in the next release (if there is ever a release)?
pString->Replace('\n','\r');
If I process each string with the following function before passing to TChart, it seems to be ok. But will it be fixed in the next release (if there is ever a release)?
pString->Replace('\n','\r');
Re: Strange characters in axis labels.
Hi Tony,
We cannot fix it until we can identify it unequivocally reproducing it in a simple application.
Here is my testing C++ application in Visual Studio 2008 with a chart, a commander and a gantt series.
www.steema.us/files/public/support/C++AXTest.zip
Doesn't it work fine for you?
We cannot fix it until we can identify it unequivocally reproducing it in a simple application.
Here is my testing C++ application in Visual Studio 2008 with a chart, a commander and a gantt series.
www.steema.us/files/public/support/C++AXTest.zip
Doesn't it work fine for you?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Strange characters in axis labels.
No, this does not work.
I cannot upload the attachment, I get an error "Sorry, the board attachment quota has been reached."
I cannot upload the attachment, I get an error "Sorry, the board attachment quota has been reached."
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Strange characters in axis labels.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Strange characters in axis labels.
I've uploaded it (the file is called TChart_funny_charsLatest.jpg).
All I did was build the test project and run it.
Let me know if you need anything else.
Tony.
All I did was build the test project and run it.
Let me know if you need anything else.
Tony.
Re: Strange characters in axis labels.
Here is the file again.
- Attachments
-
- TChart_funny_charsLatest.jpg (22.85 KiB) Viewed 18822 times