Remove series from TChartListBox without deleting the series from graph
Remove series from TChartListBox without deleting the series from graph
How do I keep a Graph series from showing up in a TChartListBox? I do not want to remove the series completely, just have it so the user can not see or select one or more of the series in the list box. When I set the Series[x].visible to false, the series does not show up in the graph or the legend. But the series remains visible and selectable in the list box. I am not looking to remove all the series from the list box, just make certain ones not appear, which may or may not become available after the user changes certain criteria. Hence I can not use RemoveSeries without a lot more code to re-add them when needed.
Re: Remove series from TChartListBox without deleting the series from graph
Hello,
You can remove an item from the TChartListBox with the Items.Delete(AIndex) method. Ie:
Then, you can reload all the Series from the Chart anytime with just:
You can remove an item from the TChartListBox with the Items.Delete(AIndex) method. Ie:
Code: Select all
ChartListBox1.Items.Delete(0);
Code: Select all
ChartListBox1.UpdateSeries;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |