Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"@types/memoizee": "^0.4.5",
"@types/node": "^24.8.0",
"@types/papaparse": "5.3.2",
"@types/plotly.js": "^3.0.0",
"@types/plotly.js": "^3.0.8",
"@types/pouchdb-browser": "^6.1.3",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
Expand Down
3 changes: 3 additions & 0 deletions packages/chart/src/ChartTheme.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@
indicator-increasing: var(--dh-color-chart-indicator-increase);
indicator-decreasing: var(--dh-color-chart-indicator-decrease);
indicator-gauge: var(--dh-color-chart-indicator-gauge);

/* Map */
map-style: var(--dh-color-chart-map-style);
}
5 changes: 5 additions & 0 deletions packages/chart/src/ChartTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export interface ChartTheme {
indicator_increasing: string;
indicator_decreasing: string;
indicator_gauge: string;

// Map
map_style: string;
}

export function defaultChartTheme(): Readonly<ChartTheme> {
Expand Down Expand Up @@ -74,6 +77,8 @@ export function defaultChartTheme(): Readonly<ChartTheme> {
indicator_increasing: chartTheme['indicator-increasing'],
indicator_decreasing: chartTheme['indicator-decreasing'],
indicator_gauge: chartTheme['indicator-gauge'],
// Map
map_style: chartTheme['map-style'],
});
}

Expand Down
4 changes: 4 additions & 0 deletions packages/chart/src/ChartUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2142,6 +2142,7 @@ class ChartUtils {
ocean_color,
lake_color,
river_color,
map_style,
/* eslint-disable camelcase */
} = theme;

Expand Down Expand Up @@ -2196,6 +2197,9 @@ class ChartUtils {
lakecolor: lake_color,
rivercolor: river_color,
},
map: {
style: map_style,
},
};
layout.datarevision = 0;

Expand Down
1 change: 1 addition & 0 deletions packages/chart/src/__snapshots__/ChartTheme.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ exports[`defaultChartTheme should create the default chart theme 1`] = `
"land_color": "chartTheme['land-color']",
"legend_color": "chartTheme['legend-color']",
"linecolor": "chartTheme['linecolor']",
"map_style": "chartTheme['map-style']",
"ocean_color": "chartTheme['ocean-color']",
"ohlc_decreasing": "chartTheme['ohlc-decreasing']",
"ohlc_increasing": "chartTheme['ohlc-increasing']",
Expand Down
3 changes: 3 additions & 0 deletions packages/chart/src/__snapshots__/ChartUtils.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ exports[`makeDefaultTemplate should create a default template 1`] = `
"color": "ChartTheme['title_color']",
},
},
"map": {
"style": "ChartTheme['map_style']",
},
"margin": {
"b": 60,
"l": 60,
Expand Down
5 changes: 5 additions & 0 deletions packages/code-studio/src/styleguide/colorUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ export function buildColorGroups(

group = groupRemap[group] ?? group;

// Skip maps as there is no swatch to show currently
if (group === 'map') {
return acc;
}

if (acc[group] == null) {
acc[group] = [];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,7 @@
--dh-color-chart-indicator-increase: var(--dh-color-visual-green);
--dh-color-chart-indicator-decrease: var(--dh-color-visual-red);
--dh-color-chart-indicator-gauge: var(--dh-color-green-1000);

/* Map */
--dh-color-chart-map-style: dark;
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,7 @@
--dh-color-chart-indicator-increase: var(--dh-color-visual-green);
--dh-color-chart-indicator-decrease: var(--dh-color-visual-red);
--dh-color-chart-indicator-gauge: var(--dh-color-green-1000);

/* Map */
--dh-color-chart-map-style: light;
}
Loading