Skip to content

Commit

Permalink
quick fix percentage value for piechart, fixes #35
Browse files Browse the repository at this point in the history
  • Loading branch information
Kris Urbas committed Jul 10, 2013
1 parent 4d81b74 commit b36576d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/pie.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h1>flot.tooltip plugin example page</h1>
},
tooltip: true,
tooltipOpts: {
content: "%p%, %s", // show percentages, rounding to 2 decimal places
content: "%p.0%, %s", // show percentages, rounding to 2 decimal places
shifts: {
x: 20,
y: 0
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.flot.tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* author: Krzysztof Urbas @krzysu [myviews.pl]
* website: https://github.com/krzysu/flot.tooltip
*
* build on 2013-06-25
* build on 2013-07-10
* released under MIT License, 2012
*/
(function ($) {
Expand Down Expand Up @@ -151,7 +151,7 @@
*/
FlotTooltip.prototype.stringFormat = function(content, item) {

var percentPattern = /%p\.{0,1}(?:\d{0,})/;
var percentPattern = /%p\.{0,1}(\d{0,})/;
var seriesPattern = /%s/;
var xPattern = /%x\.{0,1}(?:\d{0,})/;
var yPattern = /%y\.{0,1}(?:\d{0,})/;
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.flot.tooltip.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/jquery.flot.tooltip.source.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
*/
FlotTooltip.prototype.stringFormat = function(content, item) {

var percentPattern = /%p\.{0,1}(?:\d{0,})/;
var percentPattern = /%p\.{0,1}(\d{0,})/;
var seriesPattern = /%s/;
var xPattern = /%x\.{0,1}(?:\d{0,})/;
var yPattern = /%y\.{0,1}(?:\d{0,})/;
Expand Down

0 comments on commit b36576d

Please sign in to comment.