New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

d-grouped-barchart

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d-grouped-barchart - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

20

index.js

@@ -131,2 +131,8 @@ var d3 = require('d3');

var total = d3.sum(data, function(d) {
return d3.sum(d.properties, function(d) {
return d.value;
});
});
// Get the x axis position (handle negative values)

@@ -155,2 +161,3 @@ this.xAxisTransform = height

this.maxVal = maxVal;
this.total = total;
}

@@ -175,2 +182,6 @@

var legendConfig = this.legendConfig;
var tipConfig = model.get('tipConfig');
if (!tipConfig) {
tipConfig = [ {name: 'Value', percentage: false} ];
}
var legend;

@@ -184,3 +195,10 @@

.html(function (d) {
return "<strong>Value:</strong> <span style='color:red'>" + (helper.toFixed2(d.value)) + "</span>";
var result = "";
for(var i = 0; i < tipConfig.length; i++)
if (tipConfig[i].percentage) {
result += "<strong>" + tipConfig[i].name + ":</strong> <span style='color:red'>" + (helper.toFixed2(d.value*100/that.total)) + "%</span><br/>";
} else {
result += "<strong>" + tipConfig[i].name + ":</strong> <span style='color:red'>" + (helper.toFixed2(d.value)) + "</span><br/>";
}
return result;
});

@@ -187,0 +205,0 @@

2

package.json
{
"name": "d-grouped-barchart",
"version": "0.0.16",
"version": "0.0.17",
"description": "Derby grouped bar chart component using d3 and d3-tip.",

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

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