chore: make TS enums strictly PascalCase (#26875)

This commit is contained in:
Ville Brofeldt
2024-01-31 17:40:44 -08:00
committed by GitHub
parent 959a5a5ad6
commit 19f8405bc0
362 changed files with 2002 additions and 2032 deletions

View File

@@ -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 => ({

View File

@@ -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 => ({

View File

@@ -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,
],
});

View File

@@ -18,6 +18,6 @@
*/
export enum ColorBy {
metric = 'metric',
country = 'country',
Metric = 'metric',
Country = 'country',
}