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

angular-d3-charts

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-d3-charts - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

77

bundle/pieChart.component.js

@@ -36,4 +36,3 @@ "use strict";

var arcNew = d3.svg.arc()
.outerRadius(160)
.innerRadius(70);
.outerRadius(160);
var svg = d3.select('#pieChart').append('svg')

@@ -51,8 +50,8 @@ .attr('width', 330)

.style('stroke', 'white').style('fill', function (d, i) {
return d.data.color;
return [d.data.color];
})
.attr('id', function (d) {
return 'iconId' + d.data.id;
return 'iconId' + d.data.event;
})
.attr('cursor', this.spreadSlice ? 'pointer' : 'default')
.attr('cursor', 'pointer')
.on('click', function (d) {

@@ -73,18 +72,16 @@ d3.selectAll('path').transition()

});
if (chartComponent.spreadSlice) {
d3.select(this).transition()
.duration(50)
.attr('d', function (d) {
if (d.data.expanded) {
this.selectedId = null;
d.data.expanded = false;
return arc(d);
}
else {
d.data.expanded = true;
this.selectedId = d.data.id;
return arcNew(d);
}
});
}
d3.select(this).transition()
.duration(50)
.attr('d', function (d) {
if (d.data.expanded) {
this.selectedId = null;
d.data.expanded = false;
return arc(d);
}
else {
d.data.expanded = true;
this.selectedId = d.data.id;
return arcNew(d);
}
});
});

@@ -95,8 +92,4 @@ g.append('g')

})
.append('svg:image')
.attr('xlink:href', function (d) {
return d.data.iconImage;
})
.attr('id', function (d) {
return d.data.iconImage;
return [d.data.id];
})

@@ -107,3 +100,3 @@ .attr('width', imageWidth)

.attr('y', -1 * imageHeight / 2)
.attr('cursor', this.spreadSlice ? 'pointer' : 'default')
.attr('cursor', 'pointer')
.on('click', function (d) {

@@ -124,18 +117,16 @@ d3.selectAll('path').transition()

});
if (chartComponent.spreadSlice) {
d3.select('path#iconId' + d.data.id).transition()
.duration(50)
.attr('d', function (d) {
if (d.data.expanded) {
this.selectedId = null;
d.data.expanded = false;
return arc(d);
}
else {
d.data.expanded = true;
this.selectedId = d.data.id;
return arcNew(d);
}
});
}
d3.select('path#iconId' + d.data.event).transition()
.duration(50)
.attr('d', function (d) {
if (d.data.expanded) {
this.selectedId = null;
d.data.expanded = false;
return arc(d);
}
else {
d.data.expanded = true;
this.selectedId = d.data.id;
return arcNew(d);
}
});
});

@@ -142,0 +133,0 @@ };

{
"name": "angular-d3-charts",
"version": "2.0.3",
"version": "2.0.4",
"description": "Integrate angular 2 app with interactive d3 charts e.g. Doughnut, Pie, Single Bar chart, Multiple bar chart and Stacked bar chart. Beautiful charts for Angular2 based on d3.js",

@@ -5,0 +5,0 @@ "main": "main.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