Skip to content

Commit

Permalink
๐Ÿ› fix(component): lineHide ์‹œ path์™€ line์ด ๋ Œ๋”๋ง๋˜๋Š” ๋ฌธ์ œ ์ˆ˜์ •
Browse files Browse the repository at this point in the history
  • Loading branch information
bh2980 committed May 26, 2024
1 parent 9846d55 commit ab476c5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/components/charts/BandAxis/BandAxis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const BandAxis = ({
const [textdX, textdY, path] = getAxisOrientConfig({ orient, startPoint, endPoint, outerTickLength });

return (
<g className={BandAxisVariants({ className, lineHide })} textAnchor="middle" {...props}>
<path fill="none" d={path} />
<g className={BandAxisVariants({ className })} textAnchor="middle" {...props}>
{!lineHide && <path fill="none" d={path} />}
{axisScale.domain().map((label, i) => (
<g
key={`tick-${i}`}
Expand All @@ -35,11 +35,13 @@ const BandAxis = ({
: `translate(${tickStartPoint + axisScale.step() * i}, 0)`
}
>
<line
x2={isVertical ? innerTickLength : undefined}
y2={isVertical ? undefined : innerTickLength}
fill="none"
/>
{!lineHide && (
<line
x2={isVertical ? innerTickLength : undefined}
y2={isVertical ? undefined : innerTickLength}
fill="none"
/>
)}
{!labelHide && (
<text dx={textdX} dy={textdY} stroke="none">
{label}
Expand Down

0 comments on commit ab476c5

Please sign in to comment.