aspose.cells

Class ChartPoint

Represents a single point in a series in a chart.

Example:

//Instantiating a Workbook object
$workbook = new cells\Workbook();
//Obtaining the reference of the first 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
$chartIndex = $worksheet->getCharts()->add(cells\ChartType::PIE_EXPLODED, 5, 0, 25, 10);
//Accessing the instance of the newly added 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);
$count = java_values($chart->getNSeries()->get(0)->getPoints()->getCount());
for ($i = 0; $i < $count; $i++)
{
    //Get Data Point
    $point = $chart->getNSeries()->get(0)->getPoints()->get($i);
    //Set Pir Explosion
    $point->setExplosion(15);
    //Set Border Color
    $point->getBorder()->setColor(cells\Color::getRed());
}

Property Getters/Setters Summary
functiongetArcEndPointXPx()
Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart.
functiongetArcEndPointYPx()
Gets the y coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart.
functiongetArcStartPointXPx()
Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart.
functiongetArcStartPointYPx()
Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Pie and Doughnut chart.
functiongetArea()
Gets the Area.
functiongetBorder()
Gets the Line.
functiongetBorderWidthPx()
Gets the width of border in units of pixels after calls Chart.Calculate() method.
functiongetDataLabels()
Returns a DataLabels object that represents the data label associated with this chart point.
functiongetEndAngle()
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.
functiongetExplosion()
function
           The distance of an open pie slice from the center of the pie chart is expressed as a percentage of the pie diameter.
functiongetInnerArcEndPointXPx()
Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart.
functiongetInnerArcEndPointYPx()
Gets the y coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart.
functiongetInnerArcStartPointXPx()
Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart.
functiongetInnerArcStartPointYPx()
Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart.
functiongetInnerRadiusPx()
Gets the inner radius of doughnut slice in units of pixels after calls Chart.Calculate() method. Applies to Doughnut chart.
functionisInSecondaryPlot()
function
           Gets or 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
functiongetMarker()
Gets the Marker.
functiongetRadiusPx()
Gets the radius of bubble, pie or doughnut in units of pixels after calls Chart.Calculate() method.
functiongetShadow()
function
setShadow(value)
           True if the chartpoint has a shadow.
functiongetShapeHeight()
Gets the height in units of 1/4000 of chart's height after calls Chart.Calculate() method.
functiongetShapeHeightPx()
Gets the height in units of pixels after calls Chart.Calculate() method.
functiongetShapeProperties()
Gets the ShapePropertyCollection object that holds the visual shape properties of the ChartPoint.
functiongetShapeWidth()
Gets the width in units of 1/4000 of chart's width after calls Chart.Calculate() method.
functiongetShapeWidthPx()
Gets the width in units of pixels after calls Chart.Calculate() method.
functiongetShapeX()
Gets the x coordinate of the upper left corner in units of 1/4000 of chart's width after calls Chart.Calculate() method.
functiongetShapeXPx()
Gets the x coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.
functiongetShapeY()
Gets the y coordinate of the upper left corner in units of 1/4000 of chart's height after calls Chart.Calculate() method.
functiongetShapeYPx()
Gets the y coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.
functiongetStartAngle()
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.
functiongetXValue()
function
setXValue(value)
           Gets or sets the X value of the chart point.
functiongetXValueType()
Gets X value type of the chart point. The value of the property is CellValueType integer constant.
functiongetYValue()
function
setYValue(value)
           Gets or sets the Y value of the chart point.
functiongetYValueType()
Gets Y value type of the chart point. The value of the property is CellValueType integer constant.
 
Method Summary
functiongetBottomPointCount()
Gets the number of bottom points after calls Chart.Calculate() method.
functiongetBottomPointXPx(index)
Gets x-coordinate of the bottom point of shape after calls Chart.Calculate() method. Applies 3D charts: Column3D, Bar3D, Cone, Cylinder, Pyramid
functiongetBottomPointYPx(index)
Gets y-coordinate of the bottom point of shape after calls Chart.Calculate() method. Applies 3D charts: Column3D, Bar3D, Cone, Cylinder, Pyramid
functiongetOnCategoryAxisPointCount()
Gets the number of the points on category axis after calls Chart.Calculate() method. Only applies to area chart.
functiongetOnCategoryAxisPointXPx(index)
Gets x-coordinate of the point on category axis after calls Chart.Calculate() method. Only applies to Area chart.
functiongetOnCategoryAxisPointYPx(index)
Gets y-coordinate of the point on category axis after calls Chart.Calculate() method. Only applies to Area chart.
functiongetTopPointCount()
Gets the number of top points after calls Chart.Calculate() method.
functiongetTopPointXPx(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
functiongetTopPointYPx(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 : Number 

        function getExplosion() / function setExplosion(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 : boolean 

        function getShadow() / function setShadow(value)
        
        True if the chartpoint has a shadow.
      • getBorder : Line 

        function getBorder()
        
        Gets the Line.
      • getArea : Area 

        function getArea()
        
        Gets the Area.
      • getMarker : Marker 

        function getMarker()
        
        Gets the Marker.
      • getDataLabels : DataLabels 

        function getDataLabels()
        
        Returns a DataLabels object that represents the data label associated with this chart point.
      • getYValue/setYValue : Object 

        function getYValue() / function setYValue(value)
        
        Gets or sets the Y value of the chart point.
      • getYValueType : Number 

        function getYValueType()
        
        Gets Y value type of the chart point. The value of the property is CellValueType integer constant.
      • getXValue/setXValue : Object 

        function getXValue() / function setXValue(value)
        
        Gets or sets the X value of the chart point.
      • getXValueType : Number 

        function getXValueType()
        
        Gets X value type of the chart point. The value of the property is CellValueType integer constant.
      • isInSecondaryPlot/setInSecondaryPlot : boolean 

        function isInSecondaryPlot() / function setInSecondaryPlot(value)
        
        Gets or 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
      • getShapeX : Number 

        function 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 : Number 

        function 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 : Number 

        function getShapeWidth()
        
        Gets the width in units of 1/4000 of chart's width after calls Chart.Calculate() method.
      • getShapeHeight : Number 

        function getShapeHeight()
        
        Gets the height in units of 1/4000 of chart's height after calls Chart.Calculate() method.
      • getShapeXPx : Number 

        function getShapeXPx()
        
        Gets the x coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.
      • getShapeYPx : Number 

        function getShapeYPx()
        
        Gets the y coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.
      • getShapeWidthPx : Number 

        function getShapeWidthPx()
        
        Gets the width in units of pixels after calls Chart.Calculate() method.
      • getShapeHeightPx : Number 

        function getShapeHeightPx()
        
        Gets the height in units of pixels after calls Chart.Calculate() method.
      • getBorderWidthPx : Number 

        function getBorderWidthPx()
        
        Gets the width of border in units of pixels after calls Chart.Calculate() method.
      • getRadiusPx : Number 

        function getRadiusPx()
        
        Gets the radius of bubble, pie or doughnut in units of pixels after calls Chart.Calculate() method.
      • getInnerRadiusPx : Number 

        function getInnerRadiusPx()
        
        Gets the inner radius of doughnut slice in units of pixels after calls Chart.Calculate() method. Applies to Doughnut chart.
      • getStartAngle : Number 

        function 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 : Number 

        function 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 : Number 

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

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

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

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

        function getInnerArcStartPointXPx()
        
        Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart.
      • getInnerArcStartPointYPx : Number 

        function getInnerArcStartPointYPx()
        
        Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart.
      • getInnerArcEndPointXPx : Number 

        function getInnerArcEndPointXPx()
        
        Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method. Applies to Doughnut chart.
      • getInnerArcEndPointYPx : Number 

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

      • getTopPointCount

        function getTopPointCount()
        Gets the number of top points after calls Chart.Calculate() method.
      • getTopPointXPx

        function getTopPointXPx(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

        function getTopPointYPx(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

        function getBottomPointCount()
        Gets the number of bottom points after calls Chart.Calculate() method.
      • getBottomPointXPx

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

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

        function 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

        function getOnCategoryAxisPointXPx(index)
        Gets x-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.
      • getOnCategoryAxisPointYPx

        function getOnCategoryAxisPointYPx(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.