I am generating a column chart below. How can i change the default chart color. Is there a way to position the category names .
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertChart(ChartType.COLUMN, 432, 252);
Chart chart = shape.getChart();
// Get chart series collection.
ChartSeriesCollection seriesColl = chart.getSeries();
// Delete default generated series.
seriesColl.clear();
// Create category names array, in this example we have two categories.
String[] categories = new String[] { "1M", "3M", "1Y", "YTD" };
// Adding new series. Please note, data arrays must not be empty and arrays must be the same size.
seriesColl.add("Series 1", categories, new double[] { 0.73, 5.02, 4.95, 12.51 });
seriesColl.add("Series 2", categories, new double[] { 0.74, 5.16, 7.04, 12.41 });
seriesColl.add("Series 3", categories, new double[] { -0.01, -0.14, -2.09, 0.10 });
chart.getAxisY().getScaling().setMaximum(new AxisBound(14));
chart.getAxisY().getScaling().setMinimum(new AxisBound(-3));
// Save the document in PDF format.
doc.save("output.docx");