I keep getting an error when using JFree Chart for Mendix. I’m making a pie chart. If I set just ONE datapointsingle with a Y value of “1” and add it to the chart single, it renders. As soon as I add a second datapointsingle I get: java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1 I tried making the Y alues “50” and “50”. Then “0.50” and “0.50” so they would add up to 100%, but either way I get that error. I actually have a list of 15 I’m trying to add to the pie chart. When i try to add them all, I’ll radomly let other errors like “Index 6 out of bounds for length 6” What am I doing wrong? Just FYI I’m using Mendix v 9.7. They stopped releaseding JFree after 7. So I loaded it into a 7 project and then loaded it into an 8.13 project, forcing it to update. Then I loaded that into a 8.23 project, forcing it to upgrade. Then i loaded THAT into a 9.7 project, finally getting the module to upgrade to 9, and imported it. So maybe it just doesn’t work anymore.
I figured it out. If you have multiple data points with the same name, it doesnt automatically aggregate like all other other chart widgets. You have to manually calculate the percentage of all the similarly named datapoints and save as ONE single data point… also impleying that you have to calculate the % for each datapoint rather than relying the widget to do it.
This isn’t explained AT ALL in the documentation. The documentation doesn’t really explain anything. So, there you go guys.