Skip to content

Commit 342af6d

Browse files
committed
radar datalabels formatter - fixes #1398
1 parent 7155abe commit 342af6d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/charts/Radar.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,19 @@ class Radar {
238238

239239
elSeries.add(elPointsMain)
240240

241-
if (w.config.dataLabels.enabled) {
242-
const dataLabelsConfig = w.config.dataLabels
241+
const dataLabelsConfig = w.config.dataLabels
242+
243+
if (dataLabelsConfig.enabled) {
244+
let text = dataLabelsConfig.formatter(w.globals.series[i][j], {
245+
seriesIndex: i,
246+
dataPointIndex: j,
247+
w
248+
})
243249

244250
dataLabels.plotDataLabelsText({
245251
x: dataPointsPos[j].x,
246252
y: dataPointsPos[j].y,
247-
text: w.globals.series[i][j],
253+
text,
248254
textAnchor: 'middle',
249255
i,
250256
j: i,

0 commit comments

Comments
 (0)