XYChart won't plot a constant value
Closed this issue · 1 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. Create a data table filled with constant values.
2. Create an XYChart and call setData with the previously defined table.
3. Call the draw function.
What is the expected output? What do you see instead?
The expected output should be an XY graph with a constant value, but the result
is : "Exception in thread "Animation Thread"
java.lang.ArrayIndexOutOfBoundsException: 0"
What version of the product are you using? On what operating system?
Tested on gicentreutils 3.2.0 installed on Processing 2.0b8 and Processing
1.5.1, on both Windows 7 and Mac OS X 10.6.
Please provide any additional information below.
See attached code for an example.
Replacing
yLightData[i]=1; // Constant y values.
with
yLightData[i]=i; // Non constant y values.
will not produce the issue.
Original issue reported on code.google.com by stevezis...@gmail.com
on 2 Apr 2013 at 9:57
Attachments:
GoogleCodeExporter commented
Thanks for pointing this out. Problem fixed and source code updated. Fix will
be incorporated into the v.3.3 release.
If you need a workaround with v.3.2 or below, call setMinValue(y) where y is
some value less than the constant or setMaxValue(y) where y is some value
greater than the constant.
Original comment by jwoLon...@gmail.com
on 6 Apr 2013 at 5:53
- Changed state: Fixed