{
if(chart != null)
{
write( "JRDesignChart " + chartName + " = new JRDesignChart(jasperDesign, JRChart.CHART_TYPE_MULTI_AXIS);\n");
writeChart( chart, chartName);
JRMultiAxisPlot plot = (JRMultiAxisPlot) chart.getPlot();
String plotName = chartName + "MultiAxisPlot";
write( "JRDesignMultiAxisPlot " + plotName + " = (JRDesignMultiAxisPlot)" + chartName + ".getPlot();\n");
write( plotName + ".setChart(" + chartName + ");\n");//FIXMECHART why is this needed since we get the plot from chart?
writePlot( chart.getPlot(), plotName);
List axes = plot.getAxes();
if (axes != null && axes.size() > 0)
{
for (int i = 0; i < axes.size(); i++)
{
JRChartAxis chartAxis = (JRChartAxis) axes.get(i);