• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1194
  • Last Modified:

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!
0
Marius0188
Asked:
Marius0188
1 Solution
 
calinutzCommented:
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now