From f47fc1d7aa71d6ad5955c96f49da7fde676801a5 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Tue, 20 Nov 2018 18:08:33 +0000 Subject: [PATCH] Use HTML DOM style for setting label overflow as well PR #928 fixed most inline style errors from Content Security Policy, but it missed this one. This fixes another error by again using `style` to add the style rule. --- src/scripts/core.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/scripts/core.js b/src/scripts/core.js index 94741ba6..c4e307b0 100644 --- a/src/scripts/core.js +++ b/src/scripts/core.js @@ -982,9 +982,8 @@ var Chartist = { content.style[axis.units.len] = Math.round(positionalData[axis.units.len]) + 'px'; content.style[axis.counterUnits.len] = Math.round(positionalData[axis.counterUnits.len]) + 'px'; - labelElement = group.foreignObject(content, Chartist.extend({ - style: 'overflow: visible;' - }, positionalData)); + labelElement = group.foreignObject(content, positionalData); + labelElement._node.style.overflow = 'visible'; } else { labelElement = group.elem('text', positionalData, classes.join(' ')).text(labels[index]); }