diff --git a/package.json b/package.json index 62b7681..0d2367f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chrisburnell/svg-sparkline", - "version": "0.0.5", + "version": "0.0.6", "description": "A Web Component for building an SVG Sparkline.", "main": "svg-sparkline.js", "scripts": { diff --git a/svg-sparkline.js b/svg-sparkline.js index f0090ea..e0916d5 100644 --- a/svg-sparkline.js +++ b/svg-sparkline.js @@ -74,7 +74,7 @@ class SVGSparkline extends HTMLElement { this.values = this.getAttribute("values").split(",") this.width = parseFloat(this.getAttribute("width")) || 160 this.height = parseFloat(this.getAttribute("height")) || 28 - this.color = this.getAttribute("color") || window.getComputedStyle(this).getPropertyValue("color") + this.color = this.getAttribute("color") || "currentColor" this.curve = this.getAttribute("curve") === "true" this.animationDuration = this.getAttribute("animation-duration") || "1s" this.endpoint = this.getAttribute("endpoint") !== "false"