From e1ad3a54b2dd5ccbb9575970cba4cf2caa19ec6a Mon Sep 17 00:00:00 2001 From: ulleo Date: Tue, 11 Jun 2024 11:50:22 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=9B=BE=E8=A1=A8):=20=E6=9F=B1=E7=BA=BF?= =?UTF-8?q?=E7=BB=84=E5=90=88=E5=9B=BE=E8=B0=83=E6=95=B4=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E5=B7=A6=E8=BD=B4=E4=B8=BA=E6=9F=B1=EF=BC=8C=E5=8F=B3=E8=BD=B4?= =?UTF-8?q?=E4=B8=BA=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/locales/zh-CN.ts | 2 ++ .../chart/components/editor/drag-item/QuotaItem.vue | 9 ++++----- .../components/js/panel/charts/others/chart-mix.ts | 10 ++++++---- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index c786d8b41d..0cdddf3b89 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -538,6 +538,8 @@ export default { data_preview: '数据预览', dimension: '维度', quota: '指标', + column_quota: '柱指标', + line_quota: '线指标', time_dimension_or_quota: '时间维度或指标', aggregate_time: '聚合时间纬度', title: '标题', diff --git a/core/core-frontend/src/views/chart/components/editor/drag-item/QuotaItem.vue b/core/core-frontend/src/views/chart/components/editor/drag-item/QuotaItem.vue index e05b877e5d..23aee8dbe6 100644 --- a/core/core-frontend/src/views/chart/components/editor/drag-item/QuotaItem.vue +++ b/core/core-frontend/src/views/chart/components/editor/drag-item/QuotaItem.vue @@ -345,7 +345,7 @@ onMounted(() => { class="drop-style" :class="themes === 'dark' ? 'dark-dimension-quota' : ''" > - + { axisConfig = { ...this['axisConfig'], yAxis: { - name: `${t('chart.drag_block_value_axis_left')} / ${t('chart.quota')}`, + name: `${t('chart.drag_block_value_axis_left')} / ${t('chart.column_quota')}`, limit: 1, type: 'q' }, yAxisExt: { - name: `${t('chart.drag_block_value_axis_right')} / ${t('chart.quota')}`, + name: `${t('chart.drag_block_value_axis_right')} / ${t('chart.line_quota')}`, limit: 1, type: 'q' } @@ -61,8 +61,10 @@ export class ColumnLineMix extends G2PlotChartView { const left = cloneDeep(chart.data?.left?.data) const right = cloneDeep(chart.data?.right?.data) - const data1Type = (left[0]?.type === 'bar' ? 'column' : left[0]?.type) ?? 'column' - const data2Type = (right[0]?.type === 'bar' ? 'column' : right[0]?.type) ?? 'column' + // const data1Type = (left[0]?.type === 'bar' ? 'column' : left[0]?.type) ?? 'column' + // const data2Type = (right[0]?.type === 'bar' ? 'column' : right[0]?.type) ?? 'column' + const data1Type = 'column' + const data2Type = 'line' const data1 = defaultTo(left[0]?.data, []) const data2 = map(defaultTo(right[0]?.data, []), d => {