Solved

Change dbChart Series programmatically

Posted on 2006-07-04
2
1,175 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 125 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month9 days, 3 hours left to enroll

615 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