You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2024/03/04 16:37:49 UTC
(superset) 17/28: fix: Data zoom with horizontal orientation (#27291)
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 4.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 5cba9bcb0e640b43dfe9b587498e63b3d84d399a
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Thu Feb 29 08:53:09 2024 -0500
fix: Data zoom with horizontal orientation (#27291)
(cherry picked from commit 7854b622a34c9a9674e2c916acb8acbc63714fb8)
---
.../plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts | 2 +-
.../plugins/plugin-chart-echarts/src/Timeseries/transformers.ts | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
index 3ede7810d9..8b4998ded0 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
@@ -575,7 +575,6 @@ export default function transformProps(
right: TIMESERIES_CONSTANTS.toolboxRight,
feature: {
dataZoom: {
- yAxisIndex: false,
title: {
zoom: t('zoom area'),
back: t('restore zoom'),
@@ -590,6 +589,7 @@ export default function transformProps(
start: TIMESERIES_CONSTANTS.dataZoomStart,
end: TIMESERIES_CONSTANTS.dataZoomEnd,
bottom: TIMESERIES_CONSTANTS.zoomBottom,
+ yAxisIndex: isHorizontal ? 0 : undefined,
},
]
: [],
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts
index 5b9fa43047..be89fdfc74 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts
@@ -570,9 +570,10 @@ export function getPadding(
yAxisTitlePosition && yAxisTitlePosition === 'Top'
? TIMESERIES_CONSTANTS.gridOffsetTop + (Number(yAxisTitleMargin) || 0)
: TIMESERIES_CONSTANTS.gridOffsetTop + yAxisOffset,
- bottom: zoomable
- ? TIMESERIES_CONSTANTS.gridOffsetBottomZoomable + xAxisOffset
- : TIMESERIES_CONSTANTS.gridOffsetBottom + xAxisOffset,
+ bottom:
+ zoomable && !isHorizontal
+ ? TIMESERIES_CONSTANTS.gridOffsetBottomZoomable + xAxisOffset
+ : TIMESERIES_CONSTANTS.gridOffsetBottom + xAxisOffset,
left:
yAxisTitlePosition === 'Left'
? TIMESERIES_CONSTANTS.gridOffsetLeft +