Using the TeeGalleryPanel

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Johan Ingemansson
Newbie
Newbie
Posts: 59
Joined: Fri May 28, 2004 4:00 am
Location: Sweden

Using the TeeGalleryPanel

Post by Johan Ingemansson » Fri Aug 06, 2004 10:27 am

Hi,

I want to create a TeeGalleryPanel, but I only want to display some of the SubCharts, are there any way to access specific subcharts from the "standard" gallery? I´m using TeeChartPro version 7.01 without source code.

Regards

Johan Ingemansson

Jilonger.Xusen
Newbie
Newbie
Posts: 11
Joined: Mon Mar 08, 2004 5:00 am
Contact:

Post by Jilonger.Xusen » Mon Aug 09, 2004 3:11 am

with ChartGalleryPanel1 do
begin
NumCols := 3;
NumRows := 2;
CreateChartList([TFastLineSeries, TFastLineSeries, TCandleSeries,
TCandleSeries, TCandleSeries, TCandleSeries]);
end;

Johan Ingemansson
Newbie
Newbie
Posts: 59
Joined: Fri May 28, 2004 4:00 am
Location: Sweden

Post by Johan Ingemansson » Mon Aug 09, 2004 5:21 pm

Thank you for your response,

the code above gives me the "Standard" graphs with the possibility for the user to click and change the graph type, in the subgallery. What I want to do is only display for example with TBarDiagram, one grouped bar diagram. I can supress the subgallery with the property "DisplaySub", but I can´t access the subgallery, I want the grouped bar diagram, or can I? I have tried to manipulate the series in the ChartGallery, but even if I replace the series with series created by me, with the property MultiBar:=mbGrouped, the GalleryChart doesn´t change!! I would be grateful for ideas what to do.

Best Regards,

Johan Ingemansson

Rob
Newbie
Newbie
Posts: 14
Joined: Thu Nov 11, 2004 5:00 am

Post by Rob » Tue Jan 11, 2005 1:45 pm

I'm interested to know how to do this as well. Did anyone ever respond with a solution?

Thanks,

Rob

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jan 11, 2005 2:25 pm

Hi Rob,

This can't be done, the subgallery series depend on each parentseries with some coding variations applied to get each subseries.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Rob
Newbie
Newbie
Posts: 14
Joined: Thu Nov 11, 2004 5:00 am

Post by Rob » Tue Jan 11, 2005 4:50 pm

Narcís,

Thanks for the response.

I have the source code so would you please give an example of how to exclude a "subseries."

Thanks,

Rob

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jan 12, 2005 2:36 pm

Hi Rob,

I'm sorry but Steema Support can't give advice on modifications to TeeChart sourcecode. Perhaps someone out there has experience with trying this modification? To investigate you might like to check the use of the TChartGalleryPanel class and CreateSubGallery method.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Rob
Newbie
Newbie
Posts: 14
Joined: Thu Nov 11, 2004 5:00 am

Post by Rob » Wed Jan 12, 2005 2:46 pm

OK, Thanks.

Rob
Newbie
Newbie
Posts: 14
Joined: Thu Nov 11, 2004 5:00 am

Post by Rob » Sat Jan 15, 2005 4:26 pm

How might I set the subseries of the gallery if I know the subindex?

ChartGalleryPanel.SelectChart := AChart;
//Do something to Set the subseries index

Thanks,

Rob

Rob
Newbie
Newbie
Posts: 14
Joined: Thu Nov 11, 2004 5:00 am

Post by Rob » Sat Jan 15, 2005 6:41 pm

For those who care this is how I did it:

type
TSeriesAccess=class(TChartSeries);
TChartGalleryAccess=class(TChartGalleryPanel);
...
//In my gallery this selects the TLineSeries Chart Type with a subindex of 5

procedure TForm1.Button2Click(Sender: TObject);
var
CN, SN: Integer;
begin
ChartGalleryPanel.SelectChart( ChartGalleryPanel.Charts[8]);
ChartGalleryPanel.SelectedSeries := ChartGalleryPanel.SelectedChart.Series[0];
ChartGalleryPanel.OnChangeChart := Nil;
TChartGalleryAccess(ChartGalleryPanel).FindSelectedChart;
for SN := 0 to ChartGalleryPanel.SelectedChart.SeriesCount-1 do
begin
TSeriesAccess(ChartGalleryPanel.SelectedChart.Series[SN]).SetSubGallery(
ChartGalleryPanel.SelectedChart.Series[SN],5);
end;

TChartGalleryAccess(ChartGalleryPanel).ShowSelectedChart;
ChartGalleryPanel.ResizeCharts;
ChartGalleryPanel.OnChangeChart := ChartGalleryPanelChangeChart;
end;

Johan Ingemansson
Newbie
Newbie
Posts: 59
Joined: Fri May 28, 2004 4:00 am
Location: Sweden

Excellent

Post by Johan Ingemansson » Thu May 26, 2005 10:47 am

Sweet coding!!!

:D

/Johan

Post Reply