diff --git a/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java b/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java index 0d6b4f7314..b403f1e41f 100644 --- a/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java +++ b/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java @@ -445,6 +445,7 @@ public class ChartDataBuild { } catch (Exception e) { axisChartDataDTO.setValue(new BigDecimal(0)); } + axisChartDataDTO.setCategory(yAxis.get(j).getName()); series.get(j).getData().add(axisChartDataDTO); } } @@ -947,7 +948,7 @@ public class ChartDataBuild { if (CollectionUtils.isNotEmpty(fieldMap.get("tooltipAxis"))) { fieldMap.get("tooltipAxis").forEach(field -> { Integer deType = field.getDeType(); - if(deType == 2 || deType == 3) { + if (deType == 2 || deType == 3) { yfields.add(field); } else { fields.add(field); @@ -957,7 +958,7 @@ public class ChartDataBuild { if (CollectionUtils.isNotEmpty(fieldMap.get("labelAxis"))) { fieldMap.get("labelAxis").forEach(field -> { Integer deType = field.getDeType(); - if(deType == 2 || deType == 3) { + if (deType == 2 || deType == 3) { yfields.add(field); } else { fields.add(field); diff --git a/frontend/src/views/chart/chart/common/common_antv.js b/frontend/src/views/chart/chart/common/common_antv.js index 26e75469b0..7afb4b3012 100644 --- a/frontend/src/views/chart/chart/common/common_antv.js +++ b/frontend/src/views/chart/chart/common/common_antv.js @@ -606,6 +606,21 @@ export function getYAxisExt(chart) { style: { fill: a.axisLabel.color, fontSize: parseInt(a.axisLabel.fontSize) + }, + formatter: function(value) { + if (chart.type === 'waterfall') { + return value + } else { + if (!chart.type.includes('horizontal')) { + if (!a.axisLabelFormatter) { + return valueFormatter(value, formatterItem) + } else { + return valueFormatter(value, a.axisLabelFormatter) + } + } else { + return value + } + } } } : null diff --git a/frontend/src/views/chart/chart/mix/mix_antv.js b/frontend/src/views/chart/chart/mix/mix_antv.js index 89ae65d244..ca77bc3afc 100644 --- a/frontend/src/views/chart/chart/mix/mix_antv.js +++ b/frontend/src/views/chart/chart/mix/mix_antv.js @@ -93,7 +93,8 @@ export function baseMixOptionAntV(plot, container, chart, action) { appendPadding: getPadding(chart), syncViewPadding: true, plots: plots, - legend: legend + legend: legend, + tooltip: { shared: true } } // 开始渲染 diff --git a/frontend/src/views/chart/components/ChartComponentG2.vue b/frontend/src/views/chart/components/ChartComponentG2.vue index 18bf1892ba..c3d14f7b5a 100644 --- a/frontend/src/views/chart/components/ChartComponentG2.vue +++ b/frontend/src/views/chart/components/ChartComponentG2.vue @@ -52,6 +52,7 @@ import { baseWaterfallOptionAntV } from '@/views/chart/chart/waterfall/waterfall import { baseWordCloudOptionAntV } from '@/views/chart/chart/wordCloud/word_cloud' import TitleRemark from '@/views/chart/view/TitleRemark' import { DEFAULT_TITLE_STYLE } from '@/views/chart/chart/chart' +import { baseMixOptionAntV } from '@/views/chart/chart/mix/mix_antv' export default { name: 'ChartComponentG2', @@ -252,6 +253,8 @@ export default { this.myChart = baseWaterfallOptionAntV(this.myChart, this.chartId, chart, this.antVAction) } else if (chart.type === 'word-cloud') { this.myChart = baseWordCloudOptionAntV(this.myChart, this.chartId, chart, this.antVAction) + } else if (chart.type === 'chart-mix') { + this.myChart = baseMixOptionAntV(this.myChart, this.chartId, chart, this.antVAction) } else { if (this.myChart) { this.antVRenderStatus = false diff --git a/frontend/src/views/chart/components/shape-attr/SizeSelectorAntV.vue b/frontend/src/views/chart/components/shape-attr/SizeSelectorAntV.vue index 8cdf2b51dc..ea05c7c8b9 100644 --- a/frontend/src/views/chart/components/shape-attr/SizeSelectorAntV.vue +++ b/frontend/src/views/chart/components/shape-attr/SizeSelectorAntV.vue @@ -358,6 +358,100 @@ @change="changeBarSizeCase('tableColumnWidth')" /> + + + + {{ $t('chart.chart_bar') }} + + {{ $t('chart.adapt') }} + + + + + {{ $t('chart.chart_line') }} + + + + + + + + + + + + + {{ $t('chart.line_smooth') }} + + + {{ $t('chart.chart_scatter') }} + + + + + + + + + +