[]
        
(Showing Draft Content)

IPoint

Interface IPoint


public interface IPoint
Represents a single point in a chart series.

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);
 
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the data label associated with the point.
    int
    Gets the explosion value for a pie-chart or doughnut-chart slice.
    Gets the format of the point.
    boolean
    Gets whether the point has a three-dimensional appearance.
    boolean
    Gets whether the point has a data label.
    boolean
    Gets whether Microsoft Excel inverts the pattern for this point when it corresponds to a negative number.
    boolean
    Gets whether the point is a total data point.
    Gets the marker format for this point.
    int
    Gets the data marker size in points.
    Gets the marker style for a point or series in a line, scatter, or radar chart.
    Gets the series that contains this point.
    Gets how pictures are displayed on a column or bar picture chart.
    double
    Gets the unit for each picture on the point.
    boolean
    Gets whether the point is in the secondary section of a pie-of-pie or bar-of-pie chart.
    void
    setExplosion(int value)
    Sets the explosion value for a pie-chart or doughnut-chart slice.
    void
    setHas3DEffect(boolean value)
    Sets whether the point has a three-dimensional appearance.
    void
    setHasDataLabel(boolean value)
    Sets whether the point has a data label.
    void
    setInvertIfNegative(boolean value)
    Sets whether Microsoft Excel inverts the pattern for this point when it corresponds to a negative number.
    void
    setIsTotal(boolean value)
    Sets whether the point is a total data point.
    void
    setMarkerSize(int value)
    Sets the data marker size in points.
    void
    Sets the marker style for this point in a line, scatter, or radar chart.
    void
    Sets how pictures are displayed for this point on a column or bar picture chart.
    void
    setPictureUnit(double value)
    Sets the unit for each picture on the point.
    void
    setSecondaryPlot(boolean value)
    Sets whether the point is in the secondary section of a pie-of-pie or bar-of-pie chart.
  • Method Details

    • getDataLabel

      IDataLabel getDataLabel()
      Gets the data label associated with the point.

      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);
       
      Returns:
      The IDataLabel object that represents the data label associated with the point.
    • getExplosion

      int getExplosion()
      Gets the explosion value for a pie-chart or doughnut-chart slice.

      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();
       
      Returns:
      The explosion value for the pie-chart or doughnut-chart slice. Returns 0 if there is no explosion.
    • setExplosion

      void setExplosion(int value)
      Sets the explosion value for a pie-chart or doughnut-chart slice.

      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);
       
      Parameters:
      value - The explosion value for the pie-chart or doughnut-chart slice. Sets 0 if there is no explosion.
    • getFormat

      IChartFormat getFormat()
      Gets the format of the point.

      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());
       
      Returns:
      The IChartFormat object for the point.
    • getHas3DEffect

      boolean getHas3DEffect()
      Gets whether the point has a three-dimensional appearance.

      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();
       
      Returns:
      true if the point has a three-dimensional appearance; otherwise, false.
    • setHas3DEffect

      void setHas3DEffect(boolean value)
      Sets whether the point has a three-dimensional appearance.

      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);
       
      Parameters:
      value - true if the point has a three-dimensional appearance; otherwise, false.
    • getHasDataLabel

      boolean getHasDataLabel()
      Gets whether the point has a data label.

      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();
       
      Returns:
      true if the point has a data label; otherwise, false.
    • setHasDataLabel

      void setHasDataLabel(boolean value)
      Sets whether the point has a data label.

      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);
       
      Parameters:
      value - true if the point has a data label; otherwise, false.
    • getInvertIfNegative

      boolean getInvertIfNegative()
      Gets whether Microsoft Excel inverts the pattern for this point when it corresponds to a negative number.

      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();
       
      Returns:
      true if Microsoft Excel inverts the pattern for this point when it represents a negative value; otherwise, false.
    • setInvertIfNegative

      void setInvertIfNegative(boolean value)
      Sets whether Microsoft Excel inverts the pattern for this point when it corresponds to a negative number.

      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);
       
      Parameters:
      value - true if Microsoft Excel inverts the pattern for this point when it represents a negative value; otherwise, false.
    • getMarkerFormat

      IChartFormat getMarkerFormat()
      Gets the marker format for this point.

      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());
       
      Returns:
      The IChartFormat object that represents the marker formatting for this point.
    • getMarkerSize

      int getMarkerSize()
      Gets the data marker size in points.

      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();
       
      Returns:
      The data marker size, in points.
    • setMarkerSize

      void setMarkerSize(int value)
      Sets the data marker size in points.

      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);
       
      Parameters:
      value - The data marker size, in points.
    • getMarkerStyle

      MarkerStyle getMarkerStyle()
      Gets the marker style for a point or series in a line, scatter, or radar chart.

      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();
       
      Returns:
      The marker style of the point.
    • setMarkerStyle

      void setMarkerStyle(MarkerStyle value)
      Sets the marker style for this point in a line, scatter, or radar chart.

      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);
       
      Parameters:
      value - The marker style to apply to the point.
    • getParent

      ISeries getParent()
      Gets the series that contains this 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();
       
      Returns:
      The parent ISeries that contains this point.
    • getPictureType

      DrawingPictureType getPictureType()
      Gets how pictures are displayed on a column or bar picture chart.

      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();
       
      Returns:
      The way pictures are displayed on the point.
    • setPictureType

      void setPictureType(DrawingPictureType value)
      Sets how pictures are displayed for this point on a column or bar picture chart.

      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);
       
      Parameters:
      value - The picture display type for the point.
    • getPictureUnit

      double getPictureUnit()
      Gets the unit for each picture on 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();
       
      Returns:
      The unit for each picture on the point.
    • setPictureUnit

      void setPictureUnit(double value)
      Sets the unit for each picture on 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);
       
      Parameters:
      value - The unit for each picture on the point.
    • getSecondaryPlot

      boolean getSecondaryPlot()
      Gets whether the point is in the secondary section of a pie-of-pie or bar-of-pie chart.

      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();
       
      Returns:
      true if the point is in the secondary section; otherwise, false.
    • setSecondaryPlot

      void setSecondaryPlot(boolean value)
      Sets whether the point is in the secondary section of a pie-of-pie or bar-of-pie chart.

      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);
       
      Parameters:
      value - true if the point is in the secondary section; otherwise, false.
    • getIsTotal

      boolean getIsTotal()
      Gets whether the point is a total data point.

      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();
       
      Returns:
      true if the point is a total data point; otherwise, false.
    • setIsTotal

      void setIsTotal(boolean value)
      Sets whether the point is a total data point.

      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);
       
      Parameters:
      value - true if the point is a total data point; otherwise, false.