java.lang.Object
com.aspose.cells.ChartPoint
public class ChartPoint
- extends java.lang.Object
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().setValueShown(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("D:\\book1.xls");
Property Getters/Setters Summary |
float | getArcEndPointXPx() | |
|
Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method.
Applies to Pie and Doughnut chart.
|
float | getArcEndPointYPx() | |
|
Gets the y coordinate of ending point for the pie section after calls Chart.Calculate() method.
Applies to Pie and Doughnut chart.
|
float | getArcStartPointXPx() | |
|
Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method.
Applies to Pie and Doughnut chart.
|
float | getArcStartPointYPx() | |
|
Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method.
Applies to Pie and Doughnut chart.
|
Area | getArea() | |
|
Gets the Area.
|
Line | getBorder() | |
|
Gets the Line.
|
int | getBorderWidthPx() | |
|
Gets the width of border in units of pixels after calls Chart.Calculate() method.
|
DataLabels | getDataLabels() | |
|
Returns a DataLabels object that represents the data label associated with the point.
|
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.
|
int | getExplosion() | |
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.
|
float | getInnerArcEndPointXPx() | |
|
Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method.
Applies to Doughnut chart.
|
float | getInnerArcEndPointYPx() | |
|
Gets the y coordinate of ending point for the pie section after calls Chart.Calculate() method.
Applies to Doughnut chart.
|
float | getInnerArcStartPointXPx() | |
|
Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method.
Applies to Doughnut chart.
|
float | getInnerArcStartPointYPx() | |
|
Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method.
Applies to Doughnut chart.
|
int | getInnerRadiusPx() | |
|
Gets the inner radius of doughnut slice in units of pixels after calls Chart.Calculate() method.
Applies to Doughnut chart.
|
Marker | getMarker() | |
|
Gets the Marker.
|
Color | getMarkerBackgroundColor() | |
void | setMarkerBackgroundColor(Color value) | |
|
Represents the marker backgournd color in a line chart, scatter chart, or radar chart.
|
int | getMarkerBackgroundColorSetType() | |
void | setMarkerBackgroundColorSetType(int value) | |
|
Gets or sets the marker background color set type.
The value of the property is FormattingType integer constant. |
Color | getMarkerForegroundColor() | |
void | setMarkerForegroundColor(Color value) | |
|
Represents the marker foregournd color in a line chart, scatter chart, or radar chart.
|
int | getMarkerForegroundColorSetType() | |
void | setMarkerForegroundColorSetType(int value) | |
|
Gets or sets the marker foreground color set type.
The value of the property is FormattingType integer constant. |
int | getMarkerSize() | |
void | setMarkerSize(int value) | |
|
Represents the marker size in a line chart, scatter chart, or radar chart.
|
int | getMarkerStyle() | |
void | setMarkerStyle(int value) | |
|
Represents the marker style in a line chart, scatter chart, or radar chart.
The value of the property is ChartMarkerType integer constant. |
int | getRadiusPx() | |
|
Gets the radius of bubble, pie or doughnut in units of pixels after calls Chart.Calculate() method.
|
boolean | getShadow() | |
void | setShadow(boolean value) | |
|
True if the chartpoint has a shadow.
|
int | getShapeHeight() | |
|
Gets the height in units of 1/4000 of chart's height after calls Chart.Calculate() method.
|
int | getShapeHeightPx() | |
|
Gets the height in units of pixels after calls Chart.Calculate() method.
|
ShapePropertyCollection | getShapeProperties() | |
|
Gets the object that holds the visual shape properties of the ChartPoint.
|
int | getShapeWidth() | |
|
Gets the width in units of 1/4000 of chart's width after calls Chart.Calculate() method.
|
int | getShapeWidthPx() | |
|
Gets the width in units of pixels after calls Chart.Calculate() method.
|
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.
|
int | getShapeXPx() | |
|
Gets the x coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.
|
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.
|
int | getShapeYPx() | |
|
Gets the y coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.
|
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.
|
java.lang.Object | getXValue() | |
void | setXValue(java.lang.Object value) | |
|
Gets or sets the X value of the chart point.
|
java.lang.Object | getYValue() | |
void | setYValue(java.lang.Object value) | |
|
Gets or sets the Y value of the chart point.
|
Method Summary |
int | getBottomPointCount() | |
Gets the number of bottom points after calls Chart.Calculate() method.
|
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
|
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
|
int | getOnCategoryAxisPointCount() | |
Gets the number of the points on category axis after calls Chart.Calculate() method. Only applies to area chart.
|
float | getOnCategoryAxisPointXPx(int index) | |
Gets x-coordinate of the point on category axis after calls Chart.Calculate() method. Only applies to Aarea chart.
|
float | getOnCategoryAxisPointYPx(int index) | |
Gets y-coordinate of the point on category axis after calls Chart.Calculate() method. Only applies to Area chart.
|
int | getTopPointCount() | |
Gets the number of top points after calls Chart.Calculate() method.
|
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
|
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
|
Property Getters/Setters Detail |
getExplosion/setExplosion | |
public int getExplosion() / 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.
getShadow/setShadow | |
public boolean getShadow() / public void setShadow(boolean value)
|
-
True if the chartpoint has a shadow.
getBorder | |
public Line getBorder()
|
-
Gets the Line.
getArea | |
public Area getArea()
|
-
Gets the Area.
getMarker | |
public Marker getMarker()
|
-
Gets the Marker.
getMarkerStyle/setMarkerStyle | |
public int getMarkerStyle() / public void setMarkerStyle(int value)
|
-
Represents the marker style in a line chart, scatter chart, or radar chart.
The value of the property is ChartMarkerType integer constant.NOTE: This member is now obsolete. Instead,
please use Marker.MarkerStyle property.
This property will be removed 12 months later since August 2012.
Aspose apologizes for any inconvenience you may have experienced.
getMarkerSize/setMarkerSize | |
public int getMarkerSize() / public void setMarkerSize(int value)
|
-
Represents the marker size in a line chart, scatter chart, or radar chart.
NOTE: This member is now obsolete. Instead,
please use Marker.MarkerSize property.
This property will be removed 12 months later since August 2012.
Aspose apologizes for any inconvenience you may have experienced.
getMarkerForegroundColor/setMarkerForegroundColor | |
public Color getMarkerForegroundColor() / public void setMarkerForegroundColor(Color value)
|
-
Represents the marker foregournd color in a line chart, scatter chart, or radar chart.
NOTE: This member is now obsolete. Instead,
please use Marker.MarkerForegroundColor property.
This property will be removed 12 months later since August 2012.
Aspose apologizes for any inconvenience you may have experienced.
getMarkerForegroundColorSetType/setMarkerForegroundColorSetType | |
public int getMarkerForegroundColorSetType() / public void setMarkerForegroundColorSetType(int value)
|
-
Gets or sets the marker foreground color set type.
The value of the property is FormattingType integer constant.NOTE: This member is now obsolete. Instead,
please use Marker.MarkerForegroundColorSetType property.
This property will be removed 12 months later since August 2012.
Aspose apologizes for any inconvenience you may have experienced.
FormattingType.Automatic is same as ChartLineFormattingType.Automatic.
FormattingType.None is same as ChartLineFormattingType.None.
FormattingType.Custom is same as ChartLineFormattingType.Solid.
getMarkerBackgroundColor/setMarkerBackgroundColor | |
public Color getMarkerBackgroundColor() / public void setMarkerBackgroundColor(Color value)
|
-
Represents the marker backgournd color in a line chart, scatter chart, or radar chart.
NOTE: This member is now obsolete. Instead,
please use Marker.MarkerBackgroundColor property.
This property will be removed 12 months later since August 2012.
Aspose apologizes for any inconvenience you may have experienced.
getMarkerBackgroundColorSetType/setMarkerBackgroundColorSetType | |
public int getMarkerBackgroundColorSetType() / public void setMarkerBackgroundColorSetType(int value)
|
-
Gets or sets the marker background color set type.
The value of the property is FormattingType integer constant.NOTE: This member is now obsolete. Instead,
please use Marker.MarkerBackgroundColorSetType property.
This property will be removed 12 months later since August 2012.
Aspose apologizes for any inconvenience you may have experienced.
FormattingType.Automatic is same as ChartLineFormattingType.Automatic.
FormattingType.None is same as ChartLineFormattingType.None.
FormattingType.Custom is same as ChartLineFormattingType.Solid.
-
Returns a DataLabels object that represents the data label associated with the point.
getYValue/setYValue | |
public java.lang.Object getYValue() / public void setYValue(java.lang.Object value)
|
-
Gets or sets the Y value of the chart point.
getXValue/setXValue | |
public java.lang.Object getXValue() / public void setXValue(java.lang.Object value)
|
-
Gets or sets the X value of the chart point.
-
Gets the object that holds the visual shape properties of the ChartPoint.
- See Also:
- ShapePropertyCollection
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.
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.
getShapeWidth | |
public int getShapeWidth()
|
-
Gets the width in units of 1/4000 of chart's width after calls Chart.Calculate() method.
getShapeHeight | |
public int getShapeHeight()
|
-
Gets the height in units of 1/4000 of chart's height after calls Chart.Calculate() method.
getShapeXPx | |
public int getShapeXPx()
|
-
Gets the x coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.
getShapeYPx | |
public int getShapeYPx()
|
-
Gets the y coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.
getShapeWidthPx | |
public int getShapeWidthPx()
|
-
Gets the width in units of pixels after calls Chart.Calculate() method.
getShapeHeightPx | |
public int getShapeHeightPx()
|
-
Gets the height in units of pixels after calls Chart.Calculate() method.
getBorderWidthPx | |
public int getBorderWidthPx()
|
-
Gets the width of border in units of pixels after calls Chart.Calculate() method.
getRadiusPx | |
public int getRadiusPx()
|
-
Gets the radius of bubble, pie or doughnut in units of pixels after calls Chart.Calculate() method.
getInnerRadiusPx | |
public int getInnerRadiusPx()
|
-
Gets the inner radius of doughnut slice in units of pixels after calls Chart.Calculate() method.
Applies to Doughnut chart.
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.
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.
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.
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.
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.
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.
getInnerArcStartPointXPx | |
public float getInnerArcStartPointXPx()
|
-
Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method.
Applies to Doughnut chart.
getInnerArcStartPointYPx | |
public float getInnerArcStartPointYPx()
|
-
Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method.
Applies to Doughnut chart.
getInnerArcEndPointXPx | |
public float getInnerArcEndPointXPx()
|
-
Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method.
Applies to Doughnut chart.
getInnerArcEndPointYPx | |
public float getInnerArcEndPointYPx()
|
-
Gets the y coordinate of ending point for the pie section after calls Chart.Calculate() method.
Applies to Doughnut chart.
getTopPointCount | |
public int getTopPointCount() |
-
Gets the number of top points after calls Chart.Calculate() method.
getTopPointXPx | |
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
getTopPointYPx | |
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
getBottomPointCount | |
public int getBottomPointCount() |
-
Gets the number of bottom points after calls Chart.Calculate() method.
getBottomPointXPx | |
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
getBottomPointYPx | |
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
getOnCategoryAxisPointCount | |
public int getOnCategoryAxisPointCount() |
-
Gets the number of the points on category axis after calls Chart.Calculate() method. Only applies to area chart.
Area 2D chart return 1
Area 3D chart return 2.
getOnCategoryAxisPointXPx | |
public float getOnCategoryAxisPointXPx(int index) |
-
Gets x-coordinate of the point on category axis after calls Chart.Calculate() method. Only applies to Aarea chart.
Area 2D chart: index is 0.
Area 3D chart: index is 0 or 1.
getOnCategoryAxisPointYPx | |
public float getOnCategoryAxisPointYPx(int index) |
-
Gets y-coordinate of the point on category axis after calls Chart.Calculate() method. Only applies to Area chart.
Area 2D chart: index is 0.
Area 3D chart: index is 0 or 1.
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.