Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Commit

Permalink
Fixes sankey chart trying to render empty nodes and links
Browse files Browse the repository at this point in the history
  • Loading branch information
msom committed Jun 4, 2018
1 parent 9a3e8cb commit fdf73f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
- Fixes placing of the expats/globe tooltip.
[msom]

- Fixes sankey chart trying to render empty nodes and links.
[msom]

3.5.3 (2018-06-04)
~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 2 additions & 0 deletions onegov/election_day/assets/js/d3.chart.sankey.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
var node = canvas.append('g').selectAll('.node')
.data(data.nodes)
.enter().append('g')
.filter(function(d) { return d.value; })
.attr('class', 'node')
.attr('id', function(d) { return 'node-' + count++; })
.filter(function(d) { return d.sourceLinks.length || d.targetLinks.length; });
Expand Down Expand Up @@ -206,6 +207,7 @@
var link = canvas.append('g').selectAll('.link')
.data(data.links)
.enter().append('path')
.filter(function(d) { return d.value; })
.attr('class', 'link')
.attr('d', path)
.attr('style', function(d) {
Expand Down

0 comments on commit fdf73f2

Please sign in to comment.