Example:
$workbook = new cells\Workbook(); $cells = $workbook->getWorksheets()->get(0)->getCells(); //Put values in cells $cells->get("A1")->putValue(1); $cells->get("A2")->putValue(2); $cells->get("A3")->putValue(3); $chartIndex = $workbook->getWorksheets()->get(0)->getCharts()->add(cells\ChartType::COLUMN, 3, 3, 15, 10); $chart = $workbook->getWorksheets()->get(0)->getCharts()->get($chartIndex); $chart->getNSeries()->add("A1:a3", true); $chart->getNSeries()->get(0)->getTrendLines()->add(cells\TrendlineType::LINEAR, "MyTrendLine"); $line = $chart->getNSeries()->get(0)->getTrendLines()->get(0); $line->setDisplayEquation(true); $line->setDisplayRSquared(true); $line->setColor(cells\Color::getRed());
Property Getters/Setters Summary | ||
---|---|---|
function | getCount() | |
function | get(index) | |
Gets a object by its index.
|
Method Summary | ||
---|---|---|
function | add(type) | |
Adds a object to this collection with specified type.
|
||
function | add(type, name) | |
Adds a object to this collection with specified type and name.
|
||
function | add(value) | |
Reserved for internal use. |
||
function | clear() | |
function | contains(value) | |
Reserved for internal use. |
||
function | get(index) | |
Reserved for internal use. |
||
function | indexOf(value) | |
Reserved for internal use. |
||
function | iterator() | |
function | removeAt(index) | |
function add(type)
type: Number
- A function add(type, name)
type: Number
- A name: String
- Trendline name.function clear()
function removeAt(index)
function iterator()
function get(index)
function contains(value)
function add(value)
function indexOf(value)