Merge pull request #12126 from ulleo/dev-v2

feat(图表): 分组柱线组合图子类别增加排序
This commit is contained in:
ulleo 2024-09-10 15:59:12 +08:00 committed by GitHub
commit 6ca86496e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -31,7 +31,9 @@ public class GroupMixHandler extends MixHandler {
axisMap.put(ChartAxis.yAxisExt, view.getYAxisExt());
//去除除了x轴以外的排序
axisMap.forEach((k, v) -> {
v.forEach(x -> x.setSort("none"));
if (!ChartAxis.xAxisExt.equals(k)) {
v.forEach(x -> x.setSort("none"));
}
});
axisMap.put(ChartAxis.extLabel, view.getExtLabel());
axisMap.put(ChartAxis.extTooltip, view.getExtTooltip());

View File

@ -176,7 +176,8 @@ const showCustomSort = item => {
const showSort = () => {
const isExtColor = props.type === 'extColor'
const isChartMix = props.chart.type.includes('chart-mix')
const isDimensionOrDimensionStack = props.type === 'dimension' || props.type === 'dimensionStack'
const isDimensionOrDimensionStack =
props.type === 'dimension' || props.type === 'dimensionStack' || props.type === 'dimensionExt'
if (isExtColor) {
return false
}
@ -333,7 +334,7 @@ onMounted(() => {
:divided="
!chart.type.includes('chart-mix') ||
(chart.type.includes('chart-mix') &&
(type === 'dimension' || type === 'dimensionStack'))
(type === 'dimension' || type === 'dimensionStack' || type === 'dimensionExt'))
"
>
<el-dropdown
@ -532,7 +533,7 @@ onMounted(() => {
:divided="
!chart.type.includes('chart-mix') ||
(chart.type.includes('chart-mix') &&
(type === 'dimension' || type === 'dimensionStack'))
(type === 'dimension' || type === 'dimensionStack' || type === 'dimensionExt'))
"
:command="beforeClickItem('rename')"
>