Change dbChart Series programmatically

Dear Experts,

I need example code to show me how to change a TDBChart's Series for example from
TLineSeries to TFastLineSeries.

Thanks in advance!
Marius0188Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
calinutzConnect With a Mentor Commented:
As simple as this....

procedure TForm1.Button2Click(Sender: TObject);
var s: TChartSeries;
begin
s:=DBChart1.Series[0];
ChangeSeriesType( s, TFastLineSeries);
DBChart1.Refresh;
end;


Regards
0
 
Marius0188Author Commented:
Hi there,

Thanks the code seem to work.
I have a couple of TLineSeries charts.

So what I do is looping through all of them and then use your
code to change the SeriesType accordingly.

But one problem I experience though.
When changing the lineseries type it also change the color of all Series' to yellow.
I need it to remember my chart series color.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.