Good morning
I use DBChart to access data from a database and/or a memory table, using XValues, YValues and DataSource in TSeries. Now I wish to add a series with the data either in an array or from calculations. Is there a straightforward way to do this, or do I have to populate a memory table with the data points?
Thank you for your attention
Regards
Errol
Using DBChart with text data
Re: Using DBChart with text data
Hello Errol,
Yes, you could use code similar to this:
You could send x and y arrays to the method:
ie.
Regards,
Marc
Yes, you could use code similar to this:
Code: Select all
var vals : array of double;
i : Integer;
begin
SetLength(vals, 8);
for i := 0 to 7 do
vals[i] := Random(10);
Series1.AddArray(vals);
end;
ie.
Code: Select all
Series1.AddArray(xVals,yVals);
Marc
Steema Support
Re: Using DBChart with text data
Hi Marc
Thanks for the solution to my problem. However, I am trying to plot a closed polygon, and I can only plot values in an increasing-X direction. How can I plot the data in array index order.
Thanks and regards
Errol
Thanks for the solution to my problem. However, I am trying to plot a closed polygon, and I can only plot values in an increasing-X direction. How can I plot the data in array index order.
Thanks and regards
Errol
Re: Using DBChart with text data
Hello Errol,
It sounds like the ValueList Order may be what you need here.
Before you add the data, set:
Regards,
Marc
It sounds like the ValueList Order may be what you need here.
Before you add the data, set:
Code: Select all
Series1.XValues.Order := loNone;
Series1.YValues.Order := loNone;
Marc
Steema Support
Re: Using DBChart with text data
Thanks Marc
That did the trick. I had set the Orders, but after I had loaded the data.
Best regards
Errol
That did the trick. I had set the Orders, but after I had loaded the data.
Best regards
Errol