This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new d3919cf24fe fix(translations): Periodic language strings extraction,
newly Translatable label positions for Radar Chart (#33940)
d3919cf24fe is described below
commit d3919cf24fe08541934ee14f7462e3ad08383526
Author: Evan Rusackas <[email protected]>
AuthorDate: Thu Feb 5 22:48:24 2026 -0500
fix(translations): Periodic language strings extraction, newly Translatable
label positions for Radar Chart (#33940)
Co-authored-by: Claude Opus 4.5 <[email protected]>
---
.../plugin-chart-echarts/src/Radar/controlPanel.tsx | 20 ++++++++++++++++++--
.../plugins/plugin-chart-echarts/src/constants.ts | 17 -----------------
2 files changed, 18 insertions(+), 19 deletions(-)
diff --git
a/superset-frontend/plugins/plugin-chart-echarts/src/Radar/controlPanel.tsx
b/superset-frontend/plugins/plugin-chart-echarts/src/Radar/controlPanel.tsx
index 0c7dbc85229..0d2cb9a1fcc 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/Radar/controlPanel.tsx
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/Radar/controlPanel.tsx
@@ -35,7 +35,7 @@ import {
getStandardizedControls,
} from '@superset-ui/chart-controls';
import { DEFAULT_FORM_DATA } from './types';
-import { LABEL_POSITION } from '../constants';
+import { LabelPositionEnum } from '../types';
import { legendSection } from '../controls';
const { labelType, labelPosition, numberFormat, showLabels, isCircle } =
@@ -72,6 +72,22 @@ const radarMetricMinValue: { name: string; config:
ControlFormItemSpec } = {
},
};
+const getLabelPositionOptions = (): [LabelPositionEnum, string][] => [
+ [LabelPositionEnum.Top, t('Top')],
+ [LabelPositionEnum.Left, t('Left')],
+ [LabelPositionEnum.Right, t('Right')],
+ [LabelPositionEnum.Bottom, t('Bottom')],
+ [LabelPositionEnum.Inside, t('Inside')],
+ [LabelPositionEnum.InsideLeft, t('Inside left')],
+ [LabelPositionEnum.InsideRight, t('Inside right')],
+ [LabelPositionEnum.InsideTop, t('Inside top')],
+ [LabelPositionEnum.InsideBottom, t('Inside bottom')],
+ [LabelPositionEnum.InsideTopLeft, t('Inside top left')],
+ [LabelPositionEnum.InsideBottomLeft, t('Inside bottom left')],
+ [LabelPositionEnum.InsideTopRight, t('Inside top right')],
+ [LabelPositionEnum.InsideBottomRight, t('Inside bottom right')],
+];
+
const config: ControlPanelConfig = {
controlPanelSections: [
{
@@ -136,7 +152,7 @@ const config: ControlPanelConfig = {
freeForm: false,
label: t('Label position'),
renderTrigger: true,
- choices: LABEL_POSITION,
+ choices: getLabelPositionOptions(),
default: labelPosition,
description: D3_FORMAT_DOCS,
},
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/constants.ts
b/superset-frontend/plugins/plugin-chart-echarts/src/constants.ts
index a6992323e45..718ca01a3b2 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/constants.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/constants.ts
@@ -21,7 +21,6 @@ import { t } from '@apache-superset/core';
import { JsonValue, TimeGranularity } from '@superset-ui/core';
import { ReactNode } from 'react';
import {
- LabelPositionEnum,
LegendFormData,
LegendOrientation,
LegendType,
@@ -50,22 +49,6 @@ export const TIMESERIES_CONSTANTS = {
horizontalBarLabelRightPadding: 70,
};
-export const LABEL_POSITION: [LabelPositionEnum, string][] = [
- [LabelPositionEnum.Top, 'Top'],
- [LabelPositionEnum.Left, 'Left'],
- [LabelPositionEnum.Right, 'Right'],
- [LabelPositionEnum.Bottom, 'Bottom'],
- [LabelPositionEnum.Inside, 'Inside'],
- [LabelPositionEnum.InsideLeft, 'Inside left'],
- [LabelPositionEnum.InsideRight, 'Inside right'],
- [LabelPositionEnum.InsideTop, 'Inside top'],
- [LabelPositionEnum.InsideBottom, 'Inside bottom'],
- [LabelPositionEnum.InsideTopLeft, 'Inside top left'],
- [LabelPositionEnum.InsideBottomLeft, 'Inside bottom left'],
- [LabelPositionEnum.InsideTopRight, 'Inside top right'],
- [LabelPositionEnum.InsideBottomRight, 'Inside bottom right'],
-];
-
export enum OpacityEnum {
Transparent = 0,
SemiTransparent = 0.3,