Profile Picture

Clear only Selected Chart Objects

Posted By ywlee Last Year
Message
Posted Monday February 29 2016
Hi  
The following sample code clears all chart objects:

if (SystemData.ChartObjects[Symbol] != null)
   {
    SystemData.ChartObjects[Symbol].Clear();    
   }

How do I just clear only say Fib lines without affecting the rest of the chart objects that were created?

Posted Sunday March 13 2016
Try the following:


if (SystemData.ChartObjects[Symbol] != null)
{
    SystemData.ChartObjects[Symbol].RemoveAll(chartobject => chartobject is ChartFibLine);
}


Thanks,
Daniel


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems