feat: rejust some parameters

上级 e2d9f4ba
......@@ -55,8 +55,6 @@ $.get('visual.json', function (diskData) {
name: "root." + link.source,
value: 1
}
} else {
dMap[link.source].value++
}
}
......@@ -75,24 +73,54 @@ $.get('visual.json', function (diskData) {
return [
{
itemStyle: {
borderWidth: 0,
gapWidth: 5
borderColor: '#555',
borderWidth: 4,
gapWidth: 4
}
},
{
colorSaturation: [0.2, 0.8],
itemStyle: {
borderColorSaturation: 0.7,
gapWidth: 3,
borderWidth: 2
}
},
{
colorSaturation: [0.3, 0.5],
itemStyle: {
borderColorSaturation: 0.6,
gapWidth: 2
}
},
{
colorSaturation: [0.3, 0.5],
itemStyle: {
borderColorSaturation: 0.6,
gapWidth: 1
}
},
{
colorSaturation: [0.35, 0.5],
borderColor: '#fff',
colorSaturation: [0.3, 0.5],
itemStyle: {
gapWidth: 1,
borderColorSaturation: 0.6
borderColorSaturation: 0.6,
gapWidth: 1
}
}
];
}
function colorMappingChange(value) {
var levelOption = getLevelOption(value);
chart.setOption({
series: [{
levels: levelOption
}]
});
}
myChart.setOption({
title: {
text: 'Call',
......@@ -109,8 +137,8 @@ $.get('visual.json', function (diskData) {
}
return [
'<div class="tooltip-title">' + formatUtil.encodeHTML(treePath.join('/')) + '</div>',
'Call' + formatUtil.addCommas(value) + ' ',
'<div class="tooltip-title">' + formatUtil.encodeHTML(treePath.join('.')) + '</div>',
'Call ' + formatUtil.addCommas(value) + ' ',
].join('');
}
},
......@@ -121,12 +149,56 @@ $.get('visual.json', function (diskData) {
type: 'treemap',
visibleMin: 300,
label: {
show: true,
formatter: '{b}'
position: 'insideTopLeft',
formatter: function (params) {
// var arr = [
// '{name|' + params.name + '}',
// '{hr|}',
// '{budget|$ ' + echarts.format.addCommas(params.value[0]) + '} {label|budget}'
// ];
//
// mode !== 1 && arr.push(
// '{household|$ ' + echarts.format.addCommas((+params.value[3].toFixed(4)) * 1000) + '} {label|per household}'
// );
return params.name;
},
rich: {
budget: {
fontSize: 22,
lineHeight: 30,
color: 'yellow'
},
household: {
fontSize: 14,
color: '#fff'
},
label: {
fontSize: 9,
backgroundColor: 'rgba(0,0,0,0.3)',
color: '#fff',
borderRadius: 2,
padding: [2, 4],
lineHeight: 25,
align: 'right'
},
name: {
fontSize: 12,
color: '#fff'
},
hr: {
width: '100%',
borderColor: 'rgba(255,255,255,0.2)',
borderWidth: 0.5,
height: 0,
lineHeight: 10
}
}
},
itemStyle: {
borderColor: '#fff'
},
visualDimension: 2,
levels: getLevelOption(),
data: data.children
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册