Hello forum,
I'm new with the Java Chart Designer and I ask myself what I have done..
Here my problem:
I want to create a Java Servlet which builds a chart as gif. So I have
integrated the packages eltima-chart.jar and eltima-chartDesigner.jar into
my IDE JBuilder 2008R2. As second step I integrated the chart-demo
into a new Java Servlet. The compilation works fine, but if I call the method
getImage(), the application crashed

.
Here is the short code:
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
Image img;
response.setContentType(CONTENT_TYPE);
ELChart chart = new ELChart();
ELChartDataModel dataModel;
String[] series = new String[] {"Orange", "Apple", "Banana"};
String[] categories = new String[] {"Jan", "Feb", "Mar", "Apr"};
java.lang.Number[][] data = new Number[][]
{
{new Integer(12), new Integer(14), new Integer(3)},
{new Integer(14), new Integer(16), new Integer(8)},
{new Integer(16), new Integer(19), new Integer(13)},
{new Integer(18), new Integer(23), new Integer(14)}
};
dataModel = new ELChartDataModel( series, categories, data );
chart.setELChartDataModel(dataModel);
chart.setType(ELChart.TYPE_COLUMN);
chart.setSubType(1);
chart.getHeaderPanel().getTitle().setText("Fruit production");
chart.getHeaderPanel().getSubTitleLabel().setText(null);
chart.getFooterPanel().getTextLabel().setText("ELChart demo");
chart.animationStart();
img = chart.getImage(1041,537,100); // here crashes the application
chart.animationStop();
OutputStream output = response.getOutputStream();
GifEncoder encode = new GifEncoder(img,output);
encode.encode();
}
..is here anybody who can tell me what is wrong?
I guess that I forgot something, but what?

Regard
Jasper