Fixed graph

This commit is contained in:
Will Bradley 2013-09-28 04:12:43 -07:00
parent 5acb3cd272
commit e002907da7

View File

@ -40,7 +40,21 @@ $(function() {
}],
tooltip: {
shared: true,
xDateFormat: '%B %Y'
xDateFormat: '%B %Y',
formatter: function() {
console.log(this);
output = '<b>'+ Highcharts.dateFormat(this.points[0].series.tooltipOptions.xDateFormat,this.x) +'</b><br/>';
total = 0;
this.points.forEach(function(e,i,a){
console.log(e);
output += '<span style="color:'+e.series.color+'">'+e.series.name +'</span>: '+ (e.series.tooltipOptions.valuePrefix||"") + Highcharts.numberFormat(e.y,0,".",",") +'<br/>';
if(i < 2){
total += e.y;
}
});
output += '<b>Total:</b> '+(this.points[0].series.tooltipOptions.valuePrefix||"")+ Highcharts.numberFormat(total,0,".",",");
return output;
}
},
plotOptions: {
area: {