Skip to content

Commit

Permalink
✨ (discrete bar) thin zero line
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Jan 3, 2025
1 parent adf6f17 commit 04066f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,8 @@ export class DiscreteBarChart
const { manager, yAxis, innerBounds } = this

const axisLineWidth = manager.isStaticAndSmall
? GRAPHER_AXIS_LINE_WIDTH_THICK
: GRAPHER_AXIS_LINE_WIDTH_DEFAULT
? 0.5 * GRAPHER_AXIS_LINE_WIDTH_THICK
: 0.5 * GRAPHER_AXIS_LINE_WIDTH_DEFAULT

return (
<>
Expand All @@ -512,6 +512,7 @@ export class DiscreteBarChart
horizontalAxis={yAxis}
bounds={innerBounds}
strokeWidth={axisLineWidth}
align={HorizontalAlign.right}
/>
)}
{this.renderBars()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ export class StackedDiscreteBarChart
<HorizontalAxisZeroLine
horizontalAxis={yAxis}
bounds={innerBounds}
strokeWidth={axisLineWidth}
strokeWidth={0.5 * axisLineWidth}
// moves the zero line a little to the left to avoid
// overlap with the bars
align={HorizontalAlign.right}
Expand Down

0 comments on commit 04066f8

Please sign in to comment.