ViewXY w\ SampleLineSeries, horrendous flickering issue

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
greggorob64
Posts: 183
Joined: Tue Mar 18, 2014 2:55 pm

ViewXY w\ SampleLineSeries, horrendous flickering issue

Post by greggorob64 » Wed Apr 15, 2015 7:40 pm

As mentioned in my other thread, I'm using creating and adding a SeriesEventMarker on every mousemove event. This worked pretty flawlessly, until i change one specific property. As soon as I set Height\Width on the PoitnShapeStyle, the graph started uncontrollably flickering. In the screencap below, if I comment out the selected text, all flickering goes away and I get desired performance.

Thanks in advance!

Url to GIF of the flickering. If I comment out the 'size' property, the flickering goes away and works great.
http://gyazo.com/fd5f1b932fc8159cf60dfe90e33b1ef4

Image

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

Re: ViewXY w\ SampleLineSeries, horrendous flickering issue

Post by ArctionPasi » Fri Apr 17, 2015 12:07 pm

It flickers because

Height = Width = this.PreferenceTrackPointShapeSize.

Here in the initializer list, Width actually is the Form's width. It takes it from the class scope, not from PointShapeStyle's scope. Parent class Width is set, typically Form, and hence the flickering.

Do it like this instead

Code: Select all

 PointShapeStyle markerShape = new PointShapeStyle(null)
            {
                BorderWidth = 1,
                
                //Height = Width = 21, //Width is form's width!  
                Height = this.PreferenceTrackPointShapeSize,
                Width = this.PreferenceTrackPointShapeSize, //this Width is for PointShapeStyle 
                
            };
LightningChart Support Team, PT

greggorob64
Posts: 183
Joined: Tue Mar 18, 2014 2:55 pm

Re: ViewXY w\ SampleLineSeries, horrendous flickering issue

Post by greggorob64 » Fri Apr 17, 2015 12:48 pm

Thanks for finding my bug :P.

Ive just started using the object initializer syntax and having quite gotten in down apparently.

Post Reply