diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx index 4c9c5bbd263..7a3d95c7e68 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx @@ -22,6 +22,7 @@ import { formatSelectOptionsForRange, getStandardizedControls, } from '@superset-ui/chart-controls'; +import { xAxisLabelRotation } from '../controls'; const sortAxisChoices = [ ['alpha_asc', t('Axis ascending')], @@ -248,6 +249,7 @@ const config: ControlPanelConfig = { ], ['y_axis_format'], ['x_axis_time_format'], + [xAxisLabelRotation], ['currency_format'], [ { diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts index 3167834a881..a4d5c604844 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts @@ -99,6 +99,7 @@ export default function transformProps( valueBounds, yAxisFormat, xAxisTimeFormat, + xAxisLabelRotation, currencyFormat, } = formData; const metricLabel = getMetricLabel(metric); @@ -251,6 +252,7 @@ export default function transformProps( axisLabel: { formatter: xAxisFormatter, interval: xscaleInterval === -1 ? 'auto' : xscaleInterval - 1, + rotate: xAxisLabelRotation, }, }, yAxis: { diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/types.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/types.ts index f0c80d275d4..cb7217a4abe 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/types.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/types.ts @@ -43,6 +43,7 @@ export interface HeatmapFormData extends QueryFormData { sortYAxis?: string; timeFormat?: string; xAxis: QueryFormColumn; + xAxisLabelRotation: number; xscaleInterval: number; valueBounds: [number | undefined | null, number | undefined | null]; yAxisFormat?: string;