Skip to content

Instantly share code, notes, and snippets.

@icodejs
Created January 18, 2013 13:45
Show Gist options
  • Save icodejs/4564613 to your computer and use it in GitHub Desktop.
Save icodejs/4564613 to your computer and use it in GitHub Desktop.
ReportGrid.sankey("#chart", {
axes: ["viewers"],
datapoints: data2()
});
function data2() {
return [{
"head": "show1",
"tail": "show2",
"viewers": 3.5364526659412405
}, {
"head": "show1",
"tail": "show3",
"viewers": 0.24483133841131663
}, {
"head": "show1",
"tail": "show4",
"viewers": 0.13601741022850924
}, {
"head": "show1",
"tail": "show5",
"viewers": 0.1088139281828074
}, {
"head": "show1",
"tail": "show6",
"viewers": 0.1088139281828074
}, {
"head": "show1",
"tail": "Other",
"viewers": 0.5168661588683352
}, {
"head": "show1",
"tail": "Direct",
"viewers": 95.34820457018498
}, {
"head": "show7 ",
"tail": "show1",
"viewers": 0.13601741022850924
}, {
"head": "show8 ",
"tail": "show1",
"viewers": 0.1088139281828074
}, {
"head": "show11 ",
"tail": "show1",
"viewers": 0.08161044613710555
}, {
"head": "show9 ",
"tail": "show1",
"viewers": 0.08161044613710555
}, {
"head": "show10 ",
"tail": "show1",
"viewers": 0.08161044613710555
}, {
"head": "Other ",
"tail": "show1",
"viewers": 0.7889009793253536
}, {
"head": "Direct ",
"tail": "show1",
"viewers": 98.721436343852
}];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment