fix(Heatmap): addin x axis label rotation (#34239)

This commit is contained in:
SBIN2010
2025-08-07 22:27:35 +03:00
committed by GitHub
parent 8131c24acd
commit 38e15196f2
3 changed files with 5 additions and 0 deletions

View File

@@ -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'],
[
{

View File

@@ -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: {

View File

@@ -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;