Class for line charts. Can make use of an unlimited amount of datasets and will display them as lines by default.
X axis:
Each chart consists of several chart elements which represents logical parts of the chart and can be formatted independently. The line chart consists of:
The chart itself also offers several options to configure the appearance. The extended configure options are available in ezcGraphLineChartOptions extending the ezcGraphChartOptions.
Source for this file: /Graph/src/charts/line.php
ezcGraphChart | --ezcGraphLineChart
Version: | //autogentag// |
Child Class | Description |
---|---|
ezcGraphBarChart | Class for bar charts. Can make use of an unlimited amount of datasets and will display them as bars by default. |
ezcGraphLineChartOptions | read/write |
$options
Chart options class |
protected ezcGraphAxisContainer |
$additionalAxis
Array with additional axis for the chart |
From ezcGraphChart | |
---|---|
protected |
ezcGraphChart::$data
|
protected |
ezcGraphChart::$elements
|
protected |
ezcGraphChart::$options
|
protected |
ezcGraphChart::$properties
|
protected |
ezcGraphChart::$renderElement
|
protected void |
calculateStepWidth(
$mainAxis
, $secondAxis
, $width
)
Calculate bar chart step width |
protected void |
checkRenderer(
)
Check if renderer supports features requested by some special chart options. |
public int |
getDefaultDisplayType(
)
Returns the default display type of the current chart type. |
public void |
render(
$width
, $height
, [ $file
= null] )
Render the line chart |
protected void |
renderData(
$renderer
, $boundings
, $innerBoundings
)
Render the assigned data |
protected void |
renderElements(
$width
, $height
)
Renders the basic elements of this chart type |
public void |
renderToOutput(
$width
, $height
)
Renders this chart to direct output |
protected void |
setAxisValues(
)
Aggregate and calculate value boundings on axis. |
public void |
setFromPalette(
$palette
)
Set colors and border for this element |
From ezcGraphChart | |
---|---|
protected void |
ezcGraphChart::addElement()
Add element to chart |
public abstract int |
ezcGraphChart::getDefaultDisplayType()
Returns the default display type of the current chart type. |
public mixed |
ezcGraphChart::getRenderedFile()
Return filename of rendered file, and false if no file was yet rendered. |
public abstract void |
ezcGraphChart::render()
Renders this chart |
public abstract void |
ezcGraphChart::renderToOutput()
Renders this chart to direct output |
public void |
ezcGraphChart::setFromPalette()
Set colors and border fro this element |
Calculate bar chart step width
Name | Type | Description |
---|---|---|
$mainAxis |
ezcGraphChartElementAxis | |
$secondAxis |
ezcGraphChartElementAxis | |
$width |
Check if renderer supports features requested by some special chart options.
Type | Description |
---|---|
ezcBaseValueException |
If some feature is not supported |
Returns the default display type of the current chart type.
Method | Description |
---|---|
ezcGraphChart::getDefaultDisplayType() |
Returns the default display type of the current chart type. |
Method | Description |
---|---|
ezcGraphBarChart::getDefaultDisplayType() |
Returns the default display type of the current chart type. |
Render the line chart
Renders the chart into a file or stream. The width and height are needed to specify the dimensions of the resulting image. For direct output use 'php://stdout' as output file.
Name | Type | Description |
---|---|---|
$width |
int | Image width |
$height |
int | Image height |
$file |
string | Output file |
Method | Description |
---|---|
ezcGraphChart::render() |
Renders this chart |
Render the assigned data
Will renderer all charts data in the remaining boundings after drawing all other chart elements. The data will be rendered depending on the settings in the dataset.
Name | Type | Description |
---|---|---|
$renderer |
ezcGraphRenderer | Renderer |
$boundings |
ezcGraphBoundings | Remaining boundings |
$innerBoundings |
ezcGraphBoundings |
Method | Description |
---|---|
ezcGraphHorizontalBarChart::renderData() |
Render the assigned data |
Renders the basic elements of this chart type
Name | Type | Description |
---|---|---|
$width |
int | |
$height |
int |
Renders this chart to direct output
Does the same as ezcGraphChart::render(), but renders directly to output and not into a file.
Name | Type | Description |
---|---|---|
$width |
int | |
$height |
int |
Method | Description |
---|---|
ezcGraphChart::renderToOutput() |
Renders this chart to direct output |
Aggregate and calculate value boundings on axis.
Method | Description |
---|---|
ezcGraphHorizontalBarChart::setAxisValues() |
Aggregate and calculate value boundings on axis. |
Set colors and border for this element
Name | Type | Description |
---|---|---|
$palette |
ezcGraphPalette | Palette |
Method | Description |
---|---|
ezcGraphChart::setFromPalette() |
Set colors and border fro this element |