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

juijs-chart

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

juijs-chart - npm Package Compare versions

Comparing version 2.6.4 to 2.6.5

2

bundles/index.js

@@ -26,3 +26,3 @@ import jui from '../src/main.js'

server: 120,
client: 3
client: 0
}]

@@ -29,0 +29,0 @@ }],

{
"name": "juijs-chart",
"version": "2.6.4",
"version": "2.6.5",
"sideEffects": false,

@@ -5,0 +5,0 @@ "description": "SVG-based JUI chart that can be used in the browser and Node.js. Support many types of charts. (Dashboard, Map, Topology, Full 3D)",

@@ -109,5 +109,7 @@ import jui from '../main.js';

const g = this.svg.group();
g.append(r);
g.append(this.createTextElement(width, height, text));
if(value > 0) {
g.append(r);
g.append(this.createTextElement(width, height, text));
}
if(this.svg.getTextSize(tooltip).width < width)

@@ -167,2 +169,3 @@ g.append(this.createTooltipElement(width, tooltip));

this.eachData((data, i) => {
const nonZeroKeys = keys.filter(k => data[k] > 0);
const sumValues = keys.reduce((acc, cur) => data[acc] + data[cur]);

@@ -172,3 +175,3 @@ let startX = 0;

keys.forEach((key, j) => {
nonZeroKeys.forEach((key, j) => {
const width = this.axis.x.rate(data[key], sumValues);

@@ -182,4 +185,4 @@ const percent = Math.round((data[key] / sumValues) * this.axis.x.max());

const r = this.createBarElement(i, j, width, height,
j == 0 || keys.length == 1 ? style.borderRadius : 0,
j == keys.length-1 || keys.length == 1 ? style.borderRadius : 0,
j == 0 || nonZeroKeys.length == 1 ? style.borderRadius : 0,
j == nonZeroKeys.length-1 || keys.length == 1 ? style.borderRadius : 0,
text, tooltip);

@@ -186,0 +189,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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