From 20f39215496dd544539efc8e170280872fbcf837 Mon Sep 17 00:00:00 2001 From: Adrian Setyadi Date: Wed, 25 Nov 2020 04:19:52 +0700 Subject: [PATCH] Remove decimals in bar chart y-axis --- components/metrics/BarChart.js | 1 + 1 file changed, 1 insertion(+) diff --git a/components/metrics/BarChart.js b/components/metrics/BarChart.js index f42cf73f..4354f18c 100644 --- a/components/metrics/BarChart.js +++ b/components/metrics/BarChart.js @@ -175,6 +175,7 @@ export default function BarChart({ options.scales.xAxes[0].ticks.callback = renderXLabel; options.scales.xAxes[0].ticks.fontColor = colors.text; options.scales.yAxes[0].ticks.fontColor = colors.text; + options.scales.yAxes[0].ticks.precision = 0; options.scales.yAxes[0].gridLines.color = colors.line; options.scales.yAxes[0].gridLines.zeroLineColor = colors.zeroLine; options.animation.duration = animationDuration;