We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f61681 commit b12c798Copy full SHA for b12c798
src/scripts/chartist-plugin-tooltip.js
@@ -79,7 +79,6 @@
79
} else {
80
81
meta = '<span class="chartist-tooltip-meta">' + meta + '</span>';
82
- value = '<span class="chartist-tooltip-value">' + value + '</span>';
83
84
if (hasMeta) {
85
tooltipText += meta + '<br>';
@@ -94,10 +93,13 @@
94
93
}
95
96
97
- if (options.currency) {
98
- value = options.currency + value.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,");
+ if (value) {
+ value = '<span class="chartist-tooltip-value">' + value + '</span>';
+ if (options.currency) {
99
+ value = options.currency + value.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,");
100
+ }
101
+ tooltipText += value;
102
- tooltipText += value;
103
104
105
$toolTip.innerHTML = tooltipText;
0 commit comments