如题 生成的gexf文件没有问题 第一次可以加载出来 第二次请求如果修改gexf文件就会出问题 后台会报 “请求的操作无法在使用用户映射区域打开的文件上执行。”
$.post(filepath, function (xml) {
myChart.hideLoading();
var graph = echarts.dataTool.gexf.parse(xml);
var categories = [];
for (var i = 0; i < 11; i++) {
categories[i] = {
name: '类目' + i
};
}
graph.nodes.forEach(function (node) {
node.itemStyle = null;
//node.symbolSize = node.attributes.modularity_class +5;
//node.value = node.attributes.indegree;
//node.category = node.attributes.modularity_class -1 ;
node.value = node.symbolSize;
node.label = {
normal: {
show: node.symbolSize > 29
}
};
node.category = node.attributes.modularity_class;
// Use random x, y
node.x = node.y = null;
node.draggable = true;
});
option = {