Commit 4a393f26 by zhaochengxiang

热力图优化

parent 70f6a4e7
......@@ -23,6 +23,7 @@ class Thermodynamic extends React.Component {
if (!data || (data.length>0&&(data[0].children||[]).length===0)) {
this.graph?.clear();
} else {
this.graph?.dispose();
this.graph = init(this)(this.elem, data, onClick);
}
} else if (resize !== prevProps.resize) {
......@@ -87,14 +88,14 @@ const init = (ctx) => function (container, data, onClick) {
}
var option = {
title: {
text: ((data||[]).length>0) ? `${data[0]?.text||''} (${data[0]?.dataAssetAndSubDirCount})` : '',
left: 'center',
bottom: 10,
textStyle: {
fontSize: 16
}
},
// title: {
// text: ((data||[]).length>0) ? `${data[0]?.text||''} (${data[0]?.dataAssetAndSubDirCount})` : '',
// left: 'center',
// bottom: 10,
// textStyle: {
// fontSize: 16
// }
// },
tooltip: {
formatter: function (info) {
var treePathInfo = info.treePathInfo;
......@@ -111,7 +112,7 @@ const init = (ctx) => function (container, data, onClick) {
},
series: [
{
// name: ((data||[]).length>0) ? `${data[0]?.text||''} (${data[0]?.dataAssetAndSubDirCount})` : '',
name: ((data||[]).length>0) ? `${data[0]?.text||''} (${data[0]?.dataAssetAndSubDirCount})` : '',
type: 'treemap',
height: '85%',
visibleMin: 0,
......@@ -128,7 +129,8 @@ const init = (ctx) => function (container, data, onClick) {
borderColor: '#555'
},
breadcrumb: {
show: false,
show: true,
top: '95%',
},
levels: getLevelOption(),
data: ((data||[]).length>0) ? (data[0].children||[]) : [],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment