Authored by 鲁尚清

趋势图调整了图例距离上下的距离,增加了配置项

... ... @@ -679,6 +679,14 @@ export const monitorCustomBarLineChart = {
value: 'top'
},
{
type: 'el-input-number',
label: '距离顶部/底部距离',
name: 'legendHeight',
required: false,
placeholder: '',
value: 30,
},
{
type: 'el-select',
label: '布局前置',
name: 'layoutFront',
... ...
... ... @@ -456,9 +456,9 @@ export default {
const legend = this.options.legend;
legend.show = optionsSetup.isShowLegend;
legend.left = optionsSetup.lateralPosition;
legend.top = optionsSetup.longitudinalPosition == "top" ? 20 : "auto";
legend.top = optionsSetup.longitudinalPosition == "top" ? optionsSetup.legendHeight : "auto";
legend.bottom =
optionsSetup.longitudinalPosition == "bottom" ? 0 : "auto";
optionsSetup.longitudinalPosition == "bottom" ? optionsSetup.legendHeight : "auto";
legend.orient = optionsSetup.layoutFront;
legend.textStyle = {
color: optionsSetup.lengedColor,
... ...