
We are migrating an Echo2 project containing Echo 2 Chart to Echo3 platform.
It seems does not exist any official downoad for Echo3 Chart together to the Beta 8 of Echo3.
Therefore we downloaded the “nightly build” of Echo3 Chart (01/18/2010).
That component is not available from EchoStudio3 Beta 2, so that we have added manually to the Java Build Path the two “external jar” of the Echo3 Chart component (Echo3_Chart_App.jar and Echo3_Chart_WebContainer.jar), downloaded from the “nightly builds”.
Launching the application, ChartDisplayPeer crashes in getImageMap() when due to a null pointer.
Looking at the hint of Issue ID 0000487 of Bug Tracking at category “Echo3 Chart”, adding ActionCommand(), ChartDisplayPeer crashes in the same place due to a index out of bounds.
Then we have turned to Echo3Chart source code, changing at line 129 of ChartDisplayPeer.java in this way:
OLD sb.append(", actionCommand: '" + chartDisplay.getActionCommands()[i] + "'");
NEW sb.append(", actionCommand: '" + "" + "'");
After compiling, updating, refreshing everything, Charts function perfectly in Echo3, no more errors running the application.
But EchoStudio3 does not allow to see the form containing the component Echo3 Chart, making difficult any graphic remake or change by Echostudio3.
What is wrong in our process?
Solution
You can use the Echo3 Chart component without any changes.
You must set the action-commands as described in Issue ID 0000487 (Bug Tracking).
There is an "index out of bounds" because you didn't set enough action-commands:
If you have 5 items in the chart, it can be necessary to set 3*5=15 action-commands. This is necessary and useful because there are different areas of each item, e.g. one in the chart and one in the legend. The number of necessary items depends on JFreeChart which returns in my example for each item one ChartEntity, one LegendItemEntity and one PieSection, so there must be 3 action-commands for each item.
'hope this helps,
Greetings,
Bjoern Weitzig