Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 1961 - Donut series chart displays values incorrectly (GDI rendering), v. 2017.23.171221 VCL
Summary: Donut series chart displays values incorrectly (GDI rendering), v. 2017.23.17...
Status: RESOLVED WORKSFORME
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Chart (show other bugs)
Version: 23.171221
Hardware: PC Windows
: High critical
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-02 08:44 EST by trubetskov
Modified: 2021-04-20 11:11 EDT (History)
3 users (show)

See Also:
Chart Series: Donut
Delphi / C++ Builder RAD IDE Version: RAD 10.2 Tokyo


Attachments
Screenshots of the demo with GDI+ ON and OFF (282.13 KB, application/x-zip-compressed)
2018-02-22 13:08 EST, trubetskov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description trubetskov 2018-01-02 08:44:08 EST
Donut chart represents values incorrectly (GDI rendering only!) due to extra transformation from Degrees to Radians.

In the function TTeeCanvas3D.Donut in version 23.171221 you introduced an additional transformation from Degrees to Radians: 

  CalcPoint(DegToRad(StartAngle),x3,y3);
  CalcPoint(DegToRad(EndAngle),x4,y4);

In the previous version in this place we had:

  CalcPoint(StartAngle,x3,y3);
  CalcPoint(EndAngle,x4,y4);

As the result in GDI case rendering donut charts are very strangely looking!

Regards,
   Michael
Comment 1 trubetskov 2018-01-02 08:46:00 EST
I cannot enter the most recent version number in Bugzilla! This selection is unavailable!
Comment 2 sandra pazos 2018-02-22 10:46:59 EST
Hello Michael, 

Could you attached a simple code because we can reproduce the problem? Also, would be helpful if you can attach images to see the different behaviour between versions. 

Thanks for your colaboration,
Regards.
Comment 3 trubetskov 2018-02-22 13:08:23 EST
Created attachment 815 [details]
Screenshots of the demo with GDI+ ON and OFF

I attached 2 screenshots from your demo. Please, pay special attention to GDI+ setting and 3D = OFF. When GDI+ = OFF, the transformation from Degrees to Radians is obviously applied one extra time!

Regards,
   Michael
Comment 4 sandra pazos 2018-02-23 05:03:28 EST
Hello Michael,

Many thanks for the information. Finally, we can reproduce the problem turning off the 3D View as you have indicated. I have added a simple code to reproduce in easy way the problem: 

 uses TeCanvas;
procedure TForm3.FormCreate(Sender: TObject);
begin
   Chart1.View3D := false;
   Series1.FillSampleValues(4);
   gdi.Checked := True;
end;
procedure TForm3.GDIClick(Sender: TObject);
begin
       if gdi.Checked then
          Chart1.Canvas := TGDIPlusCanvas.Create
        else
          Chart1.Canvas:=TTeeCanvas3D.Create;
end;
Comment 5 trubetskov 2018-03-31 05:37:25 EDT
This bug is not fixed in the new release v.2018.24.180321

Very strange and disappointing! 

-Michael
Comment 6 marc meumann 2021-04-20 11:11:02 EDT
Not reproducible in latest version.