Hi,
I have to implement a custom modal dialog box to add/delete/modify the Series (along with other additional options, which are related to the project). Currently, TeeChart provides TChartEditor to edit the chart. I don't need all the options, which are provided in TChartEditor.
Could you please tell me how to implement options like add/delete/modify the Series in my custom modal dialog box ?
thanks in advance
Add options like add/delete/modifySeries in modal dialog box
Re: Add options like add/delete/modifySeries in modal dialog box
Hello,
Here you have the code we use for the Add/Remove/Change buttons in our editor:
Here you have the code we use for the Add/Remove/Change buttons in our editor:
Code: Select all
procedure TChartEditForm.BAddSeriesClick(Sender: TObject);
var tmpSeries : TChartSeries;
tmpGroup : TSeriesGroup;
begin
TabSeries.Parent:=MainPage;
tmpSeries:=LBSeries.AddSeriesGallery;
if Assigned(tmpSeries) then
begin
tmpGroup:=CurrentGroup;
if Assigned(tmpGroup) then
begin
tmpGroup.Add(tmpSeries);
LBSeries.UpdateSeries;
end;
end;
if Assigned(tmpSeries) and Assigned(tmpSeries.FunctionType) then
begin
TheSeries:=tmpSeries;
MainPage.ActivePage:=TabSeries;
SetTabSeries;
With TheFormSeries do
begin
PageSeries.ActivePage:=TabDataSource;
PageSeriesChange(Self);
CBDataSourcestyleChange(Self);
end;
end;
TrySetFocus(LBSeries);
end;
Code: Select all
procedure TChartEditForm.BDeleteSeriesClick(Sender: TObject);
begin
TabSeries.Parent:=MainPage;
LBSeries.DeleteSeries;
if Assigned(TheFormSeries) then
begin
TheFormSeries.TheSeries:=nil;
InternalSetupFormSeries;
end;
end;
Code: Select all
procedure TChartEditForm.BChangeTypeSeriesClick(Sender: TObject);
begin
LBSeries.ChangeTypeSeries(Self);
if Assigned(TheFormSeries) then InternalSetupFormSeries;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Add options like add/delete/modifySeries in modal dialog box
Yerray,
thanks for your reply.
I am not good at Delphi and my project is in VCL C++.
I am trying to understand your code and if possible please clear the below query.
what are the types of TabSeries, MainPage, TheSeries, SetTabSeries, TheFormSeries, PageSeries, TabDataSource, PageSeriesChange(Self) in your code ?
Question related to TChartListBox:
Is it possible to show the series information in multiple columns (I only use line/fast line type series.) ?
For example: [stairs or normal line type image] [series name] [units of the series data] instead of [series type image] [series title]
How to add name of the series?
Once again thanks for your reply and looking forward to hear from you.
thanks for your reply.
I am not good at Delphi and my project is in VCL C++.
I am trying to understand your code and if possible please clear the below query.
what are the types of TabSeries, MainPage, TheSeries, SetTabSeries, TheFormSeries, PageSeries, TabDataSource, PageSeriesChange(Self) in your code ?
Question related to TChartListBox:
Is it possible to show the series information in multiple columns (I only use line/fast line type series.) ?
For example: [stairs or normal line type image] [series name] [units of the series data] instead of [series type image] [series title]
How to add name of the series?
Once again thanks for your reply and looking forward to hear from you.
Re: Add options like add/delete/modifySeries in modal dialog box
Hi,
MainPage is the TPageControl that contains all the tabs like TabSeries.
TheSeries is a TChartSeries used to store the series that is selected to know it in case you want to move to the series tab.
SetTabSeries is a method we use to change to the series tab when a series has been created.
TheFormSeries is a TFormTeeSeries, the series editor.
PageSeries is a TPageControl in TFormTeeSeries where the "Format", "General", "Marks" and "Data Source" tabs are placed.
TabDataSource is a TTabSheet, the "DataSource" tab in the series editor.
PageSeriesChange() is a method in TFormTeeSeries used to change to the tab PageSeries property indicates.
Actually, you could inherit TChartListBox creating your own derived ListBox.
TabSeries is a TTabSheet, the "Series" tab in the editor.skng wrote:what are the types of TabSeries, MainPage, TheSeries, SetTabSeries, TheFormSeries, PageSeries, TabDataSource, PageSeriesChange(Self) in your code ?
MainPage is the TPageControl that contains all the tabs like TabSeries.
TheSeries is a TChartSeries used to store the series that is selected to know it in case you want to move to the series tab.
SetTabSeries is a method we use to change to the series tab when a series has been created.
TheFormSeries is a TFormTeeSeries, the series editor.
PageSeries is a TPageControl in TFormTeeSeries where the "Format", "General", "Marks" and "Data Source" tabs are placed.
TabDataSource is a TTabSheet, the "DataSource" tab in the series editor.
PageSeriesChange() is a method in TFormTeeSeries used to change to the tab PageSeries property indicates.
You can make visible/invisible some columns with the ShowSeriesIcon, ShowSeriesColor, ShowActiveCheck, ShowSeriesTitle properties, but I'm afraid you can't add new columns to the TChartListBox.skng wrote:Question related to TChartListBox:
Is it possible to show the series information in multiple columns (I only use line/fast line type series.) ?
For example: [stairs or normal line type image] [series name] [units of the series data] instead of [series type image] [series title]
Actually, you could inherit TChartListBox creating your own derived ListBox.
You can use the TChartSeries' Title property. Ie:skng wrote:How to add name of the series?
Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
for i:=0 to 2 do
with Chart1.AddSeries(TBarSeries) as TBarSeries do
begin
FillSampleValues();
Title:='MySeries ' + IntToStr(i);
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |