Page 1 of 1
Using the TeeGalleryPanel
Posted: Fri Aug 06, 2004 10:27 am
by 9232649
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
Posted: Mon Aug 09, 2004 3:11 am
by 9336072
with ChartGalleryPanel1 do
begin
NumCols := 3;
NumRows := 2;
CreateChartList([TFastLineSeries, TFastLineSeries, TCandleSeries,
TCandleSeries, TCandleSeries, TCandleSeries]);
end;
Posted: Mon Aug 09, 2004 5:21 pm
by 9232649
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
Posted: Tue Jan 11, 2005 1:45 pm
by 9339850
I'm interested to know how to do this as well. Did anyone ever respond with a solution?
Thanks,
Rob
Posted: Tue Jan 11, 2005 2:25 pm
by narcis
Hi Rob,
This can't be done, the subgallery series depend on each parentseries with some coding variations applied to get each subseries.
Posted: Tue Jan 11, 2005 4:50 pm
by 9339850
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
Posted: Wed Jan 12, 2005 2:36 pm
by narcis
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.
Posted: Wed Jan 12, 2005 2:46 pm
by 9339850
OK, Thanks.
Posted: Sat Jan 15, 2005 4:26 pm
by 9339850
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
Posted: Sat Jan 15, 2005 6:41 pm
by 9339850
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;
Excellent
Posted: Thu May 26, 2005 10:47 am
by 9232649
Sweet coding!!!
/Johan