[LookupPaintScale] Using min & max value when exceeding

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
NaggingDaivy
Posts: 21
Joined: Mon Jan 09, 2017 2:04 pm
antibot: No, of course not.

[LookupPaintScale] Using min & max value when exceeding

Post by NaggingDaivy » Mon Feb 06, 2017 4:04 pm

Hello,

I am using a LookupPaintScale, with range of [-4;4].
If the value is lower thant -4 or higher than 4, the Z value of the DefaultXYZDataset does not appear on the graph. So, I want the nearest value to be displayed (for example, if the value of Z is "-10", I want it to be displayed as "-4", but conserving the "-10" value in the dataset). I cannot find a method to display the nearest value when exceeding the min or max ; has someone a solution? Note : I am using XYShapeRenderer.

Thanks in advance,
Daivy

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: [LookupPaintScale] Using min & max value when exceeding

Post by paradoxoff » Mon Feb 06, 2017 6:07 pm

A LookupPaintScale should use the default paint if the z coordinate is outside the range between the lower and upper bound of the PaintScale.
In the absence of code, I can't tell why the items are not appearing at all on the chart. One explanation would be a transparent paint used as deault paint.

NaggingDaivy
Posts: 21
Joined: Mon Jan 09, 2017 2:04 pm
antibot: No, of course not.

Re: [LookupPaintScale] Using min & max value when exceeding

Post by NaggingDaivy » Tue Feb 07, 2017 8:45 am

NaggingDaivy wrote:Hello,

I am using a LookupPaintScale, with range of [-4;4].
If the value is lower thant -4 or higher than 4, the Z value of the DefaultXYZDataset does not appear on the graph. So, I want the nearest value to be displayed (for example, if the value of Z is "-10", I want it to be displayed as "-4", but conserving the "-10" value in the dataset). I cannot find a method to display the nearest value when exceeding the min or max ; has someone a solution? Note : I am using XYShapeRenderer.

Thanks in advance,
Daivy
Hello again paradoxoff, once again you are helping me and thank you for that :)

You are right, I was using Color.lightgray as default color, which merged with the background which was also lightgray.

So, there is no solution to set the nearest value when exceeding the max / min ?
If not, the only way, I think, is to keep the original array of Z, then making another array of Z where values can't exceed min or max to display ? (so one array of Z for original values, and one array of Z for display).

Locked