Hide SeriesEventMarker

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
srinin2k
Posts: 25
Joined: Thu Jun 18, 2015 9:22 pm

Hide SeriesEventMarker

Post by srinin2k » Tue Jul 21, 2015 8:59 pm

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.

srinin2k
Posts: 25
Joined: Thu Jun 18, 2015 9:22 pm

Re: Hide SeriesEventMarker

Post by srinin2k » Tue Jul 21, 2015 10:21 pm

I got it done using the series changed event handler (i.e hide the marker in this handler). Hope this is the solution.

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Hide SeriesEventMarker

Post by ArctionPasi » Thu Jul 23, 2015 5:46 am

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(); 
            
        }
LightningChart Support Team, PT

Post Reply