Documentation

Sparkline
in package
implements Stringable

A single sparkline: a miniature chart drawn inside one cell.

In OOXML this is the x14:sparkline element, holding the source data range (xm:f) and the cell it is drawn in (xm:sqref).

Table of Contents

Interfaces

Stringable

Methods

__construct()  : mixed
__toString()  : string
getDataRange()  : string
getLocation()  : string
setDataRange()  : self
setLocation()  : self
Set the cell the sparkline is drawn in. Must be a single cell, not a range.

Methods

__construct()

public __construct([CellAddress|string $location = '' ][, string $dataRange = '' ]) : mixed
Parameters
$location : CellAddress|string = ''

the cell the sparkline is drawn in (e.g. 'G2')

$dataRange : string = ''

the range supplying the plotted data (e.g. 'B2:F2')

__toString()

public __toString() : string
Return values
string

getDataRange()

public getDataRange() : string
Return values
string

getLocation()

public getLocation() : string
Return values
string

setDataRange()

public setDataRange(string $dataRange) : self
Parameters
$dataRange : string
Return values
self

setLocation()

Set the cell the sparkline is drawn in. Must be a single cell, not a range.

public setLocation(CellAddress|string $location) : self
Parameters
$location : CellAddress|string
Return values
self

        
On this page

Search results