Skip to content

Instantly share code, notes, and snippets.

@hiyangguo
Created October 12, 2016 13:35
Show Gist options
  • Save hiyangguo/79cb2bcfa5aa5ecab683716fad3cd6a1 to your computer and use it in GitHub Desktop.
Save hiyangguo/79cb2bcfa5aa5ecab683716fad3cd6a1 to your computer and use it in GitHub Desktop.
echarts sankey config
option = {
"title": {
"x": "center",
"y": "20",
"textStyle": {
"color": "#999",
"fontWeight": "100"
},
"text": "来源分析"
},
"tooltip": {
"trigger": "item",
"triggerOn": "mousemove"
},
"series": [
{
"type": "sankey",
"layoutIterations": 99,
"top": 50,
"nodeWidth": 100,
"nodeGap": 30,
"data": [
{
"name": "首页",
"value": 102336
},
{
"name": "签到领金币",
"value": 83034
},
{
"name": "进入iBuick",
"value": 8098
},
{
"name": "油费随手记",
"value": 6868
},
{
"name": "违章查询",
"value": 4336
},
{
"name": "幸运大抽奖",
"value": 61785
},
{
"name": "进入个人中心",
"value": 1797
}
],
"links": [
{
"source": "首页",
"target": "签到领金币",
"value": 83034
},
{
"source": "首页",
"target": "进入iBuick",
"value": 8098
},
{
"source": "首页",
"target": "油费随手记",
"value": 6868
},
{
"source": "首页",
"target": "违章查询",
"value": 4336
},
{
"source": "签到领金币",
"target": "幸运大抽奖",
"value": 61785
},
{
"source": "签到领金币",
"target": "进入个人中心",
"value": 1797
}
],
"label": {
"emphasis": {
"textStyle": {
"color": "#575757"
}
}
},
"tooltip": {
"trigger": "item"
},
"itemStyle": {
"normal": {
"borderWidth": 1,
"borderColor": "#aaa",
"label": {
"show": true,
"textStyle": {
"fontSize": "12"
}
}
},
"emphasis": {
"label": {
"show": true,
"textStyle": {
"color": "#eee"
}
},
"areaStyle": {
"color": "#d7504b"
},
"areaColor": "#d7504b"
}
},
"lineStyle": {
"normal": {
"color": "source",
"curveness": 0.6
}
}
}
],
"backgroundColor": "#f5f5f5",
"color": [
"#fe8463",
"#9bca63",
"#fad860",
"#60c0dd",
"#0084c6",
"#d7504b",
"#c6e579",
"#26c0c0",
"#f0805a",
"#f4e001",
"#b5c334"
],
"type": "sankey"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment