Skip to content

Commit 7430381

Browse files
committed
fix(charts): round only top corners of vertical bars, right corners of horizontal bars (fixes #10741)
1 parent 3ffd3e1 commit 7430381

7 files changed

Lines changed: 8 additions & 8 deletions

File tree

apps/v4/registry/new-york-v4/charts/chart-bar-active.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function ChartBarActive() {
8484
<Bar
8585
dataKey="visitors"
8686
strokeWidth={2}
87-
radius={8}
87+
radius={[8, 8, 0, 0]}
8888
shape={({ index, ...props }: BarShapeProps) =>
8989
index === ACTIVE_INDEX ? (
9090
<Rectangle

apps/v4/registry/new-york-v4/charts/chart-bar-default.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function ChartBarDefault() {
5858
cursor={false}
5959
content={<ChartTooltipContent hideLabel />}
6060
/>
61-
<Bar dataKey="desktop" fill="var(--color-desktop)" radius={8} />
61+
<Bar dataKey="desktop" fill="var(--color-desktop)" radius={[8, 8, 0, 0]} />
6262
</BarChart>
6363
</ChartContainer>
6464
</CardContent>

apps/v4/registry/new-york-v4/charts/chart-bar-horizontal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export function ChartBarHorizontal() {
6666
cursor={false}
6767
content={<ChartTooltipContent hideLabel />}
6868
/>
69-
<Bar dataKey="desktop" fill="var(--color-desktop)" radius={5} />
69+
<Bar dataKey="desktop" fill="var(--color-desktop)" radius={[0, 5, 5, 0]} />
7070
</BarChart>
7171
</ChartContainer>
7272
</CardContent>

apps/v4/registry/new-york-v4/charts/chart-bar-label-custom.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export function ChartBarLabelCustom() {
7575
cursor={false}
7676
content={<ChartTooltipContent indicator="line" />}
7777
/>
78-
<Bar dataKey="desktop" fill="var(--color-desktop)" radius={4}>
78+
<Bar dataKey="desktop" fill="var(--color-desktop)" radius={[4, 4, 0, 0]}>
7979
<LabelList
8080
dataKey="month"
8181
position="insideLeft"

apps/v4/registry/new-york-v4/charts/chart-bar-label.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function ChartBarLabel() {
6464
cursor={false}
6565
content={<ChartTooltipContent hideLabel />}
6666
/>
67-
<Bar dataKey="desktop" fill="var(--color-desktop)" radius={8}>
67+
<Bar dataKey="desktop" fill="var(--color-desktop)" radius={[8, 8, 0, 0]}>
6868
<LabelList
6969
position="top"
7070
offset={12}

apps/v4/registry/new-york-v4/charts/chart-bar-mixed.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export function ChartBarMixed() {
8686
cursor={false}
8787
content={<ChartTooltipContent hideLabel />}
8888
/>
89-
<Bar dataKey="visitors" radius={5} />
89+
<Bar dataKey="visitors" radius={[5, 5, 0, 0]} />
9090
</BarChart>
9191
</ChartContainer>
9292
</CardContent>

apps/v4/registry/new-york-v4/charts/chart-bar-multiple.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export function ChartBarMultiple() {
6262
cursor={false}
6363
content={<ChartTooltipContent indicator="dashed" />}
6464
/>
65-
<Bar dataKey="desktop" fill="var(--color-desktop)" radius={4} />
66-
<Bar dataKey="mobile" fill="var(--color-mobile)" radius={4} />
65+
<Bar dataKey="desktop" fill="var(--color-desktop)" radius={[4, 4, 0, 0]} />
66+
<Bar dataKey="mobile" fill="var(--color-mobile)" radius={[4, 4, 0, 0]} />
6767
</BarChart>
6868
</ChartContainer>
6969
</CardContent>

0 commit comments

Comments
 (0)