Skip to content

Commit

Permalink
Merge pull request #3932 from plotly/sankey-fix-3813
Browse files Browse the repository at this point in the history
improve robustness of circular Sankey
  • Loading branch information
antoinerg authored Jun 25, 2019
2 parents 705b184 + 5fed1a5 commit a6393bc
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 14 deletions.
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"d3-force": "^1.0.6",
"d3-hierarchy": "^1.1.8",
"d3-interpolate": "1",
"d3-sankey-circular": "0.33.0",
"@plotly/d3-sankey-circular": "0.33.1",
"delaunay-triangulate": "^1.1.6",
"es6-promise": "^3.0.2",
"fast-isnumeric": "^1.1.3",
Expand Down
2 changes: 1 addition & 1 deletion src/traces/sankey/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var tinycolor = require('tinycolor2');
var Color = require('../../components/color');
var Drawing = require('../../components/drawing');
var d3Sankey = require('@plotly/d3-sankey');
var d3SankeyCircular = require('d3-sankey-circular');
var d3SankeyCircular = require('@plotly/d3-sankey-circular');
var d3Force = require('d3-force');
var Lib = require('../../lib');
var gup = require('../../lib/gup');
Expand Down
Binary file modified test/image/baselines/sankey_circular_process.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/image/baselines/sankey_circular_simple2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions test/image/mocks/sankey_circular_simple2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"data": [{
"link": {
"source": [2, 2, 4, 2, 3, 0, 1, 0],
"target": [0, 4, 2, 3, 2, 4, 2, 1],
"value": [1, 1, 1, 1, 1, 1, 1, 1]
},
"node": {
"label": ["A", "B", "C", "D", "E"]
},
"type": "sankey"
}],
"layout": {
"width": 800,
"height": 800
}
}
2 changes: 1 addition & 1 deletion test/jasmine/tests/sankey_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var attributes = require('@src/traces/sankey/attributes');
var Lib = require('@src/lib');
var d3 = require('d3');
var d3sankey = require('@plotly/d3-sankey');
var d3SankeyCircular = require('d3-sankey-circular');
var d3SankeyCircular = require('@plotly/d3-sankey-circular');
var mock = require('@mocks/sankey_energy.json');
var mockDark = require('@mocks/sankey_energy_dark.json');
var mockCircular = require('@mocks/sankey_circular.json');
Expand Down

0 comments on commit a6393bc

Please sign in to comment.