You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

component-horizontal-stacked-bar

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

component-horizontal-stacked-bar - npm Package Compare versions

Comparing version

to
2.0.1

11

dist/index.js

@@ -38,3 +38,3 @@ (function (global, factory) {

function decorateSeriesWithOriginalData(series) {
var data = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var data = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];

@@ -44,5 +44,6 @@ return series.map(function (items) {

return items.map(function (item) {
item.name = key;
item.value = data[key];
return item;
var matchedOrginalItem = data.find(function (originalItem) {
return originalItem.name === key;
});
return Object.assign(item, matchedOrginalItem);
});

@@ -129,3 +130,3 @@ });

var seriesGenerator = d3Shape.stack().keys(names);
var decoratedSeries = decorateSeriesWithOriginalData(seriesGenerator([dataAsObject]), dataAsObject);
var decoratedSeries = decorateSeriesWithOriginalData(seriesGenerator([dataAsObject]), data);

@@ -132,0 +133,0 @@ var total = sumValues(data);

{
"name": "component-horizontal-stacked-bar",
"version": "2.0.0",
"version": "2.0.1",
"description": "A horizontal stacked bar component created with React and d3",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet