[]
An IPoint instance represents an individual data point within a series and provides access to point-specific settings such as formatting, marker options, data labels, explosion for pie or doughnut slices, and other point-level chart behavior.
worksheet.getRange("A1:B4").setValue(new Object[][] {
{"Item", "Sales"},
{"North", 12},
{"South", 18},
{"West", 9}
});
IShape shape = worksheet.getShapes().addChart(ChartType.ColumnClustered, 20, 20, 360, 230);
shape.getChart().getSeriesCollection().add(worksheet.getRange("A1:B4"), RowCol.Columns, true, true);
IPoint point = shape.getChart().getSeriesCollection().get(0).getPoints().get(0);
intbooleanbooleanbooleanbooleanintdoublebooleanvoidsetExplosion(int value) voidsetHas3DEffect(boolean value) voidsetHasDataLabel(boolean value) voidsetInvertIfNegative(boolean value) voidsetIsTotal(boolean value) voidsetMarkerSize(int value) voidsetMarkerStyle(MarkerStyle value) voidsetPictureType(DrawingPictureType value) voidsetPictureUnit(double value) voidsetSecondaryPlot(boolean value) The returned IDataLabel object can be used to access or configure the content and formatting of the data label for this point.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Category", "Value"}, {"A", 30}, {"B", 20}, {"C", 50}});
IChart chart = worksheet.getShapes().addChart(ChartType.Pie, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
IDataLabel dataLabel = point.getDataLabel();
dataLabel.setShowValue(true);
IDataLabel object that represents the data label associated with the point.Returns 0 if there is no explosion and the tip of the slice is in the center of the pie.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Category", "Value"}, {"A", 30}, {"B", 20}, {"C", 50}});
IChart chart = worksheet.getShapes().addChart(ChartType.Pie, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
int explosion = point.getExplosion();
0 if there is no explosion.Sets 0 if there is no explosion and the tip of the slice is in the center of the pie.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Category", "Value"}, {"A", 30}, {"B", 20}, {"C", 50}});
IChart chart = worksheet.getShapes().addChart(ChartType.Pie, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
point.setExplosion(0);
value - The explosion value for the pie-chart or doughnut-chart slice. Sets 0 if there is no explosion.Use the returned IChartFormat object to access the fill and line formatting settings for the individual point.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Category", "Value"}, {"A", 30}, {"B", 20}, {"C", 50}});
IChart chart = worksheet.getShapes().addChart(ChartType.Pie, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
IChartFormat format = point.getFormat();
format.getFill().getColor().setRGB(Color.GetRed());
IChartFormat object for the point.Use this method to determine whether an individual data point is displayed with a three-dimensional effect in a bubble chart.
worksheet.getRange("A1:C4").setValue(new Object[][] {{"X", "Y", "Size"}, {1, 10, 6}, {2, 14, 8}, {3, 9, 5}});
IChart chart = worksheet.getShapes().addChart(ChartType.Bubble, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:C4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
point.setHas3DEffect(true);
boolean has3DEffect = point.getHas3DEffect();
true if the point has a three-dimensional appearance; otherwise, false.Use this method to enable or disable the three-dimensional effect for an individual data point in a bubble chart.
worksheet.getRange("A1:C4").setValue(new Object[][] {{"X", "Y", "Size"}, {1, 10, 6}, {2, 14, 8}, {3, 9, 5}});
IChart chart = worksheet.getShapes().addChart(ChartType.Bubble, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:C4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
point.setHas3DEffect(true);
value - true if the point has a three-dimensional appearance; otherwise, false.This property indicates whether a data label is displayed for the individual point in the chart series.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Category", "Value"}, {"A", 10}, {"B", 20}, {"C", 30}});
IChart chart = worksheet.getShapes().addChart(ChartType.ColumnClustered, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
point.setHasDataLabel(true);
boolean hasDataLabel = point.getHasDataLabel();
true if the point has a data label; otherwise, false.Set this property to true to show a data label for the individual point, or false to hide it.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Category", "Value"}, {"A", 10}, {"B", 20}, {"C", 30}});
IChart chart = worksheet.getShapes().addChart(ChartType.ColumnClustered, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
point.setHasDataLabel(true);
value - true if the point has a data label; otherwise, false.When this property is true, the point uses the inverted pattern if its value is negative.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Month", "Amount"}, {"Jan", 12}, {"Feb", -8}, {"Mar", 15}});
IChart chart = worksheet.getShapes().addChart(ChartType.ColumnClustered, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
point.setInvertIfNegative(true);
boolean invertIfNegative = point.getInvertIfNegative();
true if Microsoft Excel inverts the pattern for this point when it represents a negative value; otherwise, false.When this property is true, the point uses the inverted pattern if its value is negative.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Month", "Amount"}, {"Jan", 12}, {"Feb", -8}, {"Mar", 15}});
IChart chart = worksheet.getShapes().addChart(ChartType.ColumnClustered, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
point.setInvertIfNegative(true);
value - true if Microsoft Excel inverts the pattern for this point when it represents a negative value; otherwise, false.Use the returned IChartFormat object to configure the fill and line formatting of the point marker.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Month", "Sales"}, {"Jan", 12}, {"Feb", 18}, {"Mar", 15}});
IChart chart = worksheet.getShapes().addChart(ChartType.LineMarkers, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
IChartFormat markerFormat = point.getMarkerFormat();
markerFormat.getFill().getColor().setRGB(Color.GetRed());
IChartFormat object that represents the marker formatting for this point.Use this method to retrieve the marker size applied to a chart point.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Category", "Value"}, {"A", 10}, {"B", 20}, {"C", 30}});
IChart chart = worksheet.getShapes().addChart(ChartType.LineMarkers, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
point.setMarkerSize(12);
int markerSize = point.getMarkerSize();
Use this method to set the marker size applied to a chart point.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Category", "Value"}, {"A", 10}, {"B", 20}, {"C", 30}});
IChart chart = worksheet.getShapes().addChart(ChartType.LineMarkers, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
point.setMarkerSize(12);
value - The data marker size, in points.Use this method to retrieve the current marker appearance applied to the point.
worksheet.getRange("A1:C4").setValue(new Object[][] {{"X", "Y", "Size"}, {1, 10, 6}, {2, 14, 8}, {3, 9, 5}});
IChart chart = worksheet.getShapes().addChart(ChartType.Bubble, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:C4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
point.setMarkerStyle(MarkerStyle.Circle);
MarkerStyle style = point.getMarkerStyle();
Use this method to change how the data marker is displayed for an individual point.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Category", "Value"}, {"A", 10}, {"B", 20}, {"C", 30}});
IChart chart = worksheet.getShapes().addChart(ChartType.LineMarkers, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
point.setMarkerStyle(MarkerStyle.Diamond);
value - The marker style to apply to the point.Use this method to access the parent ISeries of a data point in a chart series.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Category", "Value"}, {"A", 30}, {"B", 20}, {"C", 50}});
IChart chart = worksheet.getShapes().addChart(ChartType.Pie, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
ISeries series = point.getParent();
ISeries that contains this point.Use this property to determine whether the picture for the point is stretched, stacked, or scaled by units. The returned value is a DrawingPictureType.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Category", "Value"}, {"A", 30}, {"B", 20}, {"C", 50}});
IChart chart = worksheet.getShapes().addChart(ChartType.ColumnStacked, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
point.setPictureType(DrawingPictureType.Stack);
DrawingPictureType pictureType = point.getPictureType();
Use this method to control whether pictures for the point are stretched, stacked, or stacked according to a specified unit.
worksheet.getRange("A1:A4").setValue(new Object[][] {{10}, {20}, {30}, {40}});
IChart chart = worksheet.getShapes().addChart(ChartType.ColumnClustered, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:A4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(0);
point.setPictureType(DrawingPictureType.Stretch);
value - The picture display type for the point.This property is used only when the picture type is set to DrawingPictureType.StackScale. If the picture type is not StackScale, this property is ignored.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Category", "Value"}, {"A", 10}, {"B", 20}, {"C", 30}});
IChart chart = worksheet.getShapes().addChart(ChartType.ColumnClustered, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
point.setPictureType(DrawingPictureType.StackScale);
point.setPictureUnit(2.0);
double pictureUnit = point.getPictureUnit();
This property is used only when the picture type is set to DrawingPictureType.StackScale. If the picture type is not StackScale, this property is ignored.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Category", "Value"}, {"A", 10}, {"B", 20}, {"C", 30}});
IChart chart = worksheet.getShapes().addChart(ChartType.ColumnClustered, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(1);
point.setPictureType(DrawingPictureType.StackScale);
point.setPictureUnit(2.0);
value - The unit for each picture on the point.This property applies only to points in the pie or bar section of pie-of-pie and bar-of-pie charts.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Category", "Value"}, {"A", 10}, {"B", 20}, {"C", 30}});
IChart chart = worksheet.getShapes().addChart(ChartType.BarOfPie, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(0);
boolean secondaryPlot = point.getSecondaryPlot();
true if the point is in the secondary section; otherwise, false.This property applies only to points in the pie or bar section of pie-of-pie and bar-of-pie charts.
worksheet.getRange("A1:B4").setValue(new Object[][] {{"Category", "Value"}, {"A", 10}, {"B", 20}, {"C", 30}});
IChart chart = worksheet.getShapes().addChart(ChartType.BarOfPie, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B4"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(0);
point.setSecondaryPlot(true);
value - true if the point is in the secondary section; otherwise, false.This property is valid only for points in a waterfall chart.
worksheet.getRange("A1:B6").setValue(new Object[][] {{"Category", "Value"}, {"Start", 130}, {"Increase", 25}, {"Decrease", -75}, {"Subtotal", 80}, {"End", 140}});
IChart chart = worksheet.getShapes().addChart(ChartType.Waterfall, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B6"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(3);
boolean isTotal = point.getIsTotal();
true if the point is a total data point; otherwise, false.This property is valid only for points in a waterfall chart.
worksheet.getRange("A1:B6").setValue(new Object[][] {{"Category", "Value"}, {"Start", 130}, {"Increase", 25}, {"Decrease", -75}, {"Subtotal", 80}, {"End", 140}});
IChart chart = worksheet.getShapes().addChart(ChartType.Waterfall, 20, 20, 300, 200).getChart();
chart.getSeriesCollection().add(worksheet.getRange("A1:B6"));
IPoint point = chart.getSeriesCollection().get(0).getPoints().get(3);
point.setIsTotal(true);
value - true if the point is a total data point; otherwise, false.