Page 1 of 1

CustomLinePointColoringAndShaping not working in small chart

Posted: Thu Aug 28, 2014 3:57 pm
by frank
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

Re: CustomLinePointColoringAndShaping not working in small c

Posted: Thu Aug 28, 2014 4:03 pm
by ArctionPasi
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.

Re: CustomLinePointColoringAndShaping not working in small c

Posted: Fri Aug 29, 2014 7:36 am
by frank
Hi Pasi,

please see attached example. Just resize the window to see the described behaviour.

Best regards,
Frank

Re: CustomLinePointColoringAndShaping not working in small c

Posted: Sat Aug 30, 2014 2:14 pm
by ArctionPasi
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;

;)