Skip to content

Commit

Permalink
FIX [DEV-9399] Update legend items (#1566)
Browse files Browse the repository at this point in the history
  • Loading branch information
Atash3000 authored Oct 7, 2024
1 parent 1e93a89 commit 88e4dbd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 3 additions & 3 deletions packages/chart/src/components/Legend/Legend.Component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ const Legend: React.FC<LegendProps> = forwardRef(
}}
role='button'
>
<div>
<div className='d-flex justify-content-center align-items-center'>
{config.visualizationType === 'Line' && config.legend.style === 'lines' ? (
<svg width={40} height={20}>
<svg width={40} height={25}>
<Line
from={{ x: 10, y: 10 }}
to={{ x: 40, y: 10 }}
Expand All @@ -146,7 +146,7 @@ const Legend: React.FC<LegendProps> = forwardRef(
/>
</svg>
) : (
<div style={{ display: 'flex', flexDirection: 'column' }}>
<div className='d-flex flex-column mt-1'>
<LegendShape
shape={config.legend.style === 'boxes' ? 'square' : 'circle'}
viewport={currentViewport}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const LegendSuppression: React.FC<LegendProps> = ({ config, isBottomOrSmallViewp
const { preliminaryData, visualizationType, visualizationSubType, legend } = config

const hasOpenCircleEffects = () =>
preliminaryData?.some(pd => pd.label && pd.type === 'effect' && pd.style === 'Open Circles') &&
preliminaryData?.some(pd => pd.label && pd.type === 'effect' && pd.style !== 'Filled Circles') &&
['Line', 'Combo'].includes(visualizationType)

const shouldShowSuppressedLabels = () =>
Expand Down
4 changes: 0 additions & 4 deletions packages/chart/src/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,6 @@
white-space: pre-wrap;
word-break: break-word;
}

& > :first-child {
margin-top: 3px;
}
}

.vertical-sorted:not(.single-row) .legend-item {
Expand Down

0 comments on commit 88e4dbd

Please sign in to comment.