ChartPoint

Inheritance: java.lang.Object

public class ChartPoint

Represents a single point in a series in a chart.

Example

         //Instantiating a Workbook object
         Workbook workbook = new Workbook();
 
         //Obtaining the reference of the first worksheet
         Worksheet worksheet = workbook.getWorksheets().get(0);
 
         //Adding a sample value to "A1" cell
         worksheet.getCells().get("A1").putValue(50);
 
         //Adding a sample value to "A2" cell
         worksheet.getCells().get("A2").putValue(100);
 
         //Adding a sample value to "A3" cell
         worksheet.getCells().get("A3").putValue(150);
 
         //Adding a sample value to "B1" cell
         worksheet.getCells().get("B1").putValue(60);
 
         //Adding a sample value to "B2" cell
         worksheet.getCells().get("B2").putValue(32);
 
         //Adding a sample value to "B3" cell
         worksheet.getCells().get("B3").putValue(50);
 
         //Adding a chart to the worksheet
         int chartIndex = worksheet.getCharts().add(ChartType.PIE_EXPLODED, 5, 0, 25, 10);
 
         //Accessing the instance of the newly added chart
         Chart chart = worksheet.getCharts().get(chartIndex);
 
         //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3"
         chart.getNSeries().add("A1:B3", true);
 
         //Show Data Labels 
         chart.getNSeries().get(0).getDataLabels().setShowValue(true);
 
         for (int i = 0; i  <chart.getNSeries().get(0).getPoints().getCount(); i++)
         {
             //Get Data Point
             ChartPoint point = chart.getNSeries().get(0).getPoints().get(i);
             //Set Pir Explosion
             point.setExplosion(15);
             //Set Border Color
             point.getBorder().setColor(com.aspose.cells.Color.getRed());
         }
 
         //Saving the Excel file
         workbook.save("book1.xls");

Methods

MethodDescription
equals(Object arg0)
getArcEndPointXPx()Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method.
getArcEndPointYPx()Gets the y coordinate of ending point for the pie section after calls Chart.Calculate() method.
getArcStartPointXPx()Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method.
getArcStartPointYPx()Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method.
getArea()Gets the Area.
getBorder()Gets the Line.
getBorderWidthPx()Gets the width of border in units of pixels after calls Chart.Calculate() method.
getBottomPointCount()Gets the number of bottom points after calls Chart.Calculate() method.
getBottomPointXPx(int index)Gets x-coordinate of the bottom point of shape after calls Chart.Calculate() method.
getBottomPointYPx(int index)Gets y-coordinate of the bottom point of shape after calls Chart.Calculate() method.
getClass()
getDataLabels()Returns a DataLabels object that represents the data label associated with the point.
getEndAngle()Gets the ending angle for the pie section, measured in degrees clockwise from the x-axis after calls Chart.Calculate() method.
getExplosion()The distance of an open pie slice from the center of the pie chart is expressed as a percentage of the pie diameter.
getInnerArcEndPointXPx()Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method.
getInnerArcEndPointYPx()Gets the y coordinate of ending point for the pie section after calls Chart.Calculate() method.
getInnerArcStartPointXPx()Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method.
getInnerArcStartPointYPx()Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method.
getInnerRadiusPx()Gets the inner radius of doughnut slice in units of pixels after calls Chart.Calculate() method.
getMarker()Gets the Series.getMarker().
getOnCategoryAxisPointCount()Gets the number of the points on category axis after calls Chart.Calculate() method.
getOnCategoryAxisPointXPx(int index)Gets x-coordinate of the point on category axis after calls Chart.Calculate() method.
getOnCategoryAxisPointYPx(int index)Gets y-coordinate of the point on category axis after calls Chart.Calculate() method.
getRadiusPx()Gets the radius of bubble, pie or doughnut in units of pixels after calls Chart.Calculate() method.
getShadow()True if the chartpoint has a shadow.
getShapeHeight()Gets the height in units of 1/4000 of chart’s height after calls Chart.Calculate() method.
getShapeHeightPx()Gets the height in units of pixels after calls Chart.Calculate() method.
getShapeProperties()Gets the ShapePropertyCollection object that holds the visual shape properties of the ChartPoint.
getShapeWidth()Gets the width in units of 1/4000 of chart’s width after calls Chart.Calculate() method.
getShapeWidthPx()Gets the width in units of pixels after calls Chart.Calculate() method.
getShapeX()Gets the x coordinate of the upper left corner in units of 1/4000 of chart’s width after calls Chart.Calculate() method.
getShapeXPx()Gets the x coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.
getShapeY()Gets the y coordinate of the upper left corner in units of 1/4000 of chart’s height after calls Chart.Calculate() method.
getShapeYPx()Gets the y coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.
getStartAngle()Gets the starting angle for the pie section, measured in degrees clockwise from the x-axis after calls Chart.Calculate() method.
getTopPointCount()Gets the number of top points after calls Chart.Calculate() method.
getTopPointXPx(int index)Gets x-coordinate of the top point of shape after calls Chart.Calculate() method.
getTopPointYPx(int index)Gets y-coordinate of the top point of shape after calls Chart.Calculate() method.
getXValue()Gets the X value of the chart point.
getXValueType()Gets X value type of the chart point.
getYValue()Gets the Y value of the chart point.
getYValueType()Gets Y value type of the chart point.
hashCode()
isInSecondaryPlot()Gets a value indicates whether this data points is in the second pie or bar on a pie of pie or bar of pie chart
notify()
notifyAll()
setExplosion(int value)The distance of an open pie slice from the center of the pie chart is expressed as a percentage of the pie diameter.
setInSecondaryPlot(boolean value)Sets a value indicates whether this data points is in the second pie or bar on a pie of pie or bar of pie chart
setShadow(boolean value)True if the chartpoint has a shadow.
setXValue(Object value)Sets the X value of the chart point.
setYValue(Object value)Sets the Y value of the chart point.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getArcEndPointXPx()

public float getArcEndPointXPx()

Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart.

Returns: float

getArcEndPointYPx()

public float getArcEndPointYPx()

Gets the y coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart.

Returns: float

getArcStartPointXPx()

public float getArcStartPointXPx()

Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart.

Returns: float

getArcStartPointYPx()

public float getArcStartPointYPx()

Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart.

Returns: float

getArea()

public Area getArea()

Gets the Area.

Returns: Area

getBorder()

public Line getBorder()

Gets the Line.

Returns: Line

getBorderWidthPx()

public int getBorderWidthPx()

Gets the width of border in units of pixels after calls Chart.Calculate() method.

Returns: int

getBottomPointCount()

public int getBottomPointCount()

Gets the number of bottom points after calls Chart.Calculate() method.

Returns: int

getBottomPointXPx(int index)

public float getBottomPointXPx(int index)

Gets x-coordinate of the bottom point of shape after calls Chart.Calculate() method. Applies 3D charts: Column3D, Bar3D, Cone, Cylinder, Pyramid

Parameters:

ParameterTypeDescription
indexint

Returns: float

getBottomPointYPx(int index)

public float getBottomPointYPx(int index)

Gets y-coordinate of the bottom point of shape after calls Chart.Calculate() method. Applies 3D charts: Column3D, Bar3D, Cone, Cylinder, Pyramid

Parameters:

ParameterTypeDescription
indexint

Returns: float

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDataLabels()

public DataLabels getDataLabels()

Returns a DataLabels object that represents the data label associated with the point.

Returns: DataLabels

getEndAngle()

public float getEndAngle()

Gets the ending angle for the pie section, measured in degrees clockwise from the x-axis after calls Chart.Calculate() method. Applies to Pie chart.

Returns: float

getExplosion()

public int getExplosion()

The distance of an open pie slice from the center of the pie chart is expressed as a percentage of the pie diameter.

Returns: int

getInnerArcEndPointXPx()

public float getInnerArcEndPointXPx()

Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart.

Returns: float

getInnerArcEndPointYPx()

public float getInnerArcEndPointYPx()

Gets the y coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart.

Returns: float

getInnerArcStartPointXPx()

public float getInnerArcStartPointXPx()

Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart.

Returns: float

getInnerArcStartPointYPx()

public float getInnerArcStartPointYPx()

Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart.

Returns: float

getInnerRadiusPx()

public int getInnerRadiusPx()

Gets the inner radius of doughnut slice in units of pixels after calls Chart.Calculate() method. Applies to Doughnut chart.

Returns: int

getMarker()

public Marker getMarker()

Gets the Series.getMarker().

Returns: Marker

getOnCategoryAxisPointCount()

public int getOnCategoryAxisPointCount()

Gets the number of the points on category axis after calls Chart.Calculate() method. Only applies to area chart.

Remarks

Area 2D chart return 1 Area 3D chart return 2.

Returns: int

getOnCategoryAxisPointXPx(int index)

public float getOnCategoryAxisPointXPx(int index)

Gets x-coordinate of the point on category axis after calls Chart.Calculate() method. Only applies to Area chart.

Remarks

Area 2D chart: index is 0. Area 3D chart: index is 0 or 1.

Parameters:

ParameterTypeDescription
indexint

Returns: float

getOnCategoryAxisPointYPx(int index)

public float getOnCategoryAxisPointYPx(int index)

Gets y-coordinate of the point on category axis after calls Chart.Calculate() method. Only applies to Area chart.

Remarks

Area 2D chart: index is 0. Area 3D chart: index is 0 or 1.

Parameters:

ParameterTypeDescription
indexint

Returns: float

getRadiusPx()

public int getRadiusPx()

Gets the radius of bubble, pie or doughnut in units of pixels after calls Chart.Calculate() method.

Returns: int

getShadow()

public boolean getShadow()

True if the chartpoint has a shadow.

Returns: boolean

getShapeHeight()

public int getShapeHeight()

Gets the height in units of 1/4000 of chart’s height after calls Chart.Calculate() method.

Returns: int

getShapeHeightPx()

public int getShapeHeightPx()

Gets the height in units of pixels after calls Chart.Calculate() method.

Returns: int

getShapeProperties()

public ShapePropertyCollection getShapeProperties()

Gets the ShapePropertyCollection object that holds the visual shape properties of the ChartPoint.

Returns: ShapePropertyCollection

getShapeWidth()

public int getShapeWidth()

Gets the width in units of 1/4000 of chart’s width after calls Chart.Calculate() method.

Returns: int

getShapeWidthPx()

public int getShapeWidthPx()

Gets the width in units of pixels after calls Chart.Calculate() method.

Returns: int

getShapeX()

public int getShapeX()

Gets the x coordinate of the upper left corner in units of 1/4000 of chart’s width after calls Chart.Calculate() method.

Returns: int

getShapeXPx()

public int getShapeXPx()

Gets the x coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.

Returns: int

getShapeY()

public int getShapeY()

Gets the y coordinate of the upper left corner in units of 1/4000 of chart’s height after calls Chart.Calculate() method.

Returns: int

getShapeYPx()

public int getShapeYPx()

Gets the y coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.

Returns: int

getStartAngle()

public float getStartAngle()

Gets the starting angle for the pie section, measured in degrees clockwise from the x-axis after calls Chart.Calculate() method. Applies to Pie chart.

Returns: float

getTopPointCount()

public int getTopPointCount()

Gets the number of top points after calls Chart.Calculate() method.

Returns: int

getTopPointXPx(int index)

public float getTopPointXPx(int index)

Gets x-coordinate of the top point of shape after calls Chart.Calculate() method. Applies 3D charts: Column3D, Bar3D, Cone, Cylinder, Pyramid and Area3D

Parameters:

ParameterTypeDescription
indexint

Returns: float

getTopPointYPx(int index)

public float getTopPointYPx(int index)

Gets y-coordinate of the top point of shape after calls Chart.Calculate() method. Applies 3D charts: Column3D, Bar3D, Cone, Cylinder, Pyramid and Area3D

Parameters:

ParameterTypeDescription
indexint

Returns: float

getXValue()

public Object getXValue()

Gets the X value of the chart point.

Returns: java.lang.Object

getXValueType()

public int getXValueType()

Gets X value type of the chart point.

See CellValueType.

Returns: int

getYValue()

public Object getYValue()

Gets the Y value of the chart point.

Returns: java.lang.Object

getYValueType()

public int getYValueType()

Gets Y value type of the chart point.

See CellValueType.

Returns: int

hashCode()

public native int hashCode()

Returns: int

isInSecondaryPlot()

public boolean isInSecondaryPlot()

Gets a value indicates whether this data points is in the second pie or bar on a pie of pie or bar of pie chart

Returns: boolean

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setExplosion(int value)

public void setExplosion(int value)

The distance of an open pie slice from the center of the pie chart is expressed as a percentage of the pie diameter.

Parameters:

ParameterTypeDescription
valueint

setInSecondaryPlot(boolean value)

public void setInSecondaryPlot(boolean value)

Sets a value indicates whether this data points is in the second pie or bar on a pie of pie or bar of pie chart

Parameters:

ParameterTypeDescription
valueboolean

setShadow(boolean value)

public void setShadow(boolean value)

True if the chartpoint has a shadow.

Parameters:

ParameterTypeDescription
valueboolean

setXValue(Object value)

public void setXValue(Object value)

Sets the X value of the chart point.

Parameters:

ParameterTypeDescription
valuejava.lang.Object

setYValue(Object value)

public void setYValue(Object value)

Sets the Y value of the chart point.

Parameters:

ParameterTypeDescription
valuejava.lang.Object

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int