Authored by 鲁尚清

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

@@ -679,6 +679,14 @@ export const monitorCustomBarLineChart = { @@ -679,6 +679,14 @@ export const monitorCustomBarLineChart = {
679 value: 'top' 679 value: 'top'
680 }, 680 },
681 { 681 {
  682 + type: 'el-input-number',
  683 + label: '距离顶部/底部距离',
  684 + name: 'legendHeight',
  685 + required: false,
  686 + placeholder: '',
  687 + value: 30,
  688 + },
  689 + {
682 type: 'el-select', 690 type: 'el-select',
683 label: '布局前置', 691 label: '布局前置',
684 name: 'layoutFront', 692 name: 'layoutFront',
@@ -456,9 +456,9 @@ export default { @@ -456,9 +456,9 @@ export default {
456 const legend = this.options.legend; 456 const legend = this.options.legend;
457 legend.show = optionsSetup.isShowLegend; 457 legend.show = optionsSetup.isShowLegend;
458 legend.left = optionsSetup.lateralPosition; 458 legend.left = optionsSetup.lateralPosition;
459 - legend.top = optionsSetup.longitudinalPosition == "top" ? 20 : "auto"; 459 + legend.top = optionsSetup.longitudinalPosition == "top" ? optionsSetup.legendHeight : "auto";
460 legend.bottom = 460 legend.bottom =
461 - optionsSetup.longitudinalPosition == "bottom" ? 0 : "auto"; 461 + optionsSetup.longitudinalPosition == "bottom" ? optionsSetup.legendHeight : "auto";
462 legend.orient = optionsSetup.layoutFront; 462 legend.orient = optionsSetup.layoutFront;
463 legend.textStyle = { 463 legend.textStyle = {
464 color: optionsSetup.lengedColor, 464 color: optionsSetup.lengedColor,