Hi,
I am converting my "series1" to chart1.series[0] so I can change the series from bars to lines or whatever and still make it SaveChartToFile(..) and LoadChartFromFile(..).
Everything was compiling ok until I tried to change this line:
series1.custombarwidth := 5; // old line
chart1.series[0].CustomBarWidth := 5; // new line
The error message I get when I try to compile it is "Undeclared Identifier: 'CustomBarWidth'.
What is the equivalent of 'custombarwidth' when you reference a series using the "chart1.series[0]" notation?
Thank you.
pl
series.custombarwidth to chart1.series[0].???
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi pl,
That's because this notations refers to the generic series type and you need to cast them as BarSeries. You can do:
or
That's because this notations refers to the generic series type and you need to cast them as BarSeries. You can do:
Code: Select all
(Chart1.Series[0] as TBarSeries).CustomBarWidth:=5;
Code: Select all
(Chart1[0] as TBarSeries).CustomBarWidth:=5;
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 |