feat: Add currencies controls in control panels (#24718)

This commit is contained in:
Kamil Gabryjelski
2023-08-02 19:22:45 +02:00
committed by Michael S. Molina
parent dfd699f440
commit 10e781d0ff
63 changed files with 697 additions and 306 deletions

View File

@@ -129,6 +129,11 @@ const config: ControlPanelConfig = {
['color_scheme'],
],
},
{
label: t('Chart Options'),
expanded: true,
controlSetRows: [['y_axis_format'], ['currency_format']],
},
],
controlOverrides: {
entity: {

View File

@@ -43,6 +43,8 @@ export default function transformProps(chartProps) {
colorScheme,
sliceId,
metric,
yAxisFormat,
currencyFormat,
} = formData;
const { r, g, b } = colorPicker;
const { currencyFormats = {}, columnFormats = {} } = datasource;
@@ -51,7 +53,8 @@ export default function transformProps(chartProps) {
metric,
currencyFormats,
columnFormats,
undefined,
yAxisFormat,
currencyFormat,
);
return {