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 | ||
---|---|---|
function | getArcEndPointXPx() | |
Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method.
Applies to Pie and Doughnut chart.
|
||
function | getArcEndPointYPx() | |
Gets the y coordinate of ending point for the pie section after calls Chart.Calculate() method.
Applies to Pie and Doughnut chart.
|
||
function | getArcStartPointXPx() | |
Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method.
Applies to Pie and Doughnut chart.
|
||
function | getArcStartPointYPx() | |
Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method.
Applies to Pie and Doughnut chart.
|
||
function | getArea() | |
Gets the |
||
function | getBorder() | |
Gets the |
||
function | getBorderWidthPx() | |
Gets the width of border in units of pixels after calls Chart.Calculate() method.
|
||
function | getDataLabels() | |
Returns a |
||
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.
|
||
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. | ||
function | getInnerArcEndPointXPx() | |
Gets the x coordinate of ending point for the pie section after calls Chart.Calculate() method.
Applies to Doughnut chart.
|
||
function | getInnerArcEndPointYPx() | |
Gets the y coordinate of ending point for the pie section after calls Chart.Calculate() method.
Applies to Doughnut chart.
|
||
function | getInnerArcStartPointXPx() | |
Gets the x coordinate of starting point for the pie section after calls Chart.Calculate() method.
Applies to Doughnut chart.
|
||
function | getInnerArcStartPointYPx() | |
Gets the y coordinate of starting point for the pie section after calls Chart.Calculate() method.
Applies to Doughnut chart.
|
||
function | getInnerRadiusPx() | |
Gets the inner radius of doughnut slice in units of pixels after calls Chart.Calculate() method.
Applies to Doughnut chart.
|
||
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 | ||
function | getMarker() | |
Gets the |
||
function | getRadiusPx() | |
Gets the radius of bubble, pie or doughnut in units of pixels after calls Chart.Calculate() method.
|
||
function | getShadow() | |
function | setShadow(value) | |
True if the chartpoint has a shadow. | ||
function | getShapeHeight() | |
Gets the height in units of 1/4000 of chart's height after calls Chart.Calculate() method.
|
||
function | getShapeHeightPx() | |
Gets the height in units of pixels after calls Chart.Calculate() method.
|
||
function | getShapeProperties() | |
Gets the |
||
function | getShapeWidth() | |
Gets the width in units of 1/4000 of chart's width after calls Chart.Calculate() method.
|
||
function | getShapeWidthPx() | |
Gets the width in units of pixels after calls Chart.Calculate() method.
|
||
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.
|
||
function | getShapeXPx() | |
Gets the x coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.
|
||
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.
|
||
function | getShapeYPx() | |
Gets the y coordinate of the upper left corner in units of pixels after calls Chart.Calculate() method.
|
||
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.
|
||
function | getXValue() | |
function | setXValue(value) | |
Gets or sets the X value of the chart point. | ||
function | getXValueType() | |
Gets X value type of the chart point.
The value of the property is CellValueType integer constant. |
||
function | getYValue() | |
function | setYValue(value) | |
Gets or sets the Y value of the chart point. | ||
function | getYValueType() | |
Gets Y value type of the chart point.
The value of the property is CellValueType integer constant. |
Method Summary | ||
---|---|---|
function | getBottomPointCount() | |
Gets the number of bottom points after calls Chart.Calculate() method.
|
||
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
|
||
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
|
||
function | getOnCategoryAxisPointCount() | |
Gets the number of the points on category axis after calls Chart.Calculate() method. Only applies to area chart.
|
||
function | getOnCategoryAxisPointXPx(index) | |
Gets x-coordinate of the point on category axis after calls Chart.Calculate() method. Only applies to Area chart.
|
||
function | getOnCategoryAxisPointYPx(index) | |
Gets y-coordinate of the point on category axis after calls Chart.Calculate() method. Only applies to Area chart.
|
||
function | getTopPointCount() | |
Gets the number of top points after calls Chart.Calculate() method.
|
||
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
|
||
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
|
function getExplosion() / function setExplosion(value)
function getShadow() / function setShadow(value)
function getArea()
function getMarker()
function getDataLabels()
function getYValue() / function setYValue(value)
function getYValueType()
function getXValue() / function setXValue(value)
function getXValueType()
function getShapeProperties()
function isInSecondaryPlot() / function setInSecondaryPlot(value)
function getShapeX()
function getShapeY()
function getShapeWidth()
function getShapeHeight()
function getShapeXPx()
function getShapeYPx()
function getShapeWidthPx()
function getShapeHeightPx()
function getBorderWidthPx()
function getRadiusPx()
function getInnerRadiusPx()
function getStartAngle()
function getEndAngle()
function getArcStartPointXPx()
function getArcStartPointYPx()
function getArcEndPointXPx()
function getArcEndPointYPx()
function getInnerArcStartPointXPx()
function getInnerArcStartPointYPx()
function getInnerArcEndPointXPx()
function getInnerArcEndPointYPx()
function getTopPointCount()
function getTopPointXPx(index)
function getTopPointYPx(index)
function getBottomPointCount()
function getBottomPointXPx(index)
function getBottomPointYPx(index)
function getOnCategoryAxisPointCount()
function getOnCategoryAxisPointXPx(index)
function getOnCategoryAxisPointYPx(index)