Stop Fastcursor blink

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
nacho
Newbie
Newbie
Posts: 6
Joined: Tue Nov 09, 2010 12:00 am
Location: Orlando, FL, USA
Contact:

Stop Fastcursor blink

Post by nacho » Fri Dec 03, 2010 4:55 pm

Hi,
I'm using a vertical fastcursor, but when I stop moving the cursor it starts blinking. I don't want the blink, but I can't find a way to turn that off. How can I do that? I just want the cursor to stay fixed at last mouse position.

Thanks,
Ignacio
Ignacio Salvo

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Stop Fastcursor blink

Post by Sandra » Tue Dec 07, 2010 12:03 pm

Hello Nacho,

A solution for you would be that you disable FastCursor property if it don't affect in your application. Also it is not a good solution for you. Please explain us what you want do, so we can try to find a solution.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

nacho
Newbie
Newbie
Posts: 6
Joined: Tue Nov 09, 2010 12:00 am
Location: Orlando, FL, USA
Contact:

Re: Stop Fastcursor blink

Post by nacho » Tue Dec 07, 2010 4:16 pm

I cannot disable the fastcursor because the application gets way to slow. This is for a fastline series that gets populated with thousands of datapoints and multiple series. The user then analyzes the chart using a fascursor vertical line moving on the x axis. The line snaps to each data point of the series selected by the user. When the line moves on the x axis I use the SnapChange event to run a binary seach that locates X and Y values for the current datapoint. This is however very cpu intensive and only works fine when I use a fast line. I had a regular line (actually a cross-hair cursor adding a horizontal cursor line tool), but that was too slow. The fast line works fine, but when the user stops moving the mouse the line starts to blink on the last position it was left at. Not sure why, but we don't want that behavior. I just need the line to stop and remain in the lat position it was left at. Is there a way to stop the fastline's blinking behavior once stop moving?

Ignacio

Update: I remember seeing the cursor blinking, but in my latest test it simply disappears after I stop moving the mouse. Not sure what happens, but nevertheless still not the behavior needed. The fast cursor should remain at the last position.
Ignacio Salvo

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Stop Fastcursor blink

Post by Sandra » Fri Dec 10, 2010 11:28 am

Hello Nacho,

We can work in your request and we inform asap.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Stop Fastcursor blink

Post by Sandra » Fri Dec 10, 2010 3:27 pm

Hello Nacho,

I Inform that your requests is in wish-list and it will be fixed for next maintenance release. At the moment you can use next workaround that solve your problem:

Code: Select all

public Form1()
        {
            InitializeComponent();
            InitializeChart();

        }
   private Steema.TeeChart.Tools.CursorTool tool;

    private void InitializeChart()
    {
      tChart1.Series.Add(typeof(Steema.TeeChart.Styles.Line)).FillSampleValues();
      tChart1.Aspect.View3D = false;
      tChart1.Tools.Add(tool = new Steema.TeeChart.Tools.CursorTool());
      tool.FastCursor = true;
      tool.FollowMouse = true;
      tool.Style = Steema.TeeChart.Tools.CursorToolStyles.Vertical;
      tChart1.AutoRepaint = false;
    }
Can you tell if previous code works as you want?

I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

nacho
Newbie
Newbie
Posts: 6
Joined: Tue Nov 09, 2010 12:00 am
Location: Orlando, FL, USA
Contact:

Re: Stop Fastcursor blink

Post by nacho » Fri Dec 10, 2010 3:54 pm

Hi Sandra,
Thanks for the sample code. Unfortunately this solution does not work for me because when I turn chart's AutoRepaint property off the user cannot scroll or zoom anymore and trying to do so will also leave fastcursor lines behind. :(

Btw, I also tried setting a colorline wherever the fastline stops moving, and removing the color line once the mouse continuing moving, but that solution does not work well either. The color line and the fastcursor will be visible when starting to move the move. We are still developing the application, so hopefully the fix will be available before we release. Please let me know if you find any other solution.

Thanks!
Ignacio
Ignacio Salvo

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

Re: Stop Fastcursor blink

Post by Yeray » Thu Dec 16, 2010 2:27 pm

Hi Ignacio,

You can force a Chart repaint at OnZoom, OnUndoZoom and OnScroll events to continue allowing these features with AutoRepaint=false:

Code: Select all

        private Steema.TeeChart.Tools.CursorTool tool;
        private void InitializeChart()
        {
            tChart1.Series.Add(typeof(Steema.TeeChart.Styles.Line)).FillSampleValues(1000);
            tChart1.Aspect.View3D = false;
            tChart1.Tools.Add(tool = new Steema.TeeChart.Tools.CursorTool());
            tool.FastCursor = true;
            tool.FollowMouse = true;
            tool.Style = Steema.TeeChart.Tools.CursorToolStyles.Vertical;
            tChart1.AutoRepaint = false;

            tChart1.Scroll += new EventHandler(tChart1_Scroll);
            tChart1.Zoomed += new EventHandler(tChart1_Zoomed);
            tChart1.UndoneZoom += new EventHandler(tChart1_UndoneZoom);
        }

        void tChart1_UndoneZoom(object sender, EventArgs e)
        {
            tChart1.Refresh();
        }

        void tChart1_Scroll(object sender, EventArgs e)
        {
            tChart1.Refresh();
        }

        void tChart1_Zoomed(object sender, EventArgs e)
        {
            tChart1.Refresh();
        }
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

nacho
Newbie
Newbie
Posts: 6
Joined: Tue Nov 09, 2010 12:00 am
Location: Orlando, FL, USA
Contact:

Re: Stop Fastcursor blink

Post by nacho » Thu Dec 16, 2010 3:51 pm

Hi Yeray,
This solution works great! Thanks! I only had to add one extra event, the "MouseEnter", to refresh the chart in some cases when the previous cursor left on the chart does not go away when returning the mouse to the chart. Nevertheless, again, this solution solves the problem.

Thanks!
Ignacio Salvo
Ignacio Salvo

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

Re: Stop Fastcursor blink

Post by Yeray » Thu Dec 16, 2010 4:03 pm

Hi Ignacio,

I'm glad to see it!
Hasta luego!
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

Post Reply