gauge-chart
Advanced tools
Comparing version
@@ -0,2 +1,5 @@ | ||
import * as GaugeChart from 'https://unpkg.com/gauge-chart@next/dist/bundle.mjs' | ||
let gauge | ||
window.onload = function () { | ||
@@ -10,3 +13,3 @@ const href = window.location.href | ||
.replace(/%22/g, '"') | ||
options = JSON.parse(jsonStr) | ||
options = JSON.parse(decodeURIComponent(jsonStr)) | ||
} else { | ||
@@ -45,3 +48,3 @@ // DEFAULT VALUES | ||
function setEditorValues(options) { | ||
optionNames = [ | ||
const optionNames = [ | ||
'chartWidth', | ||
@@ -60,3 +63,3 @@ 'needleValue', | ||
] | ||
for (optionName of optionNames) | ||
for (let optionName of optionNames) | ||
if (options.hasOwnProperty(optionName)) | ||
@@ -67,3 +70,3 @@ document.getElementById('input-' + optionName).value = options[optionName] | ||
function optionChange() { | ||
allOptionNames = [ | ||
const allOptionNames = [ | ||
'chartWidth', | ||
@@ -85,3 +88,3 @@ 'needleValue', | ||
const needleValue = 0 | ||
for (optionName of allOptionNames) { | ||
for (let optionName of allOptionNames) { | ||
const optionElement = document.getElementById('input-' + optionName) | ||
@@ -115,2 +118,4 @@ if (optionElement && optionElement.value) { | ||
window.optionChange = optionChange | ||
function colorsStrToArr(str) { | ||
@@ -120,3 +125,3 @@ const colorArr = [] | ||
let openBracket = false | ||
for (char of str) { | ||
for (let char of str) { | ||
if (char === '(') { | ||
@@ -123,0 +128,0 @@ openBracket = true |
{ | ||
"name": "gauge-chart", | ||
"version": "1.0.0-beta.5", | ||
"version": "1.0.0-beta.6", | ||
"description": "**A library for creating nice and flexible gauge charts.**", | ||
@@ -14,3 +14,3 @@ "main": "dist/commonjs-bundle.js", | ||
"bundle": "npm run bundle-esm && npm run bundle-commonjs", | ||
"bundle:prod": "npm run bundle-esm -- --minify && npm run bundle-commonjs -- --minify", | ||
"bundle:prod": "npm run bundle-esm -- --minify && npm run bundle-commonjs", | ||
"compile-types": "tsc", | ||
@@ -17,0 +17,0 @@ "build": "rm -rf dist && npm run bundle:prod && npm run compile-types", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
546584
31.68%10494
262.24%2
100%2
100%