CustomLinePointColoringAndShaping - resulting line changes coloron mousover

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
GeoffDavis
Posts: 5
Joined: Fri Nov 20, 2020 12:12 am

CustomLinePointColoringAndShaping - resulting line changes coloron mousover

Post by GeoffDavis » Fri Nov 20, 2020 12:43 am

HI - looking for advice
  • I am using LightningChart Ultimate WinForms Version 10.0.1
    I am creating a multi colored FreeformPointLineSeries and a PointLineSeries
    I do this using the CustomLinePointColoringAndShaping event - which does exactly what I want it to BUT
    When I mouse over the line the entire line changes color to become the same color as the last color used
So -
  • if I have a two colored line with points and
    the first part of the line is red and the second part is orange
    when I mouse over the line - the entire line changes to orange -
    This does not affect the points which remain red and orange
Can someone advise how to stop this color change on mousover

Thank you

Arction_LasseP
Posts: 141
Joined: Wed Mar 27, 2019 1:05 pm

Re: CustomLinePointColoringAndShaping - resulting line changes coloron mousover

Post by Arction_LasseP » Fri Nov 20, 2020 8:25 am

Hello Geoff,

I tried to reproduce this, but weren't able to do so. Therefore, this could either be a bug caused by some very specific combination of settings or some error in your code. You could also check our example "Multi-color line chart, event-driven" if not done that already.

Color change when mouse is over a line points to a highlighting issue. The first question is do you need to highlight the line at all. If not, you can disable highlighting via

Code: Select all

lineSeries.Highlight = Highlight.None; 
The above alone could solve the issue. Alternatively, you can try disabling user interaction with the line via

Code: Select all

lineSeries.AllowUserInteraction = false;
However, this will also stop all mouse events etc. from working. Use only if you don't need to interact with the line.

If the above doesn't help, we might need more information about the issue. Was this also happening with LightningChart 9.1 version (or whatever version you were using before 10) or was this introduced after you started using version 10?
If possible, you could also sent us a test project to support(at)arction.com, so we could reproduce the issue and also check the code.

Hope this is helpful.
Best regards,
Lasse

GeoffDavis
Posts: 5
Joined: Fri Nov 20, 2020 12:12 am

Re: CustomLinePointColoringAndShaping - resulting line changes coloron mousover

Post by GeoffDavis » Fri Nov 20, 2020 12:56 pm

HI Lasse - thank you for yor reply

Your advice helped a lot.

There was also a line in the code within my that I copied from the interenet which contained. .

Code: Select all

 
 if (e.HasDataPointIndices)
 {
 ..
 }
That was coming up false in my PointLine Series but true in my FreeformPointLineSeries. I was expecting that t be true all the time.

So the combination of fixing that bug and also following your suggestions - solved my problem - thank you

Problem solved

Post Reply