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

Summary: Polar draws a point at coordinates origin
Product: VCL TeeChart Reporter: narcís calvet <narcis>
Component: SeriesAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: normal CC: tj
Priority: High    
Version: 140923   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: http://www.teechart.net/support/viewtopic.php?f=3&t=15381&p=68246#p68246
Chart Series: Polar Delphi / C++ Builder RAD IDE Version:

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);