Contents

 
Home
PHPRunner 6.1 manual
Prev Page Next Page
 
 

Event: UpdateChartSettings

 

Description

Function UpdateChartSettings occurs after chart is initialized. Use this event to modify chart settings. Avoid printing anything in this event.

Syntax

UpdateChartSettings($chart)

Arguments

$chart - chart object.

Chart object methods

Method/Variable

Description

setFooter($newname)

Sets chart footer.

Example:

$chart->setFooter("new text");

getFooter()

Gets chart footer.

Example:

$str = $chart->getFooter();

$chart->setFooter($str."new text");

setHeader($newname)

Sets chart header.

Example:

$chart->setHeader("new text");

getHeader()

Gets chart header.

Example:

$str = $chart->getHeader();

$chart->setHeader($str."new text");

setSeriaColor($color,$index)

Sets data series color.

$color – data series color in the format "AAAAAA" (without "#" symbol).

$index – data series number (starting from 1).

yellowbulbNote: data series color can be set/modified if two or more data series are used to build the chart. If only one data series is used, series color is not taken into account while building the chart.

Example:

$chart->setSeriaColor("FFFFFF",1);

getSeriaColor($index)

Gets data series color.

$index – data series number (starting from 1).

Example:

$color = $chart->getSeriaColor(1);

$color = substr($color,0,4);

$chart->setSeriaColor($color."FF",1);

setScrollingState($scroll)

Enables/Disables chart scrolling.

$scroll = true – to enable chart scrolling.

$scroll = false – to disable chart scrolling.

Example:

$chart->setScrollingState(true);

getScrollingState()

Gets chart scrolling state.

Return value:

· True – scrolling is enabled;
· False – scrolling is disabled.

setMaxBarScroll($num)

Sets max number of bars to show on the chart screen.

Example:

$chart->setMaxBarScroll(10);

getMaxBarScroll()

Gets max number of bars showed on the chart screen.

setLabelField($name)

Sets label field.

$name – label field name.

Example:

$chart->setLabelField("field1");

getLabelField()

Gets label field name.

Define appearance of Bars/Columns chart

$stacked

Allows building stacked chart. Value true enables stacked chart, false disables it.

Example:

$chart->stacked = true;

yellowbulbNote: two or more data series must be selected to built stacked chart.

$_2d

Allows building 2D/3D chart. Value true enables 2D chart, false - 3D chart.

Example (building 3D chart):

$chart->_2d = false;

$bar

Defines the chart type. Value true enables Bars chart, false - Columns chart.

Example (building Columns chart):

$chart->bar = false;

Define appearance of Line chart

$type_line

Defines the line type. Value "line" enables Normal line type, "spline" - Spline type, "step_line" - Step type.

Example (building Line chart with Spline line type):

$chart->type_line = "spline";

Define appearance of Area chart

$stacked

Allows building stacked chart. Value true enables stacked chart, false disables it.

Example:

$chart->stacked = true;

yellowbulbNote: two or more data series must be selected to built stacked chart.

Define appearance of Pie/Doughnut chart

$pie

Defines the chart type. Value true enables Pie chart, false - Doughnut chart.

Example (building Pie chart):

$chart->pie = true;

Define appearance of Accumulation chart

$ftype

Defines the chart form. Value "0" enables Flat form, "1" - Cone form, "2" - Pyramid form.

Example (building Cone chart):

$chart->ftype = 1;

$inver

Inverts the chart image. Value true enables inversion, false - disables it.

Example (building inverted accumulation chart):

$chart->inver = true;

Define appearance of Bubble chart

$_2d

Allows building 2D/3D chart. Value true enables 2D chart, false - 3D chart.

Example (building 3D chart):

$chart->_2d = false;

$oppos

Defines the chart transparency. Variable can take the value between "0" and "1".

Example (building half transparent chart):

$chart->oppos = 0.5;

Define appearance of Gauge chart

$type_gauge

 

$orientation

Define the chart type.

Building Circle chart:

$chart->type_gauge = "circular";

$chart->orientation = "";

Horizontal chart:

$chart->type_gauge = "linear";

$chart->orientation = "horizontal";

Vertical chart:

$chart->type_gauge = "linear";

$chart->orientation = "vertical";

Define appearance of financial OHLC/Candlestick chart

$ohcl_type

Defines the chart type.

Building OHLC chart:

$chart->ohcl_type = "ohlc";

Candlestick chart:

$chart->ohcl_type = "candle";

Applies to pages

Chart

Recommended predefined actions and sample events

Send a simple email

Insert a record into another table

Check to see if a specific record exists

Display a message on the Web page

Redirect to another page

Converted from CHM to HTML with chm2web Standard 2.85 (unicode)