Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wp-charts

Package Overview
Dependencies
Maintainers
1
Versions
296
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wp-charts - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

lib/style.css

2

lib/wp-charts.es.js

@@ -1,1 +0,1 @@

import*as t from"echarts";function n(n,o,i){const r=t.init(n,i);return o&&r.setOption(o),r}function o(n){t.dispose(n)}export{o as disposeEcharts,n as initEcharts};
class t{constructor(t,e){this.dom=t,this.option=e,this.init()}init(){const t=document.createDocumentFragment(),{label:e,value:i,labelColor:n,valueColor:o,labelSize:d,valueSize:l}=this.option,r=document.createElement("div");r.innerHTML=e,r.setAttribute("class","indicator-label"),r.style.cssText=`color: ${n}; fontSize: ${d}`;const c=document.createElement("div");c.innerHTML=(i+"").replace(/\d{1,3}(?=(\d{3})+$)/g,"$&,"),c.setAttribute("class","indicator-value"),c.style.cssText=`color: ${o}; fontSize: ${l}`,t.appendChild(r),t.appendChild(c),this.dom.appendChild(t)}}class e{constructor(t,e){this.dom=t,this.data=e.map((t=>[{t:"index"}].concat(t))),this.init()}init(){const t=document.createElement("table"),e=document.createDocumentFragment();for(let i=0,n=this.data.length;i<n;i++){const t=document.createDocumentFragment(),n=this.data[i],o=document.createElement("tr");for(let e=0,d=n.length;e<d;e++){const{v:o,t:d}=n[e],l=document.createElement("td");l.setAttribute("align","center"),l.setAttribute("valign","middle");let r="border-bottom: 1px solid #3B56AA; border-right: 1px solid #3B56AA; min-width: 164px; height: 64px; padding: 0 10px; box-sizing: border-box;";"index"!==d&&0!==i||(r+="background-color: #536FC5; color: #fff; min-width: 73px"),l.style.cssText=r,l.innerHTML="index"===d?i>0?i:"":o,t.append(l)}o.appendChild(t),e.appendChild(o)}t.appendChild(e),t.setAttribute("cellspacing",0),t.style.cssText="border-top: 1px solid #3B56AA; border-left: 1px solid #3B56AA; border-spacing: 0",this.dom.appendChild(t)}}export{t as CreateIndicator,e as CreateTable};

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("echarts")):"function"==typeof define&&define.amd?define(["exports","echarts"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).wpCharts={},e.echarts)}(this,(function(e,t){"use strict";function n(e){if(e&&e.__esModule)return e;var t={__proto__:null,[Symbol.toStringTag]:"Module"};return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var o=n(t);e.disposeEcharts=function(e){o.dispose(e)},e.initEcharts=function(e,t,n){const r=o.init(e,n);return t&&r.setOption(t),r},Object.defineProperty(e,"__esModule",{value:!0}),e[Symbol.toStringTag]="Module"}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).wpCharts={})}(this,(function(e){"use strict";e.CreateIndicator=class{constructor(e,t){this.dom=e,this.option=t,this.init()}init(){const e=document.createDocumentFragment(),{label:t,value:o,labelColor:i,valueColor:n,labelSize:d,valueSize:l}=this.option,r=document.createElement("div");r.innerHTML=t,r.setAttribute("class","indicator-label"),r.style.cssText=`color: ${i}; fontSize: ${d}`;const s=document.createElement("div");s.innerHTML=(o+"").replace(/\d{1,3}(?=(\d{3})+$)/g,"$&,"),s.setAttribute("class","indicator-value"),s.style.cssText=`color: ${n}; fontSize: ${l}`,e.appendChild(r),e.appendChild(s),this.dom.appendChild(e)}},e.CreateTable=class{constructor(e,t){this.dom=e,this.data=t.map((e=>[{t:"index"}].concat(e))),this.init()}init(){const e=document.createElement("table"),t=document.createDocumentFragment();for(let o=0,i=this.data.length;o<i;o++){const e=document.createDocumentFragment(),i=this.data[o],n=document.createElement("tr");for(let t=0,d=i.length;t<d;t++){const{v:n,t:d}=i[t],l=document.createElement("td");l.setAttribute("align","center"),l.setAttribute("valign","middle");let r="border-bottom: 1px solid #3B56AA; border-right: 1px solid #3B56AA; min-width: 164px; height: 64px; padding: 0 10px; box-sizing: border-box;";"index"!==d&&0!==o||(r+="background-color: #536FC5; color: #fff; min-width: 73px"),l.style.cssText=r,l.innerHTML="index"===d?o>0?o:"":n,e.append(l)}n.appendChild(e),t.appendChild(n)}e.appendChild(t),e.setAttribute("cellspacing",0),e.style.cssText="border-top: 1px solid #3B56AA; border-left: 1px solid #3B56AA; border-spacing: 0",this.dom.appendChild(e)}},Object.defineProperty(e,"__esModule",{value:!0}),e[Symbol.toStringTag]="Module"}));

@@ -12,3 +12,3 @@ {

},
"version": "1.0.0",
"version": "1.1.0",
"scripts": {

@@ -15,0 +15,0 @@ "dev": "vite",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc