Value:' + val + '>',
].join('\n');
// return [
// '{name|' + name + '}',
// '{basic| 资产数量:' + asset_num + '}',
// ].join('\n');
},
// rich: RICH, tooltip不支持富文本
},
series: [{
name: 'flare',
type: 'treemap',
visibleMin: 1,
// data: format_struct_data(info2.children, structs_datas),
data: structs_datas,
leafDepth: 1,
label: {
normal: {
show: true,
position: 'insideTopLeft',
formatter: function(a) {
console.log('formatter==label=======', a);
return '{Name|' + a.name + '}' + "\n\n" + "{basic|Value: " + a.data.value + '}' ;
// return [
// '
' + a.name + '
',
// '
',
// ].join('');
},
textStyle: {
// color: '', label的字体颜色
fontSize: '14',
fontWeight: 'bold'
},
rich: RICH,
},
// emphasis: {
// show: true,
// position: 'insideTopLeft',
// formatter: function(a) {
// console.log('formatter===label======', a);
// return a.name + "\n\n" + "资产数量 : " + a.data.value + "\n等级得分";
// },
// textStyle: {
// fontSize: '14',
// fontWeight: 'bold'
// }
// }
},
levels: [{
itemStyle: {
normal: {
borderWidth: 0,
gapWidth: 2
}
}
}, {
itemStyle: {
normal: {
gapWidth: 2
}
}
}, {
// colorSaturation: [0.35, 0.5],
itemStyle: {
normal: {
gapWidth: 2,
// borderColorSaturation: 0.6
}
}
}],
breadcrumb: {
show: true,
// "height": 22,
left: "10%",
top: "93%",
emptyItemWidth: 25,
itemStyle: {
normal: {
color: "#fff",
borderColor: "rgba(255,255,255,0.7)",
borderWidth: 1,
shadowColor: "rgba(150,150,150,1)",
shadowBlur: 3,
shadowOffsetX: 0,
shadowOffsetY: 0,
textStyle: {
color: "#000",
fontWeight: 'bold'
}
},
emphasis: {
textStyle: {}
}
}
},
}]
});
document.oncontextmenu = function() {
return false;
};
myChart.on('contextmenu', showMenu);