Hi,
I also need to have the Label name under each column.
I have attached a Word document showing my output and what I would like to achieve.
Thanks
String tableInfo = "2000000,400000,600000,600000,500000";
String labelInfo = "Software Licenses,Hardware,Phase 1 services (portion a),Phase 1 services (portion b),Phase 2 services";
String chartLegTitle = "Recurring Costs";
Shape shape = builder.insertChart(ChartType.COLUMN, 432, 252);
// Chart property of Shape contains all chart related options.
com.aspose.words.Chart chart = shape.getChart();
// Get chart series collection.
ChartSeriesCollection seriesColl = chart.getSeries();
// Delete default generated series.
seriesColl.clear();
String[] dataArray = tableInfo.split(",");
String[] labelArray = labelInfo.split(",");
List catagoriesList = new ArrayList();
List dataList = new ArrayList();
for (int i = 0; i < dataArray.length; i++) {
catagoriesList.add(labelArray[i]);
dataList.add(Double.parseDouble(dataArray[i]));
}
String[] graph_categoriesArray = new String[catagoriesList.size()];
graph_categoriesArray = catagoriesList.toArray(graph_categoriesArray);
double[] graph_dataArray = new double[dataList.size()];
for (int d = 0; d < graph_dataArray.length; d++) {
graph_dataArray[d] = dataList.get(d);
}
seriesColl.add(chartLegTitle, graph_categoriesArray, graph_dataArray);