TChart BUG - 2 pixel axes and grids, smudged number font
-
- Newbie
- Posts: 6
- Joined: Wed Jul 19, 2017 12:00 am
TChart BUG - 2 pixel axes and grids, smudged number font
Hello,
I think I have a bug in TChart. I am trying to have axes and grids of 1 pixel width, but they are all 2 pixels wide. I am also trying to use axes numbers with the MS Sans Serif (which is not 'smudged' like Arial), but I appear to have the smudged Arial number fonts. I am using RAD Studio XE 10.1 Berlin and VCL Chart Pro 2016.
In the Object Inspector I have put in things like
TChart1->LeftAxis->Axis->Width = 1
TChart1->LeftAxis->Grid->Width = 1
TChart1->LeftAxis->LabelsFont->Name = MS Sans Serif
but to no avail.
As shown in the attached TChart_2PixelAxesGrid_SmearedNumbers.png file, in the top panel, the non-compiled TChart in the RAD Studio development system INCORRECTLY show 2 pixel wide axes & grids, and smudged numbers that are NOT MS Sans Serif.
The middle panel shows an EARLIER compiled and run program showing the CORRECT 1 pixel wide axes & grids, and UNsmudged numbers that ARE MS Sans Serif. Note that the non-compiled TChart of this INCORRECTLY showed 2 pixel wide axes & grids, and smudged numbers that are NOT MS Sans Serif (not shown).
The bottom panel shows the LATER (current) compiled & run TChart NOW INCORRECTLY show 2 pixel wide axes & grids, and smudged numbers that are NOT MS Sans Serif.
First of all, shouldn't non-compiled TChart immediately show the axes and grid widths and LabelsFont name entered into the Object Inspector.
And second, what would cause the EARLIER program to compile & run correctly (1 pixel widths and MS Sans Serif) but not the LATER program (2 pixel widths and Arial? fonts)? Do you know of any 'magic' Object Inspector variable that can fix these problems including have the non-compiled TChart show what's in the Object Inspector.
I have made a simple program that just has a frame with just the TChart attached to the Main form (see the downloadable TChartBug_DoublePixels.zip and the TChartBug_DoublePixels_FIXED.png in the zip file). When looking at the non-compiled TChart in the RAD Studio, the TChart STILL INCORRECTLY show the 2 pixel wide axes & grids, and the smudged numbers that are NOT MS Sans Serif. But when compiled & run, as often happens with the simple programs, the simple program showed the CORRECT 1 pixel wide axes & grids, and UNsmudged numbers that ARE MS Sans Serif. I have included this code so that you could at least try and see why in the non-compiled TChart, the axes and grids are INCORRECTLY 2 pixels wide, and the numbers are NOT MS Sans Serif.
To obtain TChartBug_DoublePixels.zip, download from the following URL:
<https://fluff.bris.ac.uk/fluff/u2/anwwa ... WxwhpweX7/>
and will remain there until: Wed Aug 16 22:59:59 2017 UTC.
Sincerely,
Bill Anderson
I think I have a bug in TChart. I am trying to have axes and grids of 1 pixel width, but they are all 2 pixels wide. I am also trying to use axes numbers with the MS Sans Serif (which is not 'smudged' like Arial), but I appear to have the smudged Arial number fonts. I am using RAD Studio XE 10.1 Berlin and VCL Chart Pro 2016.
In the Object Inspector I have put in things like
TChart1->LeftAxis->Axis->Width = 1
TChart1->LeftAxis->Grid->Width = 1
TChart1->LeftAxis->LabelsFont->Name = MS Sans Serif
but to no avail.
As shown in the attached TChart_2PixelAxesGrid_SmearedNumbers.png file, in the top panel, the non-compiled TChart in the RAD Studio development system INCORRECTLY show 2 pixel wide axes & grids, and smudged numbers that are NOT MS Sans Serif.
The middle panel shows an EARLIER compiled and run program showing the CORRECT 1 pixel wide axes & grids, and UNsmudged numbers that ARE MS Sans Serif. Note that the non-compiled TChart of this INCORRECTLY showed 2 pixel wide axes & grids, and smudged numbers that are NOT MS Sans Serif (not shown).
The bottom panel shows the LATER (current) compiled & run TChart NOW INCORRECTLY show 2 pixel wide axes & grids, and smudged numbers that are NOT MS Sans Serif.
First of all, shouldn't non-compiled TChart immediately show the axes and grid widths and LabelsFont name entered into the Object Inspector.
And second, what would cause the EARLIER program to compile & run correctly (1 pixel widths and MS Sans Serif) but not the LATER program (2 pixel widths and Arial? fonts)? Do you know of any 'magic' Object Inspector variable that can fix these problems including have the non-compiled TChart show what's in the Object Inspector.
I have made a simple program that just has a frame with just the TChart attached to the Main form (see the downloadable TChartBug_DoublePixels.zip and the TChartBug_DoublePixels_FIXED.png in the zip file). When looking at the non-compiled TChart in the RAD Studio, the TChart STILL INCORRECTLY show the 2 pixel wide axes & grids, and the smudged numbers that are NOT MS Sans Serif. But when compiled & run, as often happens with the simple programs, the simple program showed the CORRECT 1 pixel wide axes & grids, and UNsmudged numbers that ARE MS Sans Serif. I have included this code so that you could at least try and see why in the non-compiled TChart, the axes and grids are INCORRECTLY 2 pixels wide, and the numbers are NOT MS Sans Serif.
To obtain TChartBug_DoublePixels.zip, download from the following URL:
<https://fluff.bris.ac.uk/fluff/u2/anwwa ... WxwhpweX7/>
and will remain there until: Wed Aug 16 22:59:59 2017 UTC.
Sincerely,
Bill Anderson
- Attachments
-
- TChartBUG_2PixelAxesGrid_SmearedNumbers.png (17.45 KiB) Viewed 24253 times
Re: TChart BUG - 2 pixel axes and grids, smudged number font
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 6
- Joined: Wed Jul 19, 2017 12:00 am
Re: TChart BUG - 2 pixel axes and grids, smudged number font
Hello Yeray,
Thanks! Changing from GDI+ back to GDI was that magic change that pretty much fixed everything. The axes and grids are now correctly 1 pixel in width, and the font is the correct MS Sans Serif.
There is just one small problem that I can't seem to fix. I want the BottomAxis numbers to be 1 pixel up towards the Bottom Axis (to have 3 pixels between top of numbers and outer tic marks rather than 4). But I just cant seem to fix this extremely simple thing.
If you changed the program in TChartBug_DoublePixels.zip (first email) from GDI+ to GDI, and then moved the BottomAxis number up from 4 pixels between top of numbers and outer tic marks to 3 pixels, that should tell me how to solve my problem for my big program.
Sincerely,
Bill Anderson
Thanks! Changing from GDI+ back to GDI was that magic change that pretty much fixed everything. The axes and grids are now correctly 1 pixel in width, and the font is the correct MS Sans Serif.
There is just one small problem that I can't seem to fix. I want the BottomAxis numbers to be 1 pixel up towards the Bottom Axis (to have 3 pixels between top of numbers and outer tic marks rather than 4). But I just cant seem to fix this extremely simple thing.
If you changed the program in TChartBug_DoublePixels.zip (first email) from GDI+ to GDI, and then moved the BottomAxis number up from 4 pixels between top of numbers and outer tic marks to 3 pixels, that should tell me how to solve my problem for my big program.
Sincerely,
Bill Anderson
-
- Newbie
- Posts: 6
- Joined: Wed Jul 19, 2017 12:00 am
Re: TChart BUG - 2 pixel axes and grids, smudged number font
Hi Yeray,
Should I submit this request for decreasing the number of pixels between the bottom axis and the top of the number under a new request? I am stacking many TCharts one on top of the other, so changing this value by only one pixel really does change the appearance from sloppy to good.
Sincerely,
Bill Anderson
Should I submit this request for decreasing the number of pixels between the bottom axis and the top of the number under a new request? I am stacking many TCharts one on top of the other, so changing this value by only one pixel really does change the appearance from sloppy to good.
Sincerely,
Bill Anderson
Re: TChart BUG - 2 pixel axes and grids, smudged number font
Hello Bill,
Maybe helps you modify the property LabelsSeparation. That controls the distance between label texts. It can be set to a low value or zero to override the calculation and behave according to the interval you have set only.
Hoping this helps.
Thanks in advance
Maybe helps you modify the property LabelsSeparation. That controls the distance between label texts. It can be set to a low value or zero to override the calculation and behave according to the interval you have set only.
Code: Select all
Eg.
Chart1->BottomAxis->LabelsSeparation := 1;
Thanks in advance
Best Regards,
Sandra Pazos / 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 |
-
- Newbie
- Posts: 6
- Joined: Wed Jul 19, 2017 12:00 am
Re: TChart BUG - 2 pixel axes and grids, smudged number font
Hi Sandra,
Unfortunately, changing Chart1->BottomAxis->LabelsSeparation to 1 (or to 0) in the ObjectInspector did not fix the problem - the number of pixels between the tic mark and the top of the numbers remained at 4 (ie did not decrease to 3).
I have included a downloadable simple program (TChartBug_NumPixels_BottomAxis_to_Numbers.zip) that shows that changing Chart1->BottomAxis->LabelsSeparation to 1 in the ObjectInspector did not fix the problem - the number of pixels between the tic mark and the top of the numbers remained at 4 (ie did not decrease to 3). - This new program is just the above TChartBug_DoublePixels.zip program but changed from GDI+ to GDI.
This new program can be downloaded from the following URL:
<https://fluff.bris.ac.uk/fluff/u3/anwwa ... 897UWAed6/>
and will remain there until: Tue Aug 15 22:59:59 2017 UTC.
I have also included a pictorial result of this program (TChartBug__NumPixels_BottomAxis_to_Numbers__GDI_LabelSep1.png - I added the red dots in Paint.exe).
Perhaps using this program to solve the problem would allow me to quickly fix this bug in my main program.
Thank you. Hope to hear from you soon.
Sincerely,
Bill Anderson
Unfortunately, changing Chart1->BottomAxis->LabelsSeparation to 1 (or to 0) in the ObjectInspector did not fix the problem - the number of pixels between the tic mark and the top of the numbers remained at 4 (ie did not decrease to 3).
I have included a downloadable simple program (TChartBug_NumPixels_BottomAxis_to_Numbers.zip) that shows that changing Chart1->BottomAxis->LabelsSeparation to 1 in the ObjectInspector did not fix the problem - the number of pixels between the tic mark and the top of the numbers remained at 4 (ie did not decrease to 3). - This new program is just the above TChartBug_DoublePixels.zip program but changed from GDI+ to GDI.
This new program can be downloaded from the following URL:
<https://fluff.bris.ac.uk/fluff/u3/anwwa ... 897UWAed6/>
and will remain there until: Tue Aug 15 22:59:59 2017 UTC.
I have also included a pictorial result of this program (TChartBug__NumPixels_BottomAxis_to_Numbers__GDI_LabelSep1.png - I added the red dots in Paint.exe).
Perhaps using this program to solve the problem would allow me to quickly fix this bug in my main program.
Thank you. Hope to hear from you soon.
Sincerely,
Bill Anderson
- Attachments
-
- TChartBug__NumPixels_BottomAxis_to_Numbers__GDI_LabelSep1.png (7.11 KiB) Viewed 24188 times
Re: TChart BUG - 2 pixel axes and grids, smudged number font
Hello Bill,
Many thanks for the project.
After reviewing your project. I think can help you, change LabelText MarginToAxis value to 0. The line below shows you how can do that:
Could you confirm us if the code works in your end?
Thanks in advance
Many thanks for the project.
After reviewing your project. I think can help you, change LabelText MarginToAxis value to 0. The line below shows you how can do that:
Code: Select all
TChartCalcX->Axes->Bottom->Texts->MarginToAxis = 0;
Thanks in advance
Best Regards,
Sandra Pazos / 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 |
-
- Newbie
- Posts: 6
- Joined: Wed Jul 19, 2017 12:00 am
Re: TChart BUG - 2 pixel axes and grids, smudged number font
Hi Sandra,
Yes, when I put
TChartCalcX->Axes->Bottom->Texts->MarginToAxis = 0;
into the frame constructor, it decreased the number of pixels between the BottomAxis tic marks and the top of the numbers from 4 to 3. And this occurred in both the Project I sent you and in my main program. So this problem is solved.
There is only one more problem I have encountered with moving from GDIplus back to GDI in the TCharts of my main program. (I could start another thread, but I decided not to because it is the result of going from GDI to GDIplus and back to GDI.)
A long time ago, when I went from GDI to GDIplus, I had to add (or it was automatically added - cant remember) this line of code to many of my *.h files.
#include <VclTee.TeeGDIPlus.hpp>
This included being in my Main_Form.h file, and my Main_Form.h file is included in most of my *.cpp files. Thus when my main program was compiled, this led to a bunch of compiler Warining W8080 messages that I had to put up with for EACH *.cpp file with #include <VclTee.TeeGDIPlus.hpp> or Main_Form.h in it. For example, when compiling Main_Form.cpp I got
bcc32 command line for "Main_Form.cpp"
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::FlatnessDefault' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericSansSerifFontFamily' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericSerifFontFamily' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericMonospaceFontFamily' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericSansSerifFontFamilyBuffer' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericSerifFontFamilyBuffer' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericMonospaceFontFamilyBuffer' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericTypographicStringFormatBuffer' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericDefaultStringFormatBuffer' is declared but never used
For the time being I just put up with these superfluous messages.
However, after I switched from GDIplus back to GDI I still got these W8080 messages. I managed to remove the line #include <VclTee.TeeGDIPlus.hpp> from all my *.cpp files but one file - Main_Form.h.
When I would manually comment it out of Main_Form.h, then when I compiled Main_Form.cpp, one of the first things that happened was that the #include <VclTee.TeeGDIPlus.hpp> line would REAPPEAR
and all the
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::FlatnessDefault' is declared but never used
...
etc messages would REAPPEAR!!!!!
How can I get my program to stop loading this line #include <VclTee.TeeGDIPlus.hpp> automatically into Main_Form.h? And why is it doing this when I think I have changed all my TCharts from GDIplus back to GDI?
Does it mean that I still have some GDIplus stuff in my program. And if so, do you have any idea where? I want to get all of this GDIplus stuff out like it was before I moved from GDI to GDIplus.
Sincerely,
Bill
Yes, when I put
TChartCalcX->Axes->Bottom->Texts->MarginToAxis = 0;
into the frame constructor, it decreased the number of pixels between the BottomAxis tic marks and the top of the numbers from 4 to 3. And this occurred in both the Project I sent you and in my main program. So this problem is solved.
There is only one more problem I have encountered with moving from GDIplus back to GDI in the TCharts of my main program. (I could start another thread, but I decided not to because it is the result of going from GDI to GDIplus and back to GDI.)
A long time ago, when I went from GDI to GDIplus, I had to add (or it was automatically added - cant remember) this line of code to many of my *.h files.
#include <VclTee.TeeGDIPlus.hpp>
This included being in my Main_Form.h file, and my Main_Form.h file is included in most of my *.cpp files. Thus when my main program was compiled, this led to a bunch of compiler Warining W8080 messages that I had to put up with for EACH *.cpp file with #include <VclTee.TeeGDIPlus.hpp> or Main_Form.h in it. For example, when compiling Main_Form.cpp I got
bcc32 command line for "Main_Form.cpp"
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::FlatnessDefault' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericSansSerifFontFamily' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericSerifFontFamily' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericMonospaceFontFamily' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericSansSerifFontFamilyBuffer' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericSerifFontFamilyBuffer' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericMonospaceFontFamilyBuffer' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericTypographicStringFormatBuffer' is declared but never used
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::GenericDefaultStringFormatBuffer' is declared but never used
For the time being I just put up with these superfluous messages.
However, after I switched from GDIplus back to GDI I still got these W8080 messages. I managed to remove the line #include <VclTee.TeeGDIPlus.hpp> from all my *.cpp files but one file - Main_Form.h.
When I would manually comment it out of Main_Form.h, then when I compiled Main_Form.cpp, one of the first things that happened was that the #include <VclTee.TeeGDIPlus.hpp> line would REAPPEAR
and all the
[bcc32 Warning] Main_Form.cpp(22582): W8080 'Gdiplus::FlatnessDefault' is declared but never used
...
etc messages would REAPPEAR!!!!!
How can I get my program to stop loading this line #include <VclTee.TeeGDIPlus.hpp> automatically into Main_Form.h? And why is it doing this when I think I have changed all my TCharts from GDIplus back to GDI?
Does it mean that I still have some GDIplus stuff in my program. And if so, do you have any idea where? I want to get all of this GDIplus stuff out like it was before I moved from GDI to GDIplus.
Sincerely,
Bill
Re: TChart BUG - 2 pixel axes and grids, smudged number font
Hello Bill,
The Line is charged because maybe by default the Chart is in GDIplus. The easy way to solve the behaviour is go to Chart Design Time view and change it by editor. To do it follow the steps below:
1- Go to design time view
2- Do click with right button and open Chart Editor
3- Go to Chart->3D->Render tab and change GDIPlus to GDI
4- Remove all the references to <VclTee.TeeGDIPlus.hpp> from your .h and .cpp files.
5- Save the project and compile it again.
Could you confirm us if the problem is solved?
Thanks in advance
The Line is charged because maybe by default the Chart is in GDIplus. The easy way to solve the behaviour is go to Chart Design Time view and change it by editor. To do it follow the steps below:
1- Go to design time view
2- Do click with right button and open Chart Editor
3- Go to Chart->3D->Render tab and change GDIPlus to GDI
4- Remove all the references to <VclTee.TeeGDIPlus.hpp> from your .h and .cpp files.
5- Save the project and compile it again.
Could you confirm us if the problem is solved?
Thanks in advance
Best Regards,
Sandra Pazos / 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 |
-
- Newbie
- Posts: 6
- Joined: Wed Jul 19, 2017 12:00 am
Re: TChart BUG - 2 pixel axes and grids, smudged number font
Hi Sandra,
All the problems in this thread have been solved.
The cause of the last bug turned out to be a TChart hidden on a normally unused hidden tabsheet. Removing this TChart and removing all the references to <VclTee.TeeGDIPlus.hpp> fixed the problem.
Many Thanks.
Sincerely,
Bill Anderson
All the problems in this thread have been solved.
The cause of the last bug turned out to be a TChart hidden on a normally unused hidden tabsheet. Removing this TChart and removing all the references to <VclTee.TeeGDIPlus.hpp> fixed the problem.
Many Thanks.
Sincerely,
Bill Anderson
Re: TChart BUG - 2 pixel axes and grids, smudged number font
Hello Bill,
Good news! I'm glad the problems you was experiencing have been solved. Thanks to inform us about these.
Thanks in advance
Good news! I'm glad the problems you was experiencing have been solved. Thanks to inform us about these.
Thanks in advance
Best Regards,
Sandra Pazos / 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 |