Using the TeeGalleryPanel
-
- Newbie
- Posts: 59
- Joined: Fri May 28, 2004 4:00 am
- Location: Sweden
Using the TeeGalleryPanel
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
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
-
- Newbie
- Posts: 11
- Joined: Mon Mar 08, 2004 5:00 am
- Contact:
-
- Newbie
- Posts: 59
- Joined: Fri May 28, 2004 4:00 am
- Location: Sweden
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
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
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Rob,
This can't be done, the subgallery series depend on each parentseries with some coding variations applied to get each subseries.
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 |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |
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;
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;
-
- Newbie
- Posts: 59
- Joined: Fri May 28, 2004 4:00 am
- Location: Sweden
Excellent
Sweet coding!!!
/Johan
/Johan