Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion statchart/src/StatChartBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const StatChartBase: FC<StatChartProps> = (props) => {

const clonedSparkLine = { ...sparkline };
if (colorMode === 'background_solid') {
clonedSparkLine.areaStyle = { color: WHITE_COLOR_CODE, opacity: 0.4 };
clonedSparkLine.areaStyle = { color: WHITE_COLOR_CODE, opacity: chartsTheme.sparkline.areaOpacity };
clonedSparkLine.lineStyle = { color: WHITE_COLOR_CODE, opacity: 1 };
}

Expand Down
2 changes: 1 addition & 1 deletion statchart/src/utils/data-transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function convertSparkline(
},
areaStyle: {
color,
opacity: 0.4,
opacity: chartsTheme.sparkline.areaOpacity,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to have opacity defined in StatChartSparklineOptions too 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I added areaOpacity to StatChartSparklineOptions and wired it as an override (theme as default) for consistency with width.

},
};
}
Loading