My program creates a chart with a mixture of line series, fast line series, point series and bar series. I am using MultiBar := mbStacked (as I want to place my stacked bars at specified x-axis positions), which means that I have to generate a new series for each segment in the stacked bar.
When I select some new data, I want to clear only the bar series from the chart and leave the other series (which will be refreshed). How do I find the series type of each item in SeriesList, and how do I remove only bar series from the chart, without having to generate a parallel list of series types.
Thanks in advance
Errol
How to find the series type in a chart.
Re: How to find the series type in a chart.
Hello Errol,
You can loop your series list and check the class of a series with "is" keyword. Ie:
You can loop your series list and check the class of a series with "is" keyword. Ie:
Code: Select all
for i:=Chart1.SeriesCount-1 downto 0 do
if Chart1[i] is TBarSeries then
Chart1.RemoveSeries(i);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |