chore: Moves xAxisLabelRotation to shared controls (#26212)

This commit is contained in:
Michael S. Molina
2023-12-08 13:37:06 -03:00
committed by GitHub
parent dbed64a2c6
commit 005cf5947b
12 changed files with 57 additions and 176 deletions

View File

@@ -39,6 +39,7 @@ import {
showValueSection,
truncateXAxis,
xAxisBounds,
xAxisLabelRotation,
} from '../../../controls';
const {
@@ -50,7 +51,6 @@ const {
truncateYAxis,
yAxisBounds,
zoomable,
xAxisLabelRotation,
} = DEFAULT_FORM_DATA;
const config: ControlPanelConfig = {
controlPanelSections: [
@@ -124,27 +124,7 @@ const config: ControlPanelConfig = {
},
},
],
[
{
name: 'xAxisLabelRotation',
config: {
type: 'SelectControl',
freeForm: true,
clearable: false,
label: t('Rotate x axis label'),
choices: [
[0, '0°'],
[45, '45°'],
[90, '90°'],
],
default: xAxisLabelRotation,
renderTrigger: true,
description: t(
'Input field supports custom rotation. e.g. 30 for 30°',
),
},
},
],
[xAxisLabelRotation],
// eslint-disable-next-line react/jsx-key
...richTooltipSection,
// eslint-disable-next-line react/jsx-key