{"_id":"@plotly/d3-sankey","_rev":"94-7df9c49d07934b10c7bfdc5f0eb5003a","name":"@plotly/d3-sankey","dist-tags":{"latest":"0.12.3"},"versions":{"0.5.0":{"name":"@plotly/d3-sankey","version":"0.5.0","keywords":["d3","d3-module","sankey"],"author":{"url":"http://bost.ocks.org/mike","name":"Mike Bostock"},"license":"BSD-3-Clause","_id":"@plotly/d3-sankey@0.5.0","maintainers":[{"name":"plotly","email":"ben@plot.ly"}],"homepage":"https://github.com/d3/d3-sankey","bugs":{"url":"https://github.com/d3/d3-sankey/issues"},"dist":{"shasum":"b22faea742e58251335ee5d9fba248772607800f","tarball":"https://registry.npmjs.org/@plotly/d3-sankey/-/d3-sankey-0.5.0.tgz","integrity":"sha512-zI4pzRrUUA8Cs61DoCksA2wGpstVO7co+h6Vib8RFsz84iWARk6DaSiDPZimg7Cbko9atmF9AS4D+xaVcytwew==","signatures":[{"sig":"MEQCICRQy1vWPePwdGjkvM+si6vupVJ3VyQSi6lWPkLPn7+kAiA0fECtqWGWQRVMerxB5R3Bovq6nLEeHzr3cebJ8FSNXA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/d3-sankey.js","_from":".","module":"index","_shasum":"b22faea742e58251335ee5d9fba248772607800f","gitHead":"8bafed6f435fd7e56516ab829247fe09baf22e60","scripts":{"test":"tape 'test/**/*-test.js' && eslint index.js src","pretest":"rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -g d3-array:d3,d3-collection:d3,d3-interpolate:d3 -f umd -n d3 -o build/d3-sankey.js -- index.js","prepublish":"npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-sankey.js -c -m -o build/d3-sankey.min.js","postpublish":"git push && git push --tags && zip -j build/d3-sankey.zip -- LICENSE README.md build/d3-sankey.js build/d3-sankey.min.js"},"_npmUser":{"name":"plotly","email":"ben@plot.ly"},"repository":{"url":"git+https://github.com/d3/d3-sankey.git","type":"git"},"_npmVersion":"3.10.10","description":"Visualize flow between nodes in a directed acyclic network.","directories":{},"jsnext:main":"index","_nodeVersion":"6.9.4","dependencies":{"d3-array":"1","d3-collection":"1","d3-interpolate":"1"},"devDependencies":{"tape":"4","eslint":"3","rollup":"0.41","uglify-js":"2","package-preamble":"0.0.2"},"_npmOperationalInternal":{"tmp":"tmp/d3-sankey-0.5.0.tgz_1493721813462_0.14681038563139737","host":"packages-18-east.internal.npmjs.com"}},"0.5.1":{"name":"@plotly/d3-sankey","version":"0.5.1","keywords":["d3","d3-module","sankey"],"author":{"url":"http://bost.ocks.org/mike","name":"Mike Bostock"},"license":"BSD-3-Clause","_id":"@plotly/d3-sankey@0.5.1","maintainers":[{"name":"alexcjohnson","email":"alex@plot.ly"},{"name":"andrefarzat","email":"andrefarzat@gmail.com"},{"name":"antrg","email":"antoine@plot.ly"},{"name":"archmoj","email":"arch.mojtaba.samimi@gmail.com"},{"name":"bpostlethwaite","email":"post.ben.here@gmail.com"},{"name":"chriddyp","email":"chris@plot.ly"},{"name":"dmt0","email":"dmt.shvedov@gmail.com"},{"name":"etpinard","email":"etienne.t.pinard@gmail.com"},{"name":"jackparmer","email":"jack@plot.ly"},{"name":"jmmease","email":"jon.mease@gmail.com"},{"name":"marivet","email":"marcandre.rivet@gmail.com"},{"name":"nicolaskruchten","email":"nicolas@kruchten.com"},{"name":"rmarren1","email":"rymarr@tuta.io"},{"name":"t4rk","email":"t4rk@outlook.com"},{"name":"verazabeida","email":"vera.zabeida@gmail.com"},{"name":"vnieman","email":"valentijn@plot.ly"},{"name":"wilzbach","email":"sebi@notsharingmy.info"}],"homepage":"https://github.com/d3/d3-sankey","bugs":{"url":"https://github.com/d3/d3-sankey/issues"},"dist":{"shasum":"c2862c71374aba4f097a95a3449c7274a15a22de","tarball":"https://registry.npmjs.org/@plotly/d3-sankey/-/d3-sankey-0.5.1.tgz","fileCount":8,"integrity":"sha512-uMToNGexOSLG0hBm+uAzElfFW0Pt2utgJ//puL5nuerNnPnRTTe3Un7XFVcWqRhvXEViF00Xq/8wGoA8i8eZJA==","signatures":[{"sig":"MEQCIE222Z+qfVwuuXqEEKYUSVMyjeiwmiMTzmF033ANzSw2AiAa1ljPd8Fhm2+gJzQ8rYXqe+KJk/dgqsRWUBJ90ijeuA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26277,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0NgeCRA9TVsSAnZWagAAQK8QAIuKEfLzF/rQhby02g9V\nf+Ll3YbU/IQjsYf326enWvOCnHFRZkUxKoK5U8JpaDVgSUmiLU8SijoBDE5d\nJmBqSSpPAXK/7WsVeJUlBPg6VC3dK8KxRIkD7WetdzBFLhtpNSEAjqM/V4TQ\nl8Pte6ksnogipPpBxXrMINcJPet2t2mbiA2xSxtV0eyen3uMXQq5tN3papsM\n7zpTiHnFjJ8dDZAjw7b/RGTJeNzsR8OwpzMC0Yl6R362fJHCLY02YJQaVhbL\n9xIxBx29iKUB4PXrGKwNkxwEn3A5O12BMAoz40M0JfWG+ek+onxxZuQP7sxj\nf/JpgQGr7jpV9SVmtTps8Rgx/NHP4TamnndEjne1kUQUo2zNpiV9gzhNbxNy\nncwR1CwA3z5JO05Sor9+7nhzzJm6hYF3nOB0nj8sf144zAIQhdUJUDdgoMK6\nlAf7eHW9wST+I7s4ROrHiyThKc3L8UXNlZrt/hbHHNVoD0pD5JY2okwCXzyk\nd527ow/9NApPnGuWbOlIrCkIa1SwtewAuK0KSojRsaXT5J1/FtFi2ZLyCKN2\n6jqEVqGKEq7iDYEVuyD7SDKUBFP7D478D6F70Klg+uSxOLSDglh7uwZroD2b\ngFk1GTQzQuqbYoo7HcHLBjMAITPy+CuMG7N2bUuOfDpraa7lttloq7UpRbgX\nERQX\r\n=QKAR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/d3-sankey.js","module":"index","gitHead":"df24df48b880a81c767d1fcabd5071b684c0e93b","scripts":{"test":"tape 'test/**/*-test.js' && eslint index.js src","pretest":"rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -g d3-array:d3,d3-collection:d3,d3-interpolate:d3 -f umd -n d3 -o build/d3-sankey.js -- index.js","prepublish":"npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-sankey.js -c -m -o build/d3-sankey.min.js","postpublish":"git push && git push --tags && zip -j build/d3-sankey.zip -- LICENSE README.md build/d3-sankey.js build/d3-sankey.min.js"},"_npmUser":{"name":"antrg","email":"antoine@plot.ly"},"repository":{"url":"git+https://github.com/d3/d3-sankey.git","type":"git"},"_npmVersion":"6.2.0","description":"Visualize flow between nodes in a directed acyclic network.","directories":{},"jsnext:main":"index","_nodeVersion":"10.9.0","dependencies":{"d3-array":"1","d3-collection":"1","d3-interpolate":"1"},"_hasShrinkwrap":false,"devDependencies":{"tape":"4","eslint":"3","rollup":"0.41","uglify-js":"2","package-preamble":"0.0.2"},"_npmOperationalInternal":{"tmp":"tmp/d3-sankey_0.5.1_1540413470235_0.6689510180232989","host":"s3://npm-registry-packages"}},"0.7.2":{"name":"@plotly/d3-sankey","version":"0.7.2","keywords":["d3","d3-module","sankey"],"author":{"url":"https://bost.ocks.org/mike/","name":"Mike Bostock"},"license":"BSD-3-Clause","_id":"@plotly/d3-sankey@0.7.2","maintainers":[{"name":"alexcjohnson","email":"alex@plot.ly"},{"name":"andrefarzat","email":"andrefarzat@gmail.com"},{"name":"antrg","email":"antoine@plot.ly"},{"name":"archmoj","email":"arch.mojtaba.samimi@gmail.com"},{"name":"bpostlethwaite","email":"post.ben.here@gmail.com"},{"name":"chriddyp","email":"chris@plot.ly"},{"name":"dmt0","email":"dmt.shvedov@gmail.com"},{"name":"etpinard","email":"etienne.t.pinard@gmail.com"},{"name":"jackparmer","email":"jack@plot.ly"},{"name":"jackwluo","email":"thejackluo@gmail.com"},{"name":"jmmease","email":"jon.mease@gmail.com"},{"name":"marivet","email":"marcandre.rivet@gmail.com"},{"name":"matthew_plotly","email":"mattewchan@plot.ly"},{"name":"maxkfranz","email":"maxkfranz@gmail.com"},{"name":"nicolaskruchten","email":"nicolas@kruchten.com"},{"name":"rmarren1","email":"rymarr@tuta.io"},{"name":"shammamah","email":"shammamah@plot.ly"},{"name":"shannon-lal","email":"shannonlal@hotmail.com"},{"name":"t4rk","email":"t4rk@outlook.com"},{"name":"verazabeida","email":"vera.zabeida@gmail.com"},{"name":"vnieman","email":"valentijn@plot.ly"},{"name":"wilzbach","email":"sebi.wilzbach@gmail.com"},{"name":"xhlu","email":"xing.han.lu@mail.mcgill.ca"}],"homepage":"https://github.com/d3/d3-sankey","bugs":{"url":"https://github.com/d3/d3-sankey/issues"},"dist":{"shasum":"ddd5290d3b02c60037ced018a162644a2ccef33b","tarball":"https://registry.npmjs.org/@plotly/d3-sankey/-/d3-sankey-0.7.2.tgz","fileCount":15,"integrity":"sha512-2jdVos1N3mMp3QW0k2q1ph7Gd6j5PY1YihBrwpkFnKqO+cqtZq3AdEYUeSGXMeLsBDQYiqTVcihYfk8vr5tqhw==","signatures":[{"sig":"MEUCIQC7IF+T8IJhrLZdBSA08Lu301d+38MQVt8yjBrfztLfrQIgD4E1dO/d4usEq8Sq2ayjMCe2NoTV4oxvsZZdfFOWxm8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":822106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcU0rGCRA9TVsSAnZWagAAQ/MP/0wC1//6ua7X7uv9GeOQ\nLTz+Dd4eW5aAH7VLfRUJccA7okgcYV3N8TujwoBTR/11xmWFZOBqF2Zp7xZB\n06xvGOlhHHhEJrEqqykn2uobwJdMbKj2X2/5n2drko7AWFJDGPQYJliBncnL\nZi6NpsMRlF+n2O0l0RR7l6QIVh5ZMGb+WDekgomAXYZPvivkFPUngyEoM78Y\nXurYrRsZpQZDQ4JMkh6KlAckZC6/YujVxG2I4POgPWDVDZvMTHasbcDdAayl\nJ72zO4CTwYoBRM1QJ1HmpbrGHeHwV9rx3wFQPP6+3bTGVHWC8LAdvfdH5zSM\nQaCt3L16xWiTc1guPcGsFHcn922hD6XDOmTs8DAzyoW8irqncGxlGs+60hd2\nP4m9r0bw02Muz/OVI1jgnRkUTiZf1nXAYF2X+s4Kcs3FE7Cs9Kb33uB8w9tJ\nr/QuMNZO7gcud+I02C/jkLF2+RnPzjCTTireR2LnjzS9Or8kFioQdA0Z7BKd\nGO1tU3mZPUPmoTU9YPXm0AvpkUhrbh6KodKnoNKRS+3UE8wviXfeQ0dMI85l\nsySq4F8aoKzD2bCCWabfnk7K/d+Fo886YLXOfHW5PnGqydoHGw0gGXI/Xe6K\n2Mbndt2qyR+hhPUXyv0GzPmBltvNZElJ32KFV6jJBwqAONQwqH+55KFf6Oqq\nCO9G\r\n=lsmv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/d3-sankey.js","module":"index","gitHead":"d046b321955fdfcd2d0c8b0f8055e34c841dd80d","scripts":{"test":"tape 'test/**/*-test.js' && eslint index.js src","pretest":"rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -g d3-array:d3,d3-collection:d3,d3-shape:d3 -f umd -n d3 -o build/d3-sankey.js -- index.js","prepublish":"npm run test && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" build/d3-sankey.js -c -m -o build/d3-sankey.min.js","postpublish":"git push && git push --tags && zip -j build/d3-sankey.zip -- LICENSE README.md build/d3-sankey.js build/d3-sankey.min.js"},"_npmUser":{"name":"antrg","email":"antoine@plot.ly"},"repository":{"url":"git+https://github.com/d3/d3-sankey.git","type":"git"},"_npmVersion":"6.5.0","description":"Visualize flow between nodes in a directed acyclic network.","directories":{},"jsnext:main":"index","_nodeVersion":"10.9.0","dependencies":{"d3-array":"1","d3-shape":"^1.2.0","d3-collection":"1"},"_hasShrinkwrap":false,"devDependencies":{"tape":"4","eslint":"4","rollup":"0.43","uglify-js":"3","package-preamble":"0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/d3-sankey_0.7.2_1548962502022_0.11277234242246625","host":"s3://npm-registry-packages"}},"0.7.3":{"name":"@plotly/d3-sankey","version":"0.7.3","keywords":["d3","d3-module","sankey"],"author":{"url":"https://bost.ocks.org/mike/","name":"Mike Bostock"},"license":"BSD-3-Clause","_id":"@plotly/d3-sankey@0.7.3","maintainers":[{"name":"alexcjohnson","email":"alex@plot.ly"},{"name":"antrg","email":"antoine@plot.ly"},{"name":"archmoj","email":"arch.mojtaba.samimi@gmail.com"},{"name":"bpostlethwaite","email":"post.ben.here@gmail.com"},{"name":"chriddyp","email":"chris@plot.ly"},{"name":"dmt0","email":"dmt.shvedov@gmail.com"},{"name":"emmanuelle","email":"emmanuelle.gouillart@nsup.org"},{"name":"jmmease","email":"jon.mease@gmail.com"},{"name":"jody_plotly","email":"jody@plot.ly"},{"name":"nicolaskruchten","email":"nicolas@kruchten.com"},{"name":"rpkyle","email":"ryan@plotly.com"},{"name":"verazabeida","email":"vera.zabeida@gmail.com"},{"name":"xhlu","email":"xing.han.lu@mail.mcgill.ca"}],"homepage":"https://github.com/plotly/d3-sankey","bugs":{"url":"https://github.com/plotly/d3-sankey/issues"},"dist":{"shasum":"6b49852d2467b26306d4805a47c7dd55139f1f5e","tarball":"https://registry.npmjs.org/@plotly/d3-sankey/-/d3-sankey-0.7.3.tgz","fileCount":15,"integrity":"sha512-qvUcrOb23MCDXu60C0ETqv41OYR/FPQmpDavCS0K9IC+poOF0hpkJz3gRJ6yU87R2+Oe9S4Gg5h+geiuPKV+7g==","signatures":[{"sig":"MEYCIQCqVLgz0XaJTnmKfjGnLgnDi3m0cDBD0H+cX5fgRC+AFAIhAP05bRoNtUwIovXtxZVKZhD7VyGUXp/jaWTFEa4EHmpG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":822122,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOtKjCRA9TVsSAnZWagAA/wMP/3idzCul9G7ER6/iW2TK\nRFJmXBaj+cwm2OXCL3y/5FjDLl+r5Bt5AQrZg83nmdwoZxDzrIVsZHtLxLAV\nAIJBGGRGsJo5vK7MM6jxwn8Hso3utptKfj5H1t6Q5l8CFyuXMc9EsKsLC3AY\nAGpMiHOJk9rmuj+wTq6+GZcDYIdmT+y80wcOSp7AfUOZsGlbimkUSSWwvJZy\n+aeItepOhtP1V1FKayeRlBJLjQYwdFlARjPgUPLGbFjnfnYE7CZvkP4YqkGV\n0EoE8qKhauffBrLFg7OnxyAnIzyi4NnyQOrd31JHyKdC0IFtx+5uAN2V6DI9\nT78gq69pZJFS2qsuQ0UCbwz8MgmJrduAK5l5ix9jgeku0ZCxSJfDGrBG7UAG\nU4M6j2Tc2glN4ziitfyF1IZt0RBnoCB2+EQjqjBOs/P5hdHuLwdKbGXmopMD\nRjGwuse787bxwVK01QJBRYN4SQDZwizANURj6pNjCPG06/uNrzQmFq7EeD/L\nkkYAs/zQLfrYScPf17qxVUen9IFqKM1ms9vNGoFZgT5+2uDNXc/Qnln29T4a\nyIEGAzinfeOjU7LMdTAeo9w5yq6rJGRDlQkoKq0Jdpj2y2f4mcr7v0I6xmu/\nlIT3fkAToQNZaAWTGSKlKqB0IWQNyBAu3WUDhitg19kEsVcZfqiT6ayF3suM\n0seQ\r\n=GXLv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/d3-sankey.js","module":"index","gitHead":"3e1cd06519d38ca51ee28a364cf851c210aeb91e","scripts":{"test":"tape 'test/**/*-test.js' && eslint index.js src","pretest":"rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -g d3-array:d3,d3-collection:d3,d3-shape:d3 -f umd -n d3 -o build/d3-sankey.js -- index.js","prepublish":"npm run test && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" build/d3-sankey.js -c -m -o build/d3-sankey.min.js","postpublish":"git push && git push --tags && zip -j build/d3-sankey.zip -- LICENSE README.md build/d3-sankey.js build/d3-sankey.min.js"},"_npmUser":{"name":"archmoj","email":"arch.mojtaba.samimi@gmail.com"},"repository":{"url":"git+https://github.com/plotly/d3-sankey.git","type":"git"},"_npmVersion":"6.14.7","description":"Visualize flow between nodes in a directed acyclic network.","directories":{},"jsnext:main":"index","_nodeVersion":"12.13.1","dependencies":{"d3-array":"1","d3-shape":"^1.2.0","d3-collection":"1"},"_hasShrinkwrap":false,"devDependencies":{"tape":"4","eslint":"4","rollup":"0.43","uglify-js":"3","package-preamble":"0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/d3-sankey_0.7.3_1597690530984_0.27217176787633357","host":"s3://npm-registry-packages"}},"0.12.3":{"name":"@plotly/d3-sankey","version":"0.12.3","keywords":["d3","d3-module","sankey"],"author":{"url":"https://bost.ocks.org/mike/","name":"Mike Bostock"},"license":"BSD-3-Clause","_id":"@plotly/d3-sankey@0.12.3","maintainers":[{"name":"chriddyp","email":"chris@plot.ly"},{"name":"bpostlethwaite","email":"post.ben.here@gmail.com"},{"name":"antrg","email":"antoine@plot.ly"},{"name":"hammadtheone","email":"hammadtheone@gmail.com"},{"name":"bronsolo","email":"chuck@plot.ly"},{"name":"t4rk","email":"t4rk@outlook.com"},{"name":"alexshoe","email":"alexshoe@gmail.com"},{"name":"lconnors","email":"liam@plotly.com"},{"name":"ndrezner","email":"nathan@drezner.xyz"},{"name":"farkites","email":"mario.rodriguez@plot.ly"},{"name":"alexcjohnson","email":"alex@plot.ly"},{"name":"emilykl-plotly","email":"emily@plot.ly"},{"name":"marthacryan","email":"martha.cryan326@gmail.com"},{"name":"packages-team-plotly","email":"packages@plot.ly"}],"homepage":"https://github.com/plotly/d3-sankey","bugs":{"url":"https://github.com/plotly/d3-sankey/issues"},"dist":{"shasum":"83e98ee86af72dc426287997bfc23915a5db404d","tarball":"https://registry.npmjs.org/@plotly/d3-sankey/-/d3-sankey-0.12.3.tgz","fileCount":10,"integrity":"sha512-GvR0JmTO5bN1iyU3Z4lhq/68De+JAh2NBjNkFWPO6ThExLVrnysxir2riqeDMTgiPbx5iBonAy29/OEd8uak5Q==","signatures":[{"sig":"MEYCIQDcUt5HrjEfTr/HcTyjGpIEyNjHZAMck8ZON2REWD5ZOQIhALPdPliQuJOEyfcsI/tYLBG6kjAaIzEk/Qt0ke+9ynwr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46668},"main":"dist/@plotly/d3-sankey.js","unpkg":"dist/@plotly/d3-sankey.min.js","module":"src/index.js","gitHead":"854e639bf5158b59eb3fb9024be1a270ba58b8a4","scripts":{"test":"tape 'test/**/*-test.js' && eslint src","pretest":"rollup -c","postpublish":"git push && git push --tags && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js","prepublishOnly":"rm -rf dist && yarn test"},"_npmUser":{"name":"packages-team-plotly","email":"packages@plot.ly"},"repository":{"url":"git+https://github.com/plotly/d3-sankey.git","type":"git"},"_npmVersion":"11.10.0","description":"Visualize flow between nodes in a directed acyclic network.","directories":{},"_nodeVersion":"24.2.0","dependencies":{"d3-array":"1 - 2","d3-shape":"^1.2.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"4","eslint":"6","rollup":"1","rollup-plugin-terser":"5"},"_npmOperationalInternal":{"tmp":"tmp/d3-sankey_0.12.3_1780945384944_0.2933576079904372","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2017-05-02T10:43:33.995Z","modified":"2026-09-14T15:41:47.786Z","0.5.0":"2017-05-02T10:43:33.995Z","0.5.1":"2018-10-24T20:37:50.315Z","0.7.2":"2019-01-31T19:21:42.193Z","0.7.3":"2020-08-17T18:55:31.186Z","0.12.3":"2026-06-08T19:03:05.058Z"},"bugs":{"url":"https://github.com/plotly/d3-sankey/issues"},"author":{"url":"https://bost.ocks.org/mike/","name":"Mike Bostock"},"license":"BSD-3-Clause","homepage":"https://github.com/plotly/d3-sankey","keywords":["d3","d3-module","sankey"],"repository":{"url":"git+https://github.com/plotly/d3-sankey.git","type":"git"},"description":"Visualize flow between nodes in a directed acyclic network.","maintainers":[{"email":"chris@plot.ly","name":"chriddyp"},{"email":"post.ben.here@gmail.com","name":"bpostlethwaite"},{"email":"antoine@plot.ly","name":"antrg"},{"email":"chuck@plot.ly","name":"bronsolo"},{"email":"t4rk@outlook.com","name":"t4rk"},{"email":"roman@plot.ly","name":"roman-nb"},{"email":"cameron.decoster@gmail.com","name":"camdecoster"},{"email":"alex@plot.ly","name":"alexcjohnson"},{"email":"adrian.borrmann@plot.ly","name":"aborrmann"},{"email":"emily@plot.ly","name":"emilykl-plotly"},{"email":"packages@plot.ly","name":"packages-team-plotly"}],"readme":"# d3-sankey\n\n<div align=\"center\">\n  <a href=\"https://dash.plotly.com/project-maintenance\">\n    <img src=\"https://dash.plotly.com/assets/images/maintained-by-plotly.png\" width=\"400px\" alt=\"Maintained by Plotly\">\n  </a>\n</div>\n\nSankey diagrams visualize the directed flow between nodes in an acyclic network. For example, this diagram shows a possible scenario of UK energy production and consumption in 2050:\n\n[<img alt=\"Sankey diagram\" src=\"https://raw.githubusercontent.com/d3/d3-sankey/master/img/energy.png\" width=\"960\">](https://observablehq.com/@d3/sankey-diagram)\n\nSource: Department of Energy & Climate Change, Tom Counsell.\n\n**For an interactive editor, see [Flow-o-Matic](https://observablehq.com/@mbostock/flow-o-matic).**\n\n## Installing\n\nIf you use NPM, `npm install d3-sankey`. Otherwise, download the [latest release](https://github.com/d3/d3-sankey/releases/latest). You can also load directly from [unpkg.com](https://unpkg.com/d3-sankey/). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported:\n\n```html\n<script src=\"https://unpkg.com/d3-array@1\"></script>\n<script src=\"https://unpkg.com/d3-collection@1\"></script>\n<script src=\"https://unpkg.com/d3-path@1\"></script>\n<script src=\"https://unpkg.com/d3-shape@1\"></script>\n<script src=\"https://unpkg.com/d3-sankey@0\"></script>\n<script>\n\nvar sankey = d3.sankey();\n\n</script>\n```\n\n## API Reference\n\n<a href=\"#sankey\" name=\"sankey\">#</a> d3.<b>sankey</b>() [<>](https://github.com/d3/d3-sankey/blob/master/src/sankey.js \"Source\")\n\nConstructs a new Sankey generator with the default settings.\n\n<a href=\"#_sankey\" name=\"_sankey\">#</a> <i>sankey</i>(<i>arguments</i>…) [<>](https://github.com/d3/d3-sankey/blob/master/src/sankey.js \"Source\")\n\nComputes the node and link positions for the given *arguments*, returning a *graph* representing the Sankey layout. The returned *graph* has the following properties:\n\n* *graph*.nodes - the array of [nodes](#sankey_nodes)\n* *graph*.links - the array of [links](#sankey_links)\n\n<a href=\"#sankey_update\" name=\"sankey_update\">#</a> <i>sankey</i>.<b>update</b>(<i>graph</i>) [<>](https://github.com/d3/d3-sankey/blob/master/src/sankey.js \"Source\")\n\nRecomputes the specified *graph*’s links’ positions, updating the following properties of each *link*:\n\n* *link*.y0 - the link’s vertical starting position (at source node)\n* *link*.y1 - the link’s vertical end position (at target node)\n\nThis method is intended to be called after computing the initial [Sankey layout](#_sankey), for example when the diagram is repositioned interactively.\n\n<a name=\"sankey_nodes\" href=\"#sankey_nodes\">#</a> <i>sankey</i>.<b>nodes</b>([<i>nodes</i>]) [<>](https://github.com/d3/d3-sankey/blob/master/src/sankey.js \"Source\")\n\nIf *nodes* is specified, sets the Sankey generator’s nodes accessor to the specified function or array and returns this Sankey generator. If *nodes* is not specified, returns the current nodes accessor, which defaults to:\n\n```js\nfunction nodes(graph) {\n  return graph.nodes;\n}\n```\n\nIf *nodes* is specified as a function, the function is invoked when the Sankey layout is [generated](#_sankey), being passed any arguments passed to the Sankey generator. This function must return an array of nodes. If *nodes* is not a function, it must be a constant array of *nodes*.\n\nEach *node* must be an object. The following properties are assigned by the [Sankey generator](#_sankey):\n\n* *node*.sourceLinks - the array of outgoing [links](#sankey_links) which have this node as their source\n* *node*.targetLinks - the array of incoming [links](#sankey_links) which have this node as their target\n* *node*.value - the node’s value; this is the sum of *link*.value for the node’s incoming [links](#sankey_links), or *node*.fixedValue if defined\n* *node*.index - the node’s zero-based index within the array of nodes\n* *node*.depth - the node’s zero-based graph depth, derived from the graph topology\n* *node*.height - the node’s zero-based graph height, derived from the graph topology\n* *node*.layer - the node’s zero-based column index, corresponding to its horizontal position\n* *node*.x0 - the node’s minimum horizontal position, derived from *node*.depth\n* *node*.x1 - the node’s maximum horizontal position (*node*.x0 + [*sankey*.nodeWidth](#sankey_nodeWidth))\n* *node*.y0 - the node’s minimum vertical position\n* *node*.y1 - the node’s maximum vertical position (*node*.y1 - *node*.y0 is proportional to *node*.value)\n\nSee also [*sankey*.links](#sankey_links).\n\n<a name=\"sankey_links\" href=\"#sankey_links\">#</a> <i>sankey</i>.<b>links</b>([<i>links</i>]) [<>](https://github.com/d3/d3-sankey/blob/master/src/sankey.js \"Source\")\n\nIf *links* is specified, sets the Sankey generator’s links accessor to the specified function or array and returns this Sankey generator. If *links* is not specified, returns the current links accessor, which defaults to:\n\n```js\nfunction links(graph) {\n  return graph.links;\n}\n```\n\nIf *links* is specified as a function, the function is invoked when the Sankey layout is [generated](#_sankey), being passed any arguments passed to the Sankey generator. This function must return an array of links. If *links* is not a function, it must be a constant array of *links*.\n\nEach *link* must be an object with the following properties:\n\n* *link*.source - the link’s source [node](#sankey_nodes)\n* *link*.target - the link’s target [node](#sankey_nodes)\n* *link*.value - the link’s numeric value\n\nFor convenience, a link’s source and target may be initialized using numeric or string identifiers rather than object references; see [*sankey*.nodeId](#sankey_nodeId). The following properties are assigned to each link by the [Sankey generator](#_sankey):\n\n* *link*.y0 - the link’s vertical starting position (at source node)\n* *link*.y1 - the link’s vertical end position (at target node)\n* *link*.width - the link’s width (proportional to *link*.value)\n* *link*.index - the zero-based index of *link* within the array of links\n\n<a name=\"sankey_linkSort\" href=\"#sankey_linkSort\">#</a> <i>sankey</i>.<b>linkSort</b>([<i>sort</i>]) [<>](https://github.com/d3/d3-sankey/blob/master/src/sankey.js \"Source\")\n\nIf *sort* is specified, sets the link sort method and returns this Sankey generator. If *sort* is not specified, returns the current link sort method, which defaults to *undefined*, indicating that vertical order of links within each node will be determined automatically by the layout. If *sort* is null, the order is fixed by the input. Otherwise, the specified *sort* function determines the order; the function is passed two links, and must return a value less than 0 if the first link should be above the second, and a value greater than 0 if the second link should be above the first, or 0 if the order is not specified.\n\n<a name=\"sankey_nodeId\" href=\"#sankey_nodeId\">#</a> <i>sankey</i>.<b>nodeId</b>([<i>id</i>]) [<>](https://github.com/d3/d3-sankey/blob/master/src/sankey.js \"Source\")\n\nIf *id* is specified, sets the node id accessor to the specified function and returns this Sankey generator. If *id* is not specified, returns the current node id accessor, which defaults to the numeric *node*.index:\n\n```js\nfunction id(d) {\n  return d.index;\n}\n```\n\nThe default id accessor allows each link’s source and target to be specified as a zero-based index into the [nodes](#sankey_nodes) array. For example:\n\n```js\nvar nodes = [\n  {\"id\": \"Alice\"},\n  {\"id\": \"Bob\"},\n  {\"id\": \"Carol\"}\n];\n\nvar links = [\n  {\"source\": 0, \"target\": 1}, // Alice → Bob\n  {\"source\": 1, \"target\": 2} // Bob → Carol\n];\n```\n\nNow consider a different id accessor that returns a string:\n\n```js\nfunction id(d) {\n  return d.id;\n}\n```\n\nWith this accessor, you can use named sources and targets:\n\n```js\nvar nodes = [\n  {\"id\": \"Alice\"},\n  {\"id\": \"Bob\"},\n  {\"id\": \"Carol\"}\n];\n\nvar links = [\n  {\"source\": \"Alice\", \"target\": \"Bob\"},\n  {\"source\": \"Bob\", \"target\": \"Carol\"}\n];\n```\n\nThis is particularly useful when representing graphs in JSON, as JSON does not allow references. See [this example](https://bl.ocks.org/mbostock/f584aa36df54c451c94a9d0798caed35).\n\n<a name=\"sankey_nodeAlign\" href=\"#sankey_nodeAlign\">#</a> <i>sankey</i>.<b>nodeAlign</b>([<i>align</i>]) [<>](https://github.com/d3/d3-sankey/blob/master/src/sankey.js \"Source\")\n\nIf *align* is specified, sets the node [alignment method](#alignments) to the specified function and returns this Sankey generator. If *align* is not specified, returns the current node alignment method, which defaults to [d3.sankeyJustify](#sankeyJustify). The specified function is evaluated for each input *node* in order, being passed the current *node* and the total depth *n* of the graph (one plus the maximum *node*.depth), and must return an integer between 0 and *n* - 1 that indicates the desired horizontal position of the node in the generated Sankey diagram.\n\n<a name=\"sankey_nodeSort\" href=\"#sankey_nodeSort\">#</a> <i>sankey</i>.<b>nodeSort</b>([<i>sort</i>]) [<>](https://github.com/d3/d3-sankey/blob/master/src/sankey.js \"Source\")\n\nIf *sort* is specified, sets the node sort method and returns this Sankey generator. If *sort* is not specified, returns the current node sort method, which defaults to *undefined*, indicating that vertical order of nodes within each column will be determined automatically by the layout. If *sort* is null, the order is fixed by the input. Otherwise, the specified *sort* function determines the order; the function is passed two nodes, and must return a value less than 0 if the first node should be above the second, and a value greater than 0 if the second node should be above the first, or 0 if the order is not specified.\n\n<a name=\"sankey_nodeWidth\" href=\"#sankey_nodeWidth\">#</a> <i>sankey</i>.<b>nodeWidth</b>([<i>width</i>]) [<>](https://github.com/d3/d3-sankey/blob/master/src/sankey.js \"Source\")\n\nIf *width* is specified, sets the node width to the specified number and returns this Sankey generator. If *width* is not specified, returns the current node width, which defaults to 24.\n\n<a name=\"sankey_nodePadding\" href=\"#sankey_nodePadding\">#</a> <i>sankey</i>.<b>nodePadding</b>([<i>padding</i>]) [<>](https://github.com/d3/d3-sankey/blob/master/src/sankey.js \"Source\")\n\nIf *padding* is specified, sets the vertical separation between nodes at each column to the specified number and returns this Sankey generator. If *padding* is not specified, returns the current node padding, which defaults to 8.\n\n<a name=\"sankey_extent\" href=\"#sankey_extent\">#</a> <i>sankey</i>.<b>extent</b>([<i>extent</i>]) [<>](https://github.com/d3/d3-sankey/blob/master/src/sankey.js \"Source\")\n\nIf *extent* is specified, sets the extent of the Sankey layout to the specified bounds and returns the layout. The *extent* bounds are specified as an array \\[\\[<i>x0</i>, <i>y0</i>\\], \\[<i>x1</i>, <i>y1</i>\\]\\], where *x0* is the left side of the extent, *y0* is the top, *x1* is the right and *y1* is the bottom. If *extent* is not specified, returns the current extent which defaults to [[0, 0], [1, 1]].\n\n<a name=\"sankey_size\" href=\"#sankey_size\">#</a> <i>sankey</i>.<b>size</b>([<i>size</i>]) [<>](https://github.com/d3/d3-sankey/blob/master/src/sankey.js \"Source\")\n\nAn alias for [*sankey*.extent](#sankey_extent) where the minimum *x* and *y* of the extent are ⟨0,0⟩. Equivalent to:\n\n```js\nsankey.extent([[0, 0], size]);\n```\n\n<a name=\"sankey_iterations\" href=\"#sankey_iterations\">#</a> <i>sankey</i>.<b>iterations</b>([<i>iterations</i>]) [<>](https://github.com/d3/d3-sankey/blob/master/src/sankey.js \"Source\")\n\nIf *iterations* is specified, sets the number of relaxation iterations when [generating the layout](#_sankey) and returns this Sankey generator. If *iterations* is not specified, returns the current number of relaxation iterations, which defaults to 6.\n\n### Alignments\n\nSee [*sankey*.nodeAlign](#sankey_nodeAlign).\n\n<a name=\"sankeyLeft\" href=\"#sankeyLeft\">#</a> d3.<b>sankeyLeft</b>(<i>node</i>, <i>n</i>) [<>](https://github.com/d3/d3-sankey/blob/master/src/align.js \"Source\")\n\n[<img alt=\"left\" src=\"https://raw.githubusercontent.com/d3/d3-sankey/master/img/align-left.png\" width=\"480\">](https://observablehq.com/@d3/sankey-diagram?align=left)\n\nReturns *node*.depth.\n\n<a name=\"sankeyRight\" href=\"#sankeyRight\">#</a> d3.<b>sankeyRight</b>(<i>node</i>, <i>n</i>) [<>](https://github.com/d3/d3-sankey/blob/master/src/align.js \"Source\")\n\n[<img alt=\"right\" src=\"https://raw.githubusercontent.com/d3/d3-sankey/master/img/align-right.png\" width=\"480\">](https://observablehq.com/@d3/sankey-diagram?align=right)\n\nReturns *n* - 1 - *node*.height.\n\n<a name=\"sankeyCenter\" href=\"#sankeyCenter\">#</a> d3.<b>sankeyCenter</b>(<i>node</i>, <i>n</i>) [<>](https://github.com/d3/d3-sankey/blob/master/src/align.js \"Source\")\n\n[<img alt=\"center\" src=\"https://raw.githubusercontent.com/d3/d3-sankey/master/img/align-center.png\" width=\"480\">](https://observablehq.com/@d3/sankey-diagram?align=center)\n\nLike [d3.sankeyLeft](#sankeyLeft), except that nodes without any incoming links are moved as right as possible.\n\n<a name=\"sankeyJustify\" href=\"#sankeyJustify\">#</a> d3.<b>sankeyJustify</b>(<i>node</i>, <i>n</i>) [<>](https://github.com/d3/d3-sankey/blob/master/src/align.js \"Source\")\n\n[<img alt=\"justify\" src=\"https://raw.githubusercontent.com/d3/d3-sankey/master/img/energy.png\" width=\"480\">](https://observablehq.com/@d3/sankey-diagram)\n\nLike [d3.sankeyLeft](#sankeyLeft), except that nodes without any outgoing links are moved to the far right.\n\n### Links\n\n<a name=\"sankeyLinkHorizontal\" href=\"#sankeyLinkHorizontal\">#</a> d3.<b>sankeyLinkHorizontal</b>() [<>](https://github.com/d3/d3-sankey/blob/master/src/sankeyLinkHorizontal.js \"Source\")\n\nReturns a [horizontal link shape](https://github.com/d3/d3-shape/blob/master/README.md#linkHorizontal) suitable for a Sankey diagram. The [source accessor](https://github.com/d3/d3-shape/blob/master/README.md#link_source) is defined as:\n\n```js\nfunction source(d) {\n  return [d.source.x1, d.y0];\n}\n```\n\nThe [target accessor](https://github.com/d3/d3-shape/blob/master/README.md#link_target) is defined as:\n\n```js\nfunction target(d) {\n  return [d.target.x0, d.y1];\n}\n```\n\nFor example, to render the links of a Sankey diagram in SVG, you might say:\n\n```js\nsvg.append(\"g\")\n    .attr(\"fill\", \"none\")\n    .attr(\"stroke\", \"#000\")\n    .attr(\"stroke-opacity\", 0.2)\n  .selectAll(\"path\")\n  .data(graph.links)\n  .join(\"path\")\n    .attr(\"d\", d3.sankeyLinkHorizontal())\n    .attr(\"stroke-width\", function(d) { return d.width; });\n```\n","readmeFilename":"README.md"}