From cb8bca0e92cbec30db10c2a2863ef81fd98a6138 Mon Sep 17 00:00:00 2001 From: xuri Date: Wed, 24 Aug 2022 00:00:47 +0800 Subject: This closes #1290 and closes #1328 - Add new smooth field in chart format parameter, support specify if smooth line chart - Fix decimal number format round issue with build-in number format --- styles.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'styles.go') diff --git a/styles.go b/styles.go index 8eb0587..2986f16 100644 --- a/styles.go +++ b/styles.go @@ -852,7 +852,7 @@ func formatToInt(v, format string, date1904 bool) string { if err != nil { return v } - return fmt.Sprintf("%d", int64(f)) + return fmt.Sprintf("%d", int64(math.Round(f))) } // formatToFloat provides a function to convert original string to float -- cgit v1.2.1