MouseOverOn band in sweep mode

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
mattmobilemedtek
Posts: 28
Joined: Tue Sep 30, 2014 8:06 pm

MouseOverOn band in sweep mode

Post by mattmobilemedtek » Thu Jul 30, 2015 5:19 pm

Hello,

I'm currently working with bands on a ViewXY chart and am running into an issue with the MouseOverOn event. Here is what I'm seeing.

1. I start graphing data at 0 seconds with a 10 second window on the x axis
2. I add a band starting at the 2 second mark and ending at the 6 second mark
3. I wait for the graph sweep line to cycle back over the band
4. I stop the graph at 14 seconds worth of data so part of the band is showing and part isn't
5. I move my mouse across the 12 second mark on the graph and I get a MouseOverOn event for the band even though it has been overwritten with new data.

I added a little bit of code to the Thread-fed multi-channel data example in the latest code 6.4.6 to test. It's attached.

Please let me know if there's a work around for this or if it's being fixed in a future release.

Thanks,
Matt
Attachments
WPF Sweep Band Example.zip
This includes a text file with the edited code for the Thread-fed multi-channel example for WPF.
(3.66 KiB) Downloaded 534 times

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

Re: MouseOverOn band in sweep mode

Post by ArctionPasi » Mon Aug 03, 2015 1:41 pm

Hi Matt,

you are right, the mouse has interactivity with wrong part of Band in the scenario you described.

Please use this as a temporary workaround, it adjust band.ValueBegin as it progresses.

Code: Select all

 private void FeedNewDataToChart(double[][] data)
        {
            m_chart.BeginUpdate();

            ViewXY chartView = m_chart.ViewXY;
            for (int iChannel = 0; iChannel < m_iChannelCount; iChannel++)
            {
                chartView.SampleDataSeries[iChannel].AddSamples(data[iChannel], false);
            }
            m_dLatestX = (double)m_lSamplesOutputted / m_dSamplingFrequency;
            chartView.XAxes[0].ScrollPosition = m_dLatestX;

            //Adjust Band minimum
            double dXLen = chartView.XAxes[0].Maximum - chartView.XAxes[0].Minimum; 
            if(m_dLatestX > dXLen)
            {
                chartView.Bands[0].ValueBegin = Math.Max(m_dLatestX - dXLen + chartView.XAxes[0].SweepingGap/100.0 *dXLen, chartView.Bands[0].ValueBegin); 
            }
            
            m_chart.EndUpdate();

            base.DataGenerated(data[0].Length);
        }
We'll arrange a fix in an assembly pack in a month. Apologies.
LightningChart Support Team, PT

mattmobilemedtek
Posts: 28
Joined: Tue Sep 30, 2014 8:06 pm

Re: MouseOverOn band in sweep mode

Post by mattmobilemedtek » Mon Aug 03, 2015 8:56 pm

Thanks for the workaround. I'll give it a try.

Post Reply