Page 1 of 1
Hide SeriesEventMarker
Posted: Tue Jul 21, 2015 8:59 pm
by srinin2k
I have free point series and to that series I add event markers. When I deselect a series from the legend, markers are not hidden. What should I do to tie them together?
I have passed free point series to the event marker constructor. Didn't help.
Re: Hide SeriesEventMarker
Posted: Tue Jul 21, 2015 10:21 pm
by srinin2k
I got it done using the series changed event handler (i.e hide the marker in this handler). Hope this is the solution.
Re: Hide SeriesEventMarker
Posted: Thu Jul 23, 2015 5:46 am
by ArctionPasi
Hi,
I think you have found the best place to do that.
Code: Select all
m_chart.ViewXY.LegendBox.CheckBoxStateChanged += new Arction.LightningChartUltimate.Views.LegendBoxBase.CheckBoxStateChangedHandler(LegendBox_CheckBoxStateChanged);
Code: Select all
void LegendBox_CheckBoxStateChanged(MouseItemBase series, bool isChecked)
{
PointLineSeriesBase s = (PointLineSeriesBase)series;
m_chart.BeginUpdate();
foreach (SeriesEventMarker marker in s.SeriesEventMarkers)
{
marker.Visible = s.Visible;
}
m_chart.EndUpdate();
}