提交 a4cc9375 authored 作者: junjie's avatar junjie

feat: 矩形树图优化

上级 475e6059
......@@ -28,9 +28,17 @@ export function baseTreemapOption(chart_option, chart) {
chart_option.series[0].height = (customAttr.size.treemapHeight ? customAttr.size.treemapHeight : 80) + '%'
}
// label
// if (customAttr.label) {
// chart_option.series[0].label = customAttr.label
// }
if (customAttr.label) {
// chart_option.series[0].label = customAttr.label
const l = {
show: true,
position: customAttr.label.position,
color: customAttr.label.color,
fontSize: customAttr.label.fontSize,
formatter: customAttr.label.show ? customAttr.label.formatter : ''
}
chart_option.series[0].label = l
}
const valueArr = chart.data.series[0].data
for (let i = 0; i < valueArr.length; i++) {
// const y = {
......
......@@ -436,7 +436,7 @@
<el-collapse-item v-show="chart.type !== 'map'" name="size" :title="$t('chart.size')">
<size-selector :param="param" class="attr-selector" :chart="chart" @onSizeChange="onSizeChange" />
</el-collapse-item>
<el-collapse-item v-show="!view.type.includes('table') && !view.type.includes('text') && view.type !== 'treemap'" name="label" :title="$t('chart.label')">
<el-collapse-item v-show="!view.type.includes('table') && !view.type.includes('text')" name="label" :title="$t('chart.label')">
<label-selector :param="param" class="attr-selector" :chart="chart" @onLabelChange="onLabelChange" />
</el-collapse-item>
<el-collapse-item v-show="!view.type.includes('table') && !view.type.includes('text')" name="tooltip" :title="$t('chart.tooltip')">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论