TPieSeries
TPieSeries
TeeChart Pro v2014, XE3 Builder
I have a strange problem with new VCL version.
Using GDI, default view, 3D turned off
Clear the series, then add a number of series at runtime, setting each color directly.
The first color is defined as clRed. This is also the biggest slice.
This slice displays as black on the pie, though the mark symbol color is correctly set as red. The other slices are the correct colors.
If I turn on 3D, the pie slice turns red. Turn off 3D, the slice turns black.
If I explode the biggest slice, a red slice moves out from underneath the black slice. Apparently this slice is behind a black background.
With 3D turned on, but Views set to 2D, red slice moves behind black background.
If I change the data (in the editor) so another slice is the biggest, this one explodes correctly with the colored slice in front of the black background.
All other slices behave as expected.
Selecting GDI+ seems to fix the problem, but the background is now transparent (or there is no background).
OpenGL is available in the chart editor during design time (but not at runtime). I get an access violation at 0 if I select OpenGL.
How do I programmatically set TextQuality under 3D GDI ?
thanks
K
I have a strange problem with new VCL version.
Using GDI, default view, 3D turned off
Clear the series, then add a number of series at runtime, setting each color directly.
The first color is defined as clRed. This is also the biggest slice.
This slice displays as black on the pie, though the mark symbol color is correctly set as red. The other slices are the correct colors.
If I turn on 3D, the pie slice turns red. Turn off 3D, the slice turns black.
If I explode the biggest slice, a red slice moves out from underneath the black slice. Apparently this slice is behind a black background.
With 3D turned on, but Views set to 2D, red slice moves behind black background.
If I change the data (in the editor) so another slice is the biggest, this one explodes correctly with the colored slice in front of the black background.
All other slices behave as expected.
Selecting GDI+ seems to fix the problem, but the background is now transparent (or there is no background).
OpenGL is available in the chart editor during design time (but not at runtime). I get an access violation at 0 if I select OpenGL.
How do I programmatically set TextQuality under 3D GDI ?
thanks
K
Re: TPieSeries
Hello,
But the result looks correct to me:
Please, try to arrange a simple example project we can run as-is to reproduce the problem here.
I've made a simple example with C++Builder XE7 and TeeChart Pro v2014.12 trying to reproduce this:kmanuele wrote:Using GDI, default view, 3D turned off
Clear the series, then add a number of series at runtime, setting each color directly.
The first color is defined as clRed. This is also the biggest slice.
This slice displays as black on the pie, though the mark symbol color is correctly set as red. The other slices are the correct colors.
If I turn on 3D, the pie slice turns red. Turn off 3D, the slice turns black.
Code: Select all
void __fastcall TForm1::FormCreate(TObject *Sender)
{
this->Caption = TeeMsg_Version;
TTeeCanvas3D * teeCanvas3D = new TTeeCanvas3D();
Chart1->Canvas=teeCanvas3D;
Chart1->View3D=false;
TPieSeries * pie1 = new TPieSeries(Chart1);
Chart1->AddSeries(pie1);
pie1->FillSampleValues();
int maxIndex = 0;
for (int i=1; i<pie1->Count(); i++)
if (pie1->YValue[i]>pie1->YValue[maxIndex])
maxIndex = i;
pie1->ValueColor[maxIndex]=clRed;
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: TPieSeries
Hello,
I've tried the same above with XE3 and TeeChart Pro v2014.12. It also seems to work fine for me here.
And the pragma link in the .cpp:
http://www.teechart.net/support/viewtop ... 489#p66489
I've tried the same above with XE3 and TeeChart Pro v2014.12. It also seems to work fine for me here.
Of course I can't reproduce this second part either.kmanuele wrote:If I explode the biggest slice, a red slice moves out from underneath the black slice. Apparently this slice is behind a black background.
With 3D turned on, but Views set to 2D, red slice moves behind black background.
If I change the data (in the editor) so another slice is the biggest, this one explodes correctly with the colored slice in front of the black background.
All other slices behave as expected.
Add the include in the .h:kmanuele wrote:OpenGL is available in the chart editor during design time (but not at runtime). I get an access violation at 0 if I select OpenGL.
Code: Select all
#include <VCLTee.TeeOpenGL.hpp>
Code: Select all
#pragma link "VCLTee.TeeOpenGL"
Here you have a Delphi example where this is being done:kmanuele wrote:How do I programmatically set TextQuality under 3D GDI ?
http://www.teechart.net/support/viewtop ... 489#p66489
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: TPieSeries
Thanks for the responses.
I found the source of the problem: make one of your values 0, or a very low number:
Pie1->Clear();
Pie1->Gradient->Visible = false;
Pie1->Marks->Visible = true;
Pie1->AutoMarkPosition = true;
Pie1->Marks->Shadow->Visible = false;
Pie1->Marks->Symbol->Shadow->Visible = false;
Pie1->Circled = true;
Pie1->PieValues->Order = loNone;
Pie1->Marks->Style = smsLabelValue;
Pie1->ValueFormat = "#0.#####";
Chart1->View3D = false;
Chart1->Legend->Visible = false;
Pie1->Add(400.0, "red", clRed);
Pie1->Add(120.32, "green", clGreen);
Pie1->Add(231.89, "blue", clBlue);
Pie1->Add(16.12, "yellow", clYellow);
Pie1->Add(3.20088, "aqua", clAqua);
Pie1->Add(0.31345, "purple", clPurple);
Pie1->Add(0.0001, "black", clBlack);
I found the source of the problem: make one of your values 0, or a very low number:
Pie1->Clear();
Pie1->Gradient->Visible = false;
Pie1->Marks->Visible = true;
Pie1->AutoMarkPosition = true;
Pie1->Marks->Shadow->Visible = false;
Pie1->Marks->Symbol->Shadow->Visible = false;
Pie1->Circled = true;
Pie1->PieValues->Order = loNone;
Pie1->Marks->Style = smsLabelValue;
Pie1->ValueFormat = "#0.#####";
Chart1->View3D = false;
Chart1->Legend->Visible = false;
Pie1->Add(400.0, "red", clRed);
Pie1->Add(120.32, "green", clGreen);
Pie1->Add(231.89, "blue", clBlue);
Pie1->Add(16.12, "yellow", clYellow);
Pie1->Add(3.20088, "aqua", clAqua);
Pie1->Add(0.31345, "purple", clPurple);
Pie1->Add(0.0001, "black", clBlack);
Re: TPieSeries
Hello,
I'm afraid I have to confirm this is the well known and difficult to solve problem with the TPieSeries in some situations.
It's not a trivial problem that would probably need a complete redesign of the series to be fixed.
The only workarounds I can think on at the moment is to switch to GDIPlus or to make the chart 3D:
http://bugs.teechart.net/show_bug.cgi?id=935
http://bugs.teechart.net/show_bug.cgi?id=939
I'm afraid I have to confirm this is the well known and difficult to solve problem with the TPieSeries in some situations.
It's not a trivial problem that would probably need a complete redesign of the series to be fixed.
The only workarounds I can think on at the moment is to switch to GDIPlus or to make the chart 3D:
Code: Select all
Chart1->View3D = true;
Chart1->Chart3DPercent = 1;
Chart1->View3DOptions->Elevation = 360;
http://bugs.teechart.net/show_bug.cgi?id=939
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: TPieSeries
Thanks for the confirmation. I did not see this problem with 2012 VCL with same code and pie values.
I have solved the problem by controlling what values are added to the series.
K
I have solved the problem by controlling what values are added to the series.
K
Re: TPieSeries
re: the Delphi code to set font quality in GDI programmatically, this doesn't seem to work in C++
I like the look of ClearType at smaller fonts
This is what I am trying:
gdic = new TTeeCanvas3D();
gdic->FontQuality = fqClearType;
Chart1->Canvas = gdic;
but FontQuality is declared private, and not accessible
Canvas->Font->Quality is accessible, but has no effect.
Can you help?
thanks for all the support
Kevin
I like the look of ClearType at smaller fonts
This is what I am trying:
gdic = new TTeeCanvas3D();
gdic->FontQuality = fqClearType;
Chart1->Canvas = gdic;
but FontQuality is declared private, and not accessible
Canvas->Font->Quality is accessible, but has no effect.
Can you help?
thanks for all the support
Kevin
Re: TPieSeries
Hello Kevin,
In BCB it's a bit different.
Find attached a simple demo. We'll consider making Canvas->FontQuality public.
In BCB it's a bit different.
Find attached a simple demo. We'll consider making Canvas->FontQuality public.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: TPieSeries
Your code works as intended.
Thank you !
Kevin
Thank you !
Kevin