|
@@ -20,9 +20,12 @@ function drawGraph(data,resultShowId) {
|
|
|
var myChart = echarts.init(document.getElementById('main'));
|
|
|
var categories = data['categories'];
|
|
|
var legends = categories.slice(2, categories.length);
|
|
|
-
|
|
|
var option = {
|
|
|
- title: { text: '医学知识图谱' },
|
|
|
+ title: {
|
|
|
+ text: '医学知识图谱',
|
|
|
+ top: '10',
|
|
|
+ left: '10'
|
|
|
+ },
|
|
|
// color:colors,
|
|
|
tooltip: {
|
|
|
formatter: function (x) {
|
|
@@ -45,7 +48,7 @@ function drawGraph(data,resultShowId) {
|
|
|
cursor:'pointer',
|
|
|
categories: categories,
|
|
|
symbolSize: 80,
|
|
|
- roam: true,
|
|
|
+ roam: 'move',
|
|
|
edgeSymbol: ['circle', 'arrow'],
|
|
|
edgeSymbolSize: [1, 5],
|
|
|
edgeLabel: {
|
|
@@ -62,7 +65,7 @@ function drawGraph(data,resultShowId) {
|
|
|
edgeLength: [4, 7],
|
|
|
layoutAnimation : true
|
|
|
},
|
|
|
- draggable: true,
|
|
|
+ draggable: false,
|
|
|
animation: true,
|
|
|
hoverAnimation:false,
|
|
|
animationDuration:5000,
|
|
@@ -97,10 +100,11 @@ function drawGraph(data,resultShowId) {
|
|
|
textStyle: {
|
|
|
cursor:'pointer',
|
|
|
},
|
|
|
+ // color:'#333', //label字体颜色
|
|
|
formatter: function (x) {
|
|
|
var tmp = x.data.label;
|
|
|
- if(tmp.length >= 8){
|
|
|
- tmp = tmp.substring(0,3);
|
|
|
+ if(tmp.length >= 12){
|
|
|
+ tmp = tmp.substring(0,12);
|
|
|
tmp = tmp + "...";
|
|
|
}
|
|
|
return tmp;
|
|
@@ -190,10 +194,10 @@ function drawTree(data, showNodeName){
|
|
|
//树的显示设置
|
|
|
view:{
|
|
|
showLine:true, //设置是否显示连线 默认为true
|
|
|
- showTitle: false,//设置是否显示鼠标悬浮时显示title的效果
|
|
|
+ showTitle: true,//设置是否显示鼠标悬浮时显示title的效果
|
|
|
dblClickExpand: true,//设置是否支持双击展开树节点
|
|
|
fontCss : {color:"#333"},//设置节点样式
|
|
|
- expandSpeed: "slow",//设置展开的速度 fast normal slow
|
|
|
+ expandSpeed: "normal",//设置展开的速度 fast normal slow
|
|
|
nameIsHTML: true,//名字是否是HTML
|
|
|
selectedMulti: true,
|
|
|
|