Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Change dbChart Series programmatically

Posted on 2006-07-04
2
Medium Priority
?
1,181 Views
Last Modified: 2012-06-27
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
Comment
Question by:Marius0188
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 11

Accepted Solution

by:
calinutz earned 500 total points
ID: 17056529
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
 

Author Comment

by:Marius0188
ID: 17073133
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question