[]
Use this interface to work with the fill, line, and 3-D formatting exposed by a chart element's format object. An instance is typically obtained from another chart API such as a chart area, series, axis, legend, or data label.
worksheet.getRange("A1:B4").setValue(new Object[][] {
{"Month", "Sales"},
{"Jan", 10},
{"Feb", 15},
{"Mar", 12}
});
IChart chart = worksheet.getShapes().addChart(ChartType.ColumnClustered, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"), RowCol.Columns, true, true);
IChartFormat chartFormat = chart.getChartArea().getFormat();
chartFormat.getFill().getColor().setRGB(Color.GetBlue());
getFill()IFillFormat object for the chart element.getLine()ILineFormat object for the chart element.IThreeDFormat object for the chart element.IFillFormat object for the chart element.Use the returned IFillFormat object to access and modify the fill formatting properties of the parent chart element.
IChart chart = worksheet.getShapes().addChart(ChartType.ColumnClustered, 20, 20, 360, 220).getChart();
IChartFormat format = chart.getChartArea().getFormat();
IFillFormat fill = format.getFill();
fill.getColor().setRGB(Color.GetRed());
IFillFormat object that contains the fill formatting properties of the chart element.ILineFormat object for the chart element.Use the returned ILineFormat object to access and modify the line formatting properties of the specified chart element.
IChart chart = worksheet.getShapes().addChart(ChartType.ColumnClustered, 20, 20, 360, 220).getChart();
IChartFormat format = chart.getChartArea().getFormat();
ILineFormat line = format.getLine();
line.getColor().setRGB(Color.GetRed());
ILineFormat object that contains the line formatting properties of the chart element.IThreeDFormat object for the chart element.Use the returned IThreeDFormat object to access and modify the 3-D formatting properties of the specified chart element, such as rotation, perspective, and visibility.
IChart chart = worksheet.getShapes().addChart(ChartType.ColumnClustered, 20, 20, 360, 220).getChart();
IChartFormat format = chart.getChartArea().getFormat();
IThreeDFormat threeD = format.getThreeD();
threeD.setRotationX(20);
IThreeDFormat object that contains the 3-D formatting properties of the chart element.