mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Merge pull request #134 from matthayes/master
Fix y axis tick rendering
This commit is contained in:
commit
9de08e243e
1 changed files with 5 additions and 1 deletions
|
@ -863,8 +863,12 @@ $(function () {
|
|||
}
|
||||
}
|
||||
conf.yaxis.minTickSize = 1;
|
||||
// prevent ticks from having decimals (use whole numbers instead)
|
||||
conf.yaxis.tickDecimals = 0;
|
||||
conf.yaxis.tickFormatter = function (val, axis) {
|
||||
return val.toFixed(0);
|
||||
// Just in case we get ticks with decimals, render to one decimal position. If it's
|
||||
// a whole number then render without any decimal (i.e. without the trailing .0).
|
||||
return val === Math.round(val) ? val.toFixed(0) : val.toFixed(1);
|
||||
}
|
||||
if (conf.series.pie) {
|
||||
conf.series.pie.label.formatter = function(label, series){
|
||||
|
|
Loading…
Reference in a new issue