Skip to content

Commit 34d6425

Browse files
committed
prevent undefined printed in tooltip if series is collapsed
1 parent 63824d5 commit 34d6425

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modules/tooltip/Labels.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export default class Labels {
211211
}
212212
const ttYVal = ttItems[t].querySelector('.apexcharts-tooltip-text-value')
213213
if (ttYVal) {
214-
ttYVal.innerHTML = val
214+
ttYVal.innerHTML = typeof val !== 'undefined' ? val : ''
215215
}
216216

217217
if (
@@ -243,7 +243,7 @@ export default class Labels {
243243
ttZVal.innerHTML = typeof zVal !== 'undefined' ? zVal : ''
244244
}
245245

246-
if (shared && ttItemsChildren[0] && ttCtx.tooltipTitle) {
246+
if (shared && ttItemsChildren[0]) {
247247
// hide when no Val or series collapsed
248248
if (
249249
typeof val === 'undefined' ||

0 commit comments

Comments
 (0)