Format the Y axis labels. If any of the following format options are used, the Y axis labels use the format options.
In the string, the magic #val# is replaced with the actual value (see tooltip
for more details on magic string values). So in the example above the following Y Axis Format string was used:
#val# km
So #val# is replaced with the calculated Y Axis value.
Method: set_num_decimals
set_num_decimals( integer $val )
For example, we set this to 3, so now 6.6666666666 becomes 6.666 and 7.1 stays as 7.1
This effects the tooltips, the Y axis labels and the X axis labels in scatter charts.
Method: set_is_fixed_num_decimals_forced
set_is_fixed_num_decimals_forced( boolean $val )
If this is set to true the chart will display all calculated numbers with set_num_decimals() (see above)
(e.g. for set_num_decimals(3), 10 becomes 10.000, 10.1 becomes 10.100) this is useful
for prices: £10 becomes £10.00
This effects the tooltips, the Y axis labels and the X axis labels in scatter charts.
Method: set_is_decimal_separator_comma
set_is_decimal_separator_comma( boolean $val )
Use a comma for the decimal seperator.
This effects the tooltips, the Y axis labels and the X axis labels in scatter charts.
// generate some random data srand((double)microtime()*1000000);
// // NOTE: how we are filling 3 arrays full of data, // one for each bar on the graph // $data_1 = array(); for( $i=0; $i<10; $i++ ) { $data_1[] = rand(50000,60000) + 0.666666666666; }