Skip to content

Commit 8dc1275

Browse files
committed
Fix currency not being formatted
1 parent c442fa0 commit 8dc1275

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/chartist-plugin-tooltip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@
9999
}
100100

101101
if (value) {
102-
value = '<span class="chartist-tooltip-value">' + value + '</span>';
103102
if (options.currency) {
104103
value = options.currency + value.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,");
105104
}
105+
value = '<span class="chartist-tooltip-value">' + value + '</span>';
106106
tooltipText += value;
107107
}
108108
}

0 commit comments

Comments
 (0)