Hi,
as discussed once via email, I'm using CustomLinePointColoringAndShaping to "hide" invalid values by setting them to a large negativ y-Value and drawing the points in between transparent. This works very well. As I have multiple charts in one window, and they can be resized freely, I now noticed that CustomLinePointColoringAndShaping doesn't work for small heights.
Please see attached screenshots
Do you have any ideas? Could it be the "invalid" negative value is calculated so imprecise for small heights, that it no longer exceeds the threshold? I was told not to use negative NaN, so now I use -10^6.
Best regards,
Frank
CustomLinePointColoringAndShaping not working in small chart
Moderator: Queue Moderators
CustomLinePointColoringAndShaping not working in small chart
- Attachments
-
- CustomLinePointColoringAndShaping_FAULTY.png (2.68 KiB) Viewed 10691 times
-
- CustomLinePointColoringAndShaping_OK.png (2.92 KiB) Viewed 10691 times
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: CustomLinePointColoringAndShaping not working in small c
Hi Frank,
CustomLinePointColoringAndShaping event is based on screen coordinates info. Probably the invalid "values" are getting same X or Y screen coordinate than the actual data points?
Does changing the "invalid" value for example to 0 help?
I'd appreaciate if you could post a project or code snippet ready for reproducing the issue.
CustomLinePointColoringAndShaping event is based on screen coordinates info. Probably the invalid "values" are getting same X or Y screen coordinate than the actual data points?
Does changing the "invalid" value for example to 0 help?
I'd appreaciate if you could post a project or code snippet ready for reproducing the issue.
LightningChart Support Team, PT
Re: CustomLinePointColoringAndShaping not working in small c
Hi Pasi,
please see attached example. Just resize the window to see the described behaviour.
Best regards,
Frank
please see attached example. Just resize the window to see the described behaviour.
Best regards,
Frank
- Attachments
-
- WpfApplication2.zip
- (38.85 KiB) Downloaded 754 times
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: CustomLinePointColoringAndShaping not working in small c
Hi Frank,
CoordToValue converts screen coordinates to axis values. Because the Y range in pixels is low, it can't output values where -1000000 and -999999 could be isolated. They become same, so to say.
Use -999000 or equivalent, even larger number as overshoot threshold.
private readonly double InvalidValueOvershoot = -Math.Pow(10, 6) + 1000;
CoordToValue converts screen coordinates to axis values. Because the Y range in pixels is low, it can't output values where -1000000 and -999999 could be isolated. They become same, so to say.
Use -999000 or equivalent, even larger number as overshoot threshold.
private readonly double InvalidValueOvershoot = -Math.Pow(10, 6) + 1000;
LightningChart Support Team, PT