chartElement.setChartClassAttribute(type.toString());
// set chart:class for the chart:series
NodeList plotAreas = chartElement.getElementsByTagName(ChartPlotAreaElement.ELEMENT_NAME.getQName());
if (plotAreas.getLength() > 0) {
ChartPlotAreaElement plotArea = (ChartPlotAreaElement) plotAreas.item(0);
NodeList series = plotArea.getElementsByTagName(ChartSeriesElement.ELEMENT_NAME.getQName());
for (int i = 0; i < series.getLength(); i++) {
ChartSeriesElement serie = (ChartSeriesElement) series.item(i);
serie.setChartClassAttribute(type.toString());
}
}