Merge pull request #13582 from dataease/pr@dev-v2@chart-length-limit-fix

fix(图表): 修复不是条形图的图表,在纵轴标签中出现长度限制输入框的问题
This commit is contained in:
jianneng-fit2cloud 2024-11-26 19:53:58 +08:00 committed by GitHub
commit ec6f6a2510
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 16 additions and 4 deletions

View File

@ -414,6 +414,7 @@ onMounted(() => {
class="form-item" class="form-item"
:class="'form-item-' + themes" :class="'form-item-' + themes"
:label="t('chart.length_limit')" :label="t('chart.length_limit')"
v-if="showProperty('showLengthLimit')"
> >
<el-input-number <el-input-number
:disabled="!state.axisForm.axisLabel.show" :disabled="!state.axisForm.axisLabel.show"

View File

@ -66,7 +66,8 @@ export class HorizontalBar extends G2PlotChartView<BarOptions, Bar> {
'splitLine', 'splitLine',
'axisForm', 'axisForm',
'axisLabel', 'axisLabel',
'position' 'position',
'showLengthLimit'
] ]
} }
axis: AxisType[] = [...BAR_AXIS_TYPE] axis: AxisType[] = [...BAR_AXIS_TYPE]

View File

@ -57,7 +57,15 @@ export class ProgressBar extends G2PlotChartView<BarOptions, G2Progress> {
'basic-style-selector': ['colors', 'alpha', 'gradient', 'radiusColumnBar'], 'basic-style-selector': ['colors', 'alpha', 'gradient', 'radiusColumnBar'],
'label-selector': ['hPosition', 'color', 'fontSize'], 'label-selector': ['hPosition', 'color', 'fontSize'],
'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'tooltipFormatter', 'show'], 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'tooltipFormatter', 'show'],
'y-axis-selector': ['name', 'color', 'fontSize', 'axisForm', 'axisLabel', 'position'], 'y-axis-selector': [
'name',
'color',
'fontSize',
'axisForm',
'axisLabel',
'position',
'showLengthLimit'
],
'function-cfg': ['emptyDataStrategy'] 'function-cfg': ['emptyDataStrategy']
} }
axis: AxisType[] = [...BAR_AXIS_TYPE, 'yAxisExt'] axis: AxisType[] = [...BAR_AXIS_TYPE, 'yAxisExt']

View File

@ -66,7 +66,8 @@ export class RangeBar extends G2PlotChartView<BarOptions, Bar> {
'splitLine', 'splitLine',
'axisForm', 'axisForm',
'axisLabel', 'axisLabel',
'position' 'position',
'showLengthLimit'
] ]
} }
axis: AxisType[] = [...BAR_AXIS_TYPE, 'yAxisExt'] axis: AxisType[] = [...BAR_AXIS_TYPE, 'yAxisExt']

View File

@ -68,7 +68,8 @@ export class Waterfall extends G2PlotChartView<WaterfallOptions, G2Waterfall> {
'splitLine', 'splitLine',
'axisForm', 'axisForm',
'axisLabel', 'axisLabel',
'axisLabelFormatter' 'axisLabelFormatter',
'showLengthLimit'
] ]
} }
axis: AxisType[] = ['xAxis', 'yAxis', 'filter', 'drill', 'extLabel', 'extTooltip'] axis: AxisType[] = ['xAxis', 'yAxis', 'filter', 'drill', 'extLabel', 'extTooltip']