Skip to content
Open
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
6 changes: 5 additions & 1 deletion packages/viewer-d3fc/src/ts/series/colorStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ export const initialiseStyles = (
};

const getOpacityFromColor = (color) => {
return d3.color(color).opacity;
if (!color) {
return 1.0; // Default to fully opaque when color is undefined
}
const parsed = d3.color(color);
return parsed ? parsed.opacity : 1.0;
};

const stepAsColor = (value, opacity) => {
Expand Down
1 change: 1 addition & 0 deletions packages/workspace/src/themes/pro-dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ perspective-workspace perspective-viewer[settings] {
perspective-workspace {
@include perspective-workspace-pro-base;
@include perspective-viewer-pro-dark--colors;
@include perspective-viewer-pro-dark--d3fc; // Fix: Add d3fc CSS variables for chart plugins

background-color: #000202;
color: white;
Expand Down
1 change: 1 addition & 0 deletions packages/workspace/src/themes/pro.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ perspective-indicator[theme="Pro Light"] {
perspective-workspace {
@include perspective-workspace-pro-base;
@include perspective-viewer-pro--colors;
@include perspective-viewer-pro--d3fc; // Fix: Add d3fc CSS variables for chart plugins
background-color: #dadada;
}

Expand Down