[]
This interface is used for chart-group line elements such as series lines, drop lines, and high-low lines. These lines connect related data points or series values and can be formatted through the returned IChartFormat object.
worksheet.getRange("A1:B4").setValue(new Object[][] {
{"Month", "Sales"},
{"Jan", 10},
{"Feb", 15},
{"Mar", 12}
});
IShape shape = worksheet.getShapes().addChart(ChartType.Line, 200, 20, 300, 200);
shape.getChart().getSeriesCollection().add(worksheet.getRange("A1:B4"), RowCol.Columns, true, true);
shape.getChart().getChartGroups().get(0).setHasDropLines(true);
IChartLines chartLines = shape.getChart().getChartGroups().get(0).getDropLines();
IChartFormat format = chartLines.getFormat();
voiddelete()IChartFormat object for this chart lines object.IChartFormat object for this chart lines object.Use the returned format object to access and modify the appearance of the chart lines, such as line color and line style.
worksheet.getRange("A1:C4").setValue(new Object[][] {
{"Month", "North", "South"},
{"Jan", 10, 14},
{"Feb", 18, 12},
{"Mar", 15, 20}
});
IChart chart = worksheet.getShapes().addChart(ChartType.ColumnStacked, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:C4"), RowCol.Columns, true, true);
IChartGroup chartGroup = chart.getChartGroups().get(0);
chartGroup.setHasSeriesLines(true);
IChartLines seriesLines = chartGroup.getSeriesLines();
IChartFormat format = seriesLines.getFormat();
IChartFormat object for this chart lines object.After this method is called, the associated chart lines are removed from the parent chart element and are no longer shown.
worksheet.getRange("A1:C4").setValue(new Object[][] {
{"Month", "North", "South"},
{"Jan", 10, 14},
{"Feb", 18, 12},
{"Mar", 15, 20}
});
IChart chart = worksheet.getShapes().addChart(ChartType.ColumnStacked, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:C4"), RowCol.Columns, true, true);
IChartGroup chartGroup = chart.getChartGroups().get(0);
chartGroup.setHasSeriesLines(true);
IChartLines seriesLines = chartGroup.getSeriesLines();
seriesLines.delete();