Permalink
Browse files

fix chart tooltip sort

  • Loading branch information...
deemru committed Dec 20, 2018
1 parent bb6d49d commit ef45b7f4d4c7b36667b10e8591d1dc9b6f3202f8
Showing with 2 additions and 1 deletion.
  1. +2 −1 include/w8io_charts.php
@@ -7,7 +7,8 @@ function w8io_chart( $title, $desc, $url )
tooltip: {
crosshairs: [true],
formatter: function() {
var s = "<b>" + this.x + "";"</b>"
var s = "<b>" + this.x + "</b>";
this.points.sort( function( a, b ) { return ( b.y - a.y ); } );
this.points.forEach( function( point ) { s += "<br/><span style=\"color:" + point.color + "\">\u25CF</span> " + point.series.name.replace( / \((.+)\)/, "" ) + ": " + point.y; } );
return s;
}

0 comments on commit ef45b7f

Please sign in to comment.