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

@vx/legend

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vx/legend - npm Package Compare versions

Comparing version 0.0.140 to 0.0.141

17

build/legends/Threshold.js

@@ -79,3 +79,5 @@ 'use strict';

function format(labelFormat, value, i) {
return labelFormat(value, i) || '';
var formattedValue = labelFormat(value, i);
if (formattedValue === 0) return '0';
return formattedValue || '';
}

@@ -89,8 +91,13 @@ return function (d, i) {

var delimiter = ' ' + labelDelimiter + ' ';
var value = x1;
if (!x0) {
var value = void 0;
if (x0 !== 0 && !x0 && (x1 === 0 || !!x1)) {
// lower threshold
value = x1 - 1;
delimiter = labelLower;
}
if (!x1) {
} else if ((x0 === 0 || !!x0) && (x1 === 0 || !!x1)) {
// threshold step
value = x0;
} else if (!x1 && (x0 === 0 || !!x0)) {
// upper threshold
value = x0 + scale.domain()[1];
x1 = x0;

@@ -97,0 +104,0 @@ x0 = undefined;

{
"name": "@vx/legend",
"version": "0.0.140",
"version": "0.0.141",
"description": "vx legend",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -51,3 +51,5 @@ import React from 'react';

function format(labelFormat, value, i) {
return labelFormat(value, i) || '';
const formattedValue = labelFormat(value, i);
if (formattedValue === 0) return '0';
return formattedValue || '';
}

@@ -57,8 +59,13 @@ return (d, i) => {

let delimiter = ` ${labelDelimiter} `;
let value = x1;
if (!x0) {
let value;
if (x0 !== 0 && !x0 && (x1 === 0 || !!x1)) {
// lower threshold
value = x1 - 1;
delimiter = labelLower;
}
if (!x1) {
} else if ((x0 === 0 || !!x0) && (x1 === 0 || !!x1)) {
// threshold step
value = x0;
} else if (!x1 && (x0 === 0 || !!x0)) {
// upper threshold
value = x0 + scale.domain()[1];
x1 = x0;

@@ -65,0 +72,0 @@ x0 = undefined;

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