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

react-vertical-bar-chart

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-vertical-bar-chart - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

56

dist/index.js

@@ -454,3 +454,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

if (d && d.value >= centerLineValue && orderedData[i + 1] && orderedData[i + 1].value < centerLineValue) {
if (d && d.value >= centerLineValue && (!orderedData[i + 1] || orderedData[i + 1].value < centerLineValue)) {
rows.push(React__default.createElement(BufferRow, {

@@ -483,5 +483,59 @@ key: 'vertical-bar-chart-midline',

})));
} else if (d && d.value < centerLineValue && i === 0) {
rows.unshift(React__default.createElement(BufferRow, {
key: 'vertical-bar-chart-midline',
style: {
height: rowHeight,
visibility: chartWidth ? undefined : 'hidden'
}
}, React__default.createElement(Midline, {
style: {
height: rowHeight / 2
}
}, React__default.createElement(Cell, {
style: {
height: rowHeight,
width: "calc(" + textWidth + "px + 2rem)",
backgroundColor: '#fff'
}
}), React__default.createElement(MidlineOverText, {
"$dynamicFont": "clamp(0.75rem, " + chartWidth * 0.025 + "px, 1rem)"
}, overMideLineLabel, " \u2191"), React__default.createElement(MidlineUnderText, {
"$dynamicFont": "clamp(0.75rem, " + chartWidth * 0.025 + "px, 1rem)"
}, underMideLineLabel, " \u2193")), React__default.createElement(Cell, {
style: {
height: rowHeight,
width: "calc(" + textWidth + "px + 2rem)",
borderRight: 'solid 1px #333'
}
})));
}
});
var remainingSpace = totalTopValues - rows.length;
if (remainingSpace > 0) {
for (var _i = 0; _i < remainingSpace - 1; _i++) {
var d = {
id: 'empty-row-buffer-' + _i,
title: '',
value: 0,
color: 'transparent'
};
rows.push(React__default.createElement(Row$1, {
key: d.id,
d: d,
rowHeight: rowHeight,
gridHeight: gridHeight,
max: maxValue,
onRowHover: undefined,
range: maxValue,
layout: layout,
highlighted: undefined,
textWidth: textWidth,
chartWidth: chartWidth,
lessThan1: true
}));
}
}
if (layout === exports.Layout.Right) {

@@ -488,0 +542,0 @@ rows.reverse();

@@ -452,3 +452,3 @@ import React, { useState, useRef, useEffect } from 'react';

if (d && d.value >= centerLineValue && orderedData[i + 1] && orderedData[i + 1].value < centerLineValue) {
if (d && d.value >= centerLineValue && (!orderedData[i + 1] || orderedData[i + 1].value < centerLineValue)) {
rows.push(React.createElement(BufferRow, {

@@ -481,5 +481,59 @@ key: 'vertical-bar-chart-midline',

})));
} else if (d && d.value < centerLineValue && i === 0) {
rows.unshift(React.createElement(BufferRow, {
key: 'vertical-bar-chart-midline',
style: {
height: rowHeight,
visibility: chartWidth ? undefined : 'hidden'
}
}, React.createElement(Midline, {
style: {
height: rowHeight / 2
}
}, React.createElement(Cell, {
style: {
height: rowHeight,
width: "calc(" + textWidth + "px + 2rem)",
backgroundColor: '#fff'
}
}), React.createElement(MidlineOverText, {
"$dynamicFont": "clamp(0.75rem, " + chartWidth * 0.025 + "px, 1rem)"
}, overMideLineLabel, " \u2191"), React.createElement(MidlineUnderText, {
"$dynamicFont": "clamp(0.75rem, " + chartWidth * 0.025 + "px, 1rem)"
}, underMideLineLabel, " \u2193")), React.createElement(Cell, {
style: {
height: rowHeight,
width: "calc(" + textWidth + "px + 2rem)",
borderRight: 'solid 1px #333'
}
})));
}
});
var remainingSpace = totalTopValues - rows.length;
if (remainingSpace > 0) {
for (var _i = 0; _i < remainingSpace - 1; _i++) {
var d = {
id: 'empty-row-buffer-' + _i,
title: '',
value: 0,
color: 'transparent'
};
rows.push(React.createElement(Row$1, {
key: d.id,
d: d,
rowHeight: rowHeight,
gridHeight: gridHeight,
max: maxValue,
onRowHover: undefined,
range: maxValue,
layout: layout,
highlighted: undefined,
textWidth: textWidth,
chartWidth: chartWidth,
lessThan1: true
}));
}
}
if (layout === Layout.Right) {

@@ -486,0 +540,0 @@ rows.reverse();

2

package.json
{
"name": "react-vertical-bar-chart",
"version": "1.0.5",
"version": "1.0.6",
"description": "Vertical scrolling bar chart for React",

@@ -5,0 +5,0 @@ "author": "wsoeltz",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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