Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
fix(COR-1811): correct y-axis stacked chart (#4924)
Browse files Browse the repository at this point in the history
Co-authored-by: VWSCoronaDashboard29 <B>
  • Loading branch information
ben-van-eekelen authored Oct 31, 2023
1 parent a043957 commit 3e983eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/app/src/components/stacked-chart/stacked-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ export function StackedChart<T extends TimestampedValue>(props: StackedChartProp
* negative height is not allowed.
*/
y={bar.y + (isTinyScreen ? 1 : 2)}
height={Math.max(0, bar.height)}
height={Math.max(0, bar.height - (isTinyScreen ? 1 : 2))}
width={bar.width}
fill={fillColor}
onMouseLeave={handleHoverWithBar}
Expand All @@ -436,7 +436,7 @@ export function StackedChart<T extends TimestampedValue>(props: StackedChartProp
* negative height is not allowed.
*/
y={bar.y + (isTinyScreen ? 1 : 2)}
height={Math.max(0, bar.height)}
height={Math.max(0, bar.height - (isTinyScreen ? 1 : 2))}
width={bar.width}
fill={breakpoints.lg ? 'url(#pattern-hatched)' : 'url(#pattern-hatched-small)'}
onMouseLeave={handleHoverWithBar}
Expand Down

0 comments on commit 3e983eb

Please sign in to comment.