Skip to content

Commit 7966227

Browse files
authored
Pass number format to tooltip (#9831)
1 parent 681ada5 commit 7966227

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/scales/scale.linearbase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,6 @@ export default class LinearScaleBase extends Scale {
312312
}
313313

314314
getLabelForValue(value) {
315-
return formatNumber(value, this.chart.options.locale);
315+
return formatNumber(value, this.chart.options.locale, this.options.ticks.format);
316316
}
317317
}

src/scales/scale.logarithmic.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ export default class LogarithmicScale extends Scale {
146146
* @return {string}
147147
*/
148148
getLabelForValue(value) {
149-
return value === undefined ? '0' : formatNumber(value, this.chart.options.locale);
149+
return value === undefined
150+
? '0'
151+
: formatNumber(value, this.chart.options.locale, this.options.ticks.format);
150152
}
151153

152154
/**

0 commit comments

Comments
 (0)