Cursor Tool and zooming

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
noaksey
Newbie
Newbie
Posts: 55
Joined: Wed May 23, 2007 12:00 am

Cursor Tool and zooming

Post by noaksey » Wed Mar 25, 2009 9:57 am

I have a CursorTool added onto the chart, and I have set the zoom box to have a solid fill colour and a dash border.

If you then try and zoom, the zoom box flickers and then eventually disappears when you let go of the mouse.

If you uncomment out the FastCursor line it works perfectly.

Any ideas?!

I have put the code below.

Code: Select all

            InitializeComponent();

            tChart1[0].FillSampleValues(9000);
            tChart1[1].FillSampleValues(9000);
            tChart1[2].FillSampleValues(9000);
            tChart1[3].FillSampleValues(9000);

            new CursorTool(tChart1.Chart)
            {
                Style = CursorToolStyles.Vertical,
                FollowMouse = true, 
                //FastCursor = true,
                Series = tChart1[0]
            };

            tChart1.Zoom.MinPixels = 3;
            tChart1.Zoom.Brush.Color = Color.Green;
            tChart1.Zoom.Pen.Style = System.Drawing.Drawing2D.DashStyle.Dash;
Regards,
Chris.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed Mar 25, 2009 11:47 am

Hi Chris,

As you've noticed, the problem is not the zoom but the cursor. If you add the line "tChart1.Zoom.Allow = false;" you'll see that the cursor flicker.

The problem is that with every time the cursor is moved, the chart needs to be repainted and this is a chart with a large amount of data. And setting FastCursor to true, this tool gets a lot of optimizations.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

noaksey
Newbie
Newbie
Posts: 55
Joined: Wed May 23, 2007 12:00 am

Post by noaksey » Mon Mar 30, 2009 8:41 am

thanks Yeray!

Post Reply