Removing All Objects From All Symbols .Chart.RemoveAllObjects();

Created at 30 Dec 2024, 00:47
TO

TommyFFX

Joined 07.12.2021

Removing All Objects From All Symbols .Chart.RemoveAllObjects();
30 Dec 2024, 00:47


Hello,

 

I want to clean up charts in the OnStop of my plugin.
But I'm only able to clean up the Objects of current symbol of the chart.
Chart.RemoveAllObjects();

Is there a way to remove all objects of all symbols in the chart in the OnStop ?

Kind Regards



        public IEnumerable<ChartFrame> FindAllChartFrames() => ChartManager.OfType<ChartFrame>();

        protected override void OnStop()

        {

            foreach (var chartFrame in FindAllChartFrames())

            {

                chartFrame.Chart.RemoveAllObjects();

            }

        }


 


@TommyFFX