首页 > 技术文章 > Echarts学习求教

penglinjiang 2016-03-08 15:38 原文

有没有人用过百度的Echarts?刚开始接触,下面这段代码怎么理解啊,新手求指教:

myChart.showLoading();
$.get('data/asset/data/les-miserables.gexf', function (xml) {
myChart.hideLoading();

var graph = echarts.dataTool.gexf.parse(xml);
var categories = [];
for (var i = 0; i < 9; i++) {
categories[i] = {
name: '类目' + i
};
}
graph.nodes.forEach(function (node) {
node.itemStyle = null;
node.value = node.symbolSize;
node.label = {
normal: {
show: node.symbolSize > 30
}
};
node.category = node.attributes.modularity_class;
});

推荐阅读