mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix Chart legend badges
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
895b81fd72
commit
000b5a0edd
@ -25,10 +25,6 @@
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge + .badge {
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge.interactive:hover {
|
.badge.interactive:hover {
|
||||||
background-color: var(--mainBackground);
|
background-color: var(--mainBackground);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@ -171,8 +171,8 @@ export class Chart extends React.Component<ChartProps> {
|
|||||||
key={title}
|
key={title}
|
||||||
className="LegendBadge flex gaps align-center"
|
className="LegendBadge flex gaps align-center"
|
||||||
label={(
|
label={(
|
||||||
<div>
|
<div className="flex items-center">
|
||||||
<StatusBrick style={{ backgroundColor: color }}/>
|
<StatusBrick style={{ backgroundColor: color }} className="flex-shrink-0"/>
|
||||||
<span>{title}</span>
|
<span>{title}</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -182,7 +182,7 @@ export class Chart extends React.Component<ChartProps> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="legend flex wrap gaps">
|
<div className="legend flex wrap">
|
||||||
{labels && labels.map((label: string, index) => {
|
{labels && labels.map((label: string, index) => {
|
||||||
const { backgroundColor } = datasets[0] as any;
|
const { backgroundColor } = datasets[0] as any;
|
||||||
const color = legendColors ? legendColors[index] : backgroundColor[index];
|
const color = legendColors ? legendColors[index] : backgroundColor[index];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user