Hi I am quite a newbie with charting end definitely with TeeChart. I need to create a chart as per the included image but have no idea how to approach it. I have investigated XY plots as well as polar plots but am not able to create this.
Regards and stay safe.
Some guidance will be appreciatedDifficulty with creating special chart.
Re: Difficulty with creating special chart.
Hello,
Here a simple example using ColorLineTools for the green lines and manually drawing the circles at OnBeforeDrawSeries event:
Here a simple example using ColorLineTools for the green lines and manually drawing the circles at OnBeforeDrawSeries event:
Code: Select all
uses Series, VCLTee.TeeTools;
procedure TForm1.Chart1BeforeDrawSeries(Sender: TObject);
const radius: array of Double=[3.9, 7.5, 11, 14.5];
var i, x, y, w, h: Integer;
begin
for i:=0 to High(radius) do
begin
with Chart1.Canvas do
begin
Brush.Clear;
Pen.Color:=clBlack;
Pen.Width:=1;
Pen.Style:=psDot;
with Chart1.Axes do
Ellipse(Bottom.CalcPosValue(radius[i]), Left.CalcPosValue(radius[i]),
Bottom.CalcPosValue(-radius[i]), Left.CalcPosValue(-radius[i]));
end;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=False;
Chart1.Legend.Hide;
Chart1.Axes.Left.SetMinMax(-16,16);
Chart1.Axes.Bottom.SetMinMax(-16,16);
with TColorLineTool(Chart1.Tools.Add(TColorLineTool)) do
begin
Axis:=Chart1.Axes.Left;
Pen.Color:=clGreen;
Pen.Width:=2;
Value:=0;
end;
with TColorLineTool(Chart1.Tools.Add(TColorLineTool)) do
begin
Axis:=Chart1.Axes.Bottom;
Pen.Color:=clGreen;
Pen.Width:=2;
Value:=0;
end;
with TPointSeries(Chart1.AddSeries(TPointSeries)) do
begin
Pointer.Size:=2;
Pointer.Style:=psCircle;
AddXY(-7.5,-7);
AddXY(14.5, 14.5);
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |