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 1096 - Polar draws a point at coordinates origin
Summary: Polar draws a point at coordinates origin
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: 140923
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-22 05:26 EST by narcís calvet
Modified: 2015-03-25 09:51 EDT (History)
1 user (show)

See Also:
Chart Series: Polar
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description narcís calvet 2015-01-22 05:26:58 EST
This can be reproduced with this code:

uses TeePolar;

procedure TForm1.FormCreate(Sender: TObject);
var
  Series1 : TPolarSeries;
  i : Integer;
begin
  Series1:=TPolarSeries.Create(Self);
  Series1.Pointer.Visible:=False;
  Series1.Brush.Style:=bsClear;

  for i:=0 to 359 do
    Series1.AddPolar(i+10, 0);

  Chart1.Axes.Left.SetMinMax(-1, 1);
  Chart1.Axes.Bottom.SetMinMax(-1, 1);
  Chart1.View3D:=False;
  Chart1.AddSeries(Series1);
end;

It works fine with TeeChart.NET:

      Steema.TeeChart.Styles.Polar polar1 = new Steema.TeeChart.Styles.Polar(tChart1.Chart);

      polar1.Pointer.Visible = false;
      polar1.Brush.Visible = false;
      polar1.Pen.Color = Color.Red;
      polar1.Pen.Width = 3;

      for (int i = 0; i < 360; i++)
      {
        polar1.Add(i + 10, 0);
      }

      tChart1.Aspect.View3D = false;
      tChart1.Axes.Left.SetMinMax(-1, 1);
      tChart1.Axes.Bottom.SetMinMax(-1, 1);
Comment 1 narcís calvet 2015-03-25 07:53:12 EDT
The problem is the code snippet below at the end of TCustomPolarSeries.InternalDrawValue in TeePolar.pas.

      if FirstValueIndex<>LastValueIndex then
      begin
        OldX:=CalcXPos(0);
        OldY:=CalcYPos(0);

        if (OldX<>CircleXCenter) or (OldY<>CircleYCenter) then
        begin
          MoveTo3D(CircleXCenter,CircleYCenter,StartZ);
          LineTo3D(OldX,OldY,StartZ);
        end;
      end;
Comment 2 narcís calvet 2015-03-25 08:27:18 EDT
There's also a problem with the line below at TCustomPolarSeries.InternalDrawValue in TeePolar.pas.

      LineTo3D(CircleXCenter,CircleYCenter,StartZ);

Which should be

      LineTo3D(X,Y,StartZ);