Skip to content

Commit

Permalink
fix(legend): custom legend covered by background (#2366)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickofthyme authored Mar 18, 2024
1 parent 7bebd6b commit 5b9ffac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/charts/src/components/_global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
bottom: 0;
left: 0;
right: 0;
z-index: 0;
}
2 changes: 2 additions & 0 deletions packages/charts/src/components/legend/_legend.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.echLegend {
z-index: 1;

.echLegendList {
display: grid;
grid-template-columns: minmax(0, 1fr);
Expand Down
2 changes: 1 addition & 1 deletion storybook/stories/legend/16_custom_legend.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const allMetrics = [...data3, ...data2, ...data1];

export const Example: ChartsStory = (_, { title, description }) => {
const customLegend: CustomLegend = ({ items, pointerValue }) => (
<div style={{ width: '100%', position: 'relative' }}>
<div style={{ width: '100%' }}>
<p style={{ height: '1.5em' }}>{pointerValue ? moment(pointerValue?.value).format('HH:mm') : 'System Load'}</p>
{items.map((i) => (
<button
Expand Down

0 comments on commit 5b9ffac

Please sign in to comment.