mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: make TS enums strictly PascalCase (#26875)
This commit is contained in:
@@ -86,7 +86,7 @@ function WorldMap(element, props) {
|
||||
|
||||
let processedData;
|
||||
let colorScale;
|
||||
if (colorBy === ColorBy.country) {
|
||||
if (colorBy === ColorBy.Country) {
|
||||
colorScale = CategoricalColorNamespace.getScale(colorScheme);
|
||||
|
||||
processedData = filteredData.map(d => ({
|
||||
|
||||
@@ -112,10 +112,10 @@ const config: ControlPanelConfig = {
|
||||
config: {
|
||||
type: 'RadioButtonControl',
|
||||
label: t('Color by'),
|
||||
default: ColorBy.metric,
|
||||
default: ColorBy.Metric,
|
||||
options: [
|
||||
[ColorBy.metric, t('Metric')],
|
||||
[ColorBy.country, t('Country')],
|
||||
[ColorBy.Metric, t('Metric')],
|
||||
[ColorBy.Country, t('Country')],
|
||||
],
|
||||
description: t(
|
||||
'Choose whether a country should be shaded by the metric, or assigned a color based on a categorical color palette',
|
||||
@@ -148,12 +148,12 @@ const config: ControlPanelConfig = {
|
||||
linear_color_scheme: {
|
||||
label: t('Country Color Scheme'),
|
||||
visibility: ({ controls }) =>
|
||||
Boolean(controls?.color_by.value === ColorBy.metric),
|
||||
Boolean(controls?.color_by.value === ColorBy.Metric),
|
||||
},
|
||||
color_scheme: {
|
||||
label: t('Country Color Scheme'),
|
||||
visibility: ({ controls }) =>
|
||||
Boolean(controls?.color_by.value === ColorBy.country),
|
||||
Boolean(controls?.color_by.value === ColorBy.Country),
|
||||
},
|
||||
},
|
||||
formDataOverrides: formData => ({
|
||||
|
||||
@@ -46,9 +46,9 @@ const metadata = new ChartMetadata({
|
||||
thumbnail,
|
||||
useLegacyApi: true,
|
||||
behaviors: [
|
||||
Behavior.INTERACTIVE_CHART,
|
||||
Behavior.DRILL_TO_DETAIL,
|
||||
Behavior.DRILL_BY,
|
||||
Behavior.InteractiveChart,
|
||||
Behavior.DrillToDetail,
|
||||
Behavior.DrillBy,
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
*/
|
||||
|
||||
export enum ColorBy {
|
||||
metric = 'metric',
|
||||
country = 'country',
|
||||
Metric = 'metric',
|
||||
Country = 'country',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user