Added Y Axis Metric Label
This commit is contained in:
parent
9ed797b1d2
commit
4bd8d1ffae
@ -20,6 +20,7 @@ abstract class HighChart {
|
|||||||
// Default chart size.
|
// Default chart size.
|
||||||
protected $_height = '300';
|
protected $_height = '300';
|
||||||
protected $_width = '575';
|
protected $_width = '575';
|
||||||
|
protected $_ymetric = '';
|
||||||
|
|
||||||
// Colors to use for series
|
// Colors to use for series
|
||||||
private $_series_colours = array('AAACCC','E0E0E0','CCC888','EEEBBB','666CCC','888888');
|
private $_series_colours = array('AAACCC','E0E0E0','CCC888','EEEBBB','666CCC','888888');
|
||||||
@ -40,6 +41,8 @@ abstract class HighChart {
|
|||||||
break;
|
break;
|
||||||
case 'width': $this->_width = array_shift($args);
|
case 'width': $this->_width = array_shift($args);
|
||||||
break;
|
break;
|
||||||
|
case 'ymetric': $this->_ymetric = array_shift($args);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Kohana_Exception('Unknown method :name',array(':name'=>$name));
|
throw new Kohana_Exception('Unknown method :name',array(':name'=>$name));
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ $(document).ready(function() {
|
|||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
title: {
|
title: {
|
||||||
text: 'MB'
|
text: '".$this->_ymetric."'
|
||||||
},
|
},
|
||||||
labels: {
|
labels: {
|
||||||
formatter: function() {
|
formatter: function() {
|
||||||
@ -102,7 +102,7 @@ $(document).ready(function() {
|
|||||||
tooltip: {
|
tooltip: {
|
||||||
formatter: function() {
|
formatter: function() {
|
||||||
var s;
|
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;
|
return s;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user