Added Y Axis Metric Label

This commit is contained in:
Deon George 2013-11-22 15:19:01 +11:00
parent 9ed797b1d2
commit 4bd8d1ffae
2 changed files with 5 additions and 2 deletions

View File

@ -20,6 +20,7 @@ abstract class HighChart {
// Default chart size.
protected $_height = '300';
protected $_width = '575';
protected $_ymetric = '';
// Colors to use for series
private $_series_colours = array('AAACCC','E0E0E0','CCC888','EEEBBB','666CCC','888888');
@ -40,6 +41,8 @@ abstract class HighChart {
break;
case 'width': $this->_width = array_shift($args);
break;
case 'ymetric': $this->_ymetric = array_shift($args);
break;
default:
throw new Kohana_Exception('Unknown method :name',array(':name'=>$name));
}

View File

@ -91,7 +91,7 @@ $(document).ready(function() {
},
yAxis: {
title: {
text: 'MB'
text: '".$this->_ymetric."'
},
labels: {
formatter: function() {
@ -102,7 +102,7 @@ $(document).ready(function() {
tooltip: {
formatter: function() {
var s;
s = '' + (this.point.name ? this.point.name+': ' : '') + this.y +' MB';
s = '' + (this.point.name ? this.point.name+': ' : '') + this.y +' ".$this->_ymetric."';
return s;
}
},