From 8202e518c53b22acf12caf32c4d627021c6e9b45 Mon Sep 17 00:00:00 2001 From: Abhishek Srivastava Date: Fri, 30 Nov 2018 13:06:56 +0530 Subject: [PATCH] fixing trends duration unit --- src/components/trends/details/graphs/durationGraph.jsx | 2 +- src/components/trends/utils/trendSparklines.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/trends/details/graphs/durationGraph.jsx b/src/components/trends/details/graphs/durationGraph.jsx index af88a6bb..687d9046 100644 --- a/src/components/trends/details/graphs/durationGraph.jsx +++ b/src/components/trends/details/graphs/durationGraph.jsx @@ -38,7 +38,7 @@ durationChartOptions.scales.yAxes = [{ display: true, ticks: { callback(value) { - const formattedValue = formatters.toDurationStringFromMs(value); + const formattedValue = formatters.toDurationString(value); if (formattedValue.length < 8) { return `${' '.repeat(8 - formattedValue.length)}${formattedValue}`; } diff --git a/src/components/trends/utils/trendSparklines.jsx b/src/components/trends/utils/trendSparklines.jsx index 91fe3339..06fd556e 100644 --- a/src/components/trends/utils/trendSparklines.jsx +++ b/src/components/trends/utils/trendSparklines.jsx @@ -42,7 +42,7 @@ sparklines.CountSparkline.propTypes = { sparklines.DurationSparkline = ({latest, points}) => (
{ !isNaN(latest) && -
latest {formatters.toDurationStringFromMs(latest)}
+
latest {formatters.toDurationString(latest)}
}