G
G
Ghost Doc2019-04-25 10:45:36
Delphi
Ghost Doc, 2019-04-25 10:45:36

How to implement plotting by points in TChart Delphi component?

The problem is that there is a data set and when plotting a graph using the “TFastLineSeries” class, a sawtooth graph is built, as shown in the figure https://yadi.sk/i/OCil2P3TTbOrhg, but it is necessary that an oval be built. The sequence of these points corresponds to an oval on the coordinate plane, and if you build a graph using the “TPointSeries” class, you will get it like this: https://yadi.sk/i/dVRPFYhKjJx-YQ. How to implement plotting in TChar so that an oval is built with lines between points?
Building code:

procedure TForm1.Button6Click(Sender: TObject);
var x,y: real;
begin
  Series1.Clear;
  for n := 1 to i do
  begin
    x:=a[n];
    y:=b[n];
    Series1.AddXY(x,y,'',clred);
  end;
end;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kalapanga, 2019-04-25
@kalapanga

The chart connects the dots in the order in which they appear in the series. The first from the second, the second from the third, etc. Organize the array so that the points are in the order you want.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question