Skip to content

Commit

Permalink
Pass number format to tooltip (#9831)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Nov 10, 2021
1 parent 681ada5 commit 7966227
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/scales/scale.linearbase.js
Expand Up @@ -312,6 +312,6 @@ export default class LinearScaleBase extends Scale {
}

getLabelForValue(value) {
return formatNumber(value, this.chart.options.locale);
return formatNumber(value, this.chart.options.locale, this.options.ticks.format);
}
}
4 changes: 3 additions & 1 deletion src/scales/scale.logarithmic.js
Expand Up @@ -146,7 +146,9 @@ export default class LogarithmicScale extends Scale {
* @return {string}
*/
getLabelForValue(value) {
return value === undefined ? '0' : formatNumber(value, this.chart.options.locale);
return value === undefined
? '0'
: formatNumber(value, this.chart.options.locale, this.options.ticks.format);
}

/**
Expand Down

0 comments on commit 7966227

Please sign in to comment.