网上搜了出来都是php上传,有哪位同学知道怎么不用php嘛?我只要在自己的电脑上能显示就行了。html>
ECharts// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('main'));
myChart.showLoading();
$.get('SJ.json', function (data) {
myChart.hideLoading();
myChart.setOption(option = {
title: {
text: 'Sankey Diagram'
},
tooltip: {
trigger: 'item',
triggerOn: 'mousemove'
},
series: [
{
type: 'sankey',
layout:'none',
data: data.nodes,
links: data.links,
itemStyle: {
normal: {
borderWidth: 1,
borderColor: '#aaa'
}
},
lineStyle: {
normal: {
curveness: 0.5
}
}
}
]
});
});
myChart.setOption(option);