How do I activate the scrollbar in a legend at runtime?
How do I change the position of the legend - do I need to use custom postion?
When I add a scrollbar and another legend in the tools menu and set the active property to true I get a constant flicker and the scrollbar does not work.
Thanks
Legends
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi,
Please have a look at the snippet below which shows you how to create TLegendScrollBar at run-time. It also adds an extra legend which doesn't behave as you reported. Could you please test if this code works for you? Which TeeChart version are you using?
Please have a look at the snippet below which shows you how to create TLegendScrollBar at run-time. It also adds an extra legend which doesn't behave as you reported. Could you please test if this code works for you? Which TeeChart version are you using?
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
i: Integer;
LegendScroll: TLegendScrollBar;
ExtraLegend: TExtraLegendTool;
begin
LegendScroll:=TLegendScrollBar.Create(self);
LegendScroll.ParentChart:=Chart1;
ExtraLegend:=TExtraLegendTool.Create(self);
ExtraLegend.Series:=Chart1[0];
//or
// Chart1.Tools.Add(TExtraLegendTool.Create(self));
// (Chart1.Tools.Items[0] as TExtraLegendTool).Series:=Series1;
// Chart1.Tools.Add(TLegendScrollBar.Create(self));
for i:=0 to Chart1.SeriesCount-1 do Chart1[i].FillSampleValues();
end;
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 |
LegendScrollbar
Code works in as much as it creates the scrollbar but it is still not active even though I set the active property to true.
Anyway of setting the position of the legend without using custom position, can I set it to either top, bottom, right or left at runtime which you can do at design time.
Thanks
Anyway of setting the position of the legend without using custom position, can I set it to either top, bottom, right or left at runtime which you can do at design time.
Thanks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi,
This is most likely because you don't have enough items to the legend so it already fits on your chart area and it's not worth scrolling. You could also try doing something similar to what it's done at "Scrolling legend" example at the TeeChart features demo (All Features\ Welcome!\ Miscellaneous\ Legend), available at the TeeChart program group.Code works in as much as it creates the scrollbar but it is still not active even though I set the active property to true.
Sorry, I forgot to answer that before. You can use:Anyway of setting the position of the legend without using custom position, can I set it to either top, bottom, right or left at runtime which you can do at design time.
Code: Select all
Chart1.Legend.Alignment:=laTop;
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 |
There are 40+ bars on the graph but only 29 items in the legend hence the need for a scroll bar in the legend. The following code is used to create the scrollbar:
LegendScroll:=TLegendScrollBar.Create(self);
LegendScroll.ParentChart:=Form2.QrChart1.chart;
LegendScroll.Active:=True;
Doesn't matter whether I create this at design time or runtime the scrollbar is still inactive.
Thanks
LegendScroll:=TLegendScrollBar.Create(self);
LegendScroll.ParentChart:=Form2.QrChart1.chart;
LegendScroll.Active:=True;
Doesn't matter whether I create this at design time or runtime the scrollbar is still inactive.
Thanks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi,
Could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
BTW: Which TeeChart version are you using?
Could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
BTW: Which TeeChart version are you using?
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 |
Viewing over multiple pages
Hi
I am using QuickReport and the QrChart Component to view the data. I would like to see a limit to the number of points per page - 10. I set the points per page property in the paging tab and this works but I only see one page. I have added a TChartPageNavigator and set the Chart property to the Chart Component but no joy. Please tell me what I'm doing wrong!
I am using QuickReport and the QrChart Component to view the data. I would like to see a limit to the number of points per page - 10. I set the points per page property in the paging tab and this works but I only see one page. I have added a TChartPageNavigator and set the Chart property to the Chart Component but no joy. Please tell me what I'm doing wrong!
Hi,
without using the TChartPageNavigator you should be albe to navigate through the pages using the following code :
Using the TChartPageNavigator you will have to use :
without using the TChartPageNavigator you should be albe to navigate through the pages using the following code :
Code: Select all
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
QRChart1.Chart.NextPage;
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
QRChart1.Chart.PreviousPage;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.FillSampleValues(100);
QRChart1.Chart.MaxPointsPerPage:=10;
end;
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.FillSampleValues(100);
QRChart1.Chart.MaxPointsPerPage:=10;
ChartPageNavigator1.Chart := qrChart1.Chart;
end;
Pep Jorge
http://support.steema.com
http://support.steema.com