forked from github/dataease
feat: 矩形树图优化
This commit is contained in:
parent
475e6059e7
commit
a4cc937575
@ -28,9 +28,17 @@ export function baseTreemapOption(chart_option, chart) {
|
|||||||
chart_option.series[0].height = (customAttr.size.treemapHeight ? customAttr.size.treemapHeight : 80) + '%'
|
chart_option.series[0].height = (customAttr.size.treemapHeight ? customAttr.size.treemapHeight : 80) + '%'
|
||||||
}
|
}
|
||||||
// label
|
// label
|
||||||
// if (customAttr.label) {
|
if (customAttr.label) {
|
||||||
// chart_option.series[0].label = 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
|
const valueArr = chart.data.series[0].data
|
||||||
for (let i = 0; i < valueArr.length; i++) {
|
for (let i = 0; i < valueArr.length; i++) {
|
||||||
// const y = {
|
// const y = {
|
||||||
|
@ -436,7 +436,7 @@
|
|||||||
<el-collapse-item v-show="chart.type !== 'map'" name="size" :title="$t('chart.size')">
|
<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" />
|
<size-selector :param="param" class="attr-selector" :chart="chart" @onSizeChange="onSizeChange" />
|
||||||
</el-collapse-item>
|
</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" />
|
<label-selector :param="param" class="attr-selector" :chart="chart" @onLabelChange="onLabelChange" />
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item v-show="!view.type.includes('table') && !view.type.includes('text')" name="tooltip" :title="$t('chart.tooltip')">
|
<el-collapse-item v-show="!view.type.includes('table') && !view.type.includes('text')" name="tooltip" :title="$t('chart.tooltip')">
|
||||||
|
Loading…
Reference in New Issue
Block a user