adobe / react-spectrum-charts

Build compelling visualizations using declarative react components.
http://opensource.adobe.com/react-spectrum-charts/
Apache License 2.0
65 stars 16 forks source link

Donut (alpha) size less than 100 #288

Closed natvilla closed 5 months ago

natvilla commented 5 months ago

Provide a general summary of the issue here

Creating a Donut with size less than 100 always creates an svg with size equal to 100. It doesn't seem possible to create a size smaller than 100 using width/height. It's still possible to create a smaller size using padding.

๐Ÿค” Expected Behavior?

The svg should be the same inputted width/height as the Chart props.

๐Ÿ˜ฏ Current Behavior

Actual svg width/height is always 100 when Chart props are less than 100.

Screen Shot 2024-05-07 at 12 02 41 PM

๐Ÿ’ Possible Solution

No response

๐Ÿ”ฆ Context

No response

๐Ÿ–ฅ๏ธ Steps to Reproduce

<Chart
    colorScheme={colorScheme}
    colors={[fillColor, REMAINDER_COLOR]}
    data={data}
    description={description}
    height={65}
    locale={locale}
    width={65}
>
    <RSCDonut {...donutProps} />
</Chart>

Version

1.6.0

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

macOS Monterey

๐Ÿงข Your Company/Team

Adobe Agora

๐Ÿ•ท Tracking Issue

No response

marshallpete commented 5 months ago

With the recent dynamic chart height changes. It's possible that a minHeight of 100 was added. We need to update that. min height and min width should only be used when width/height are relative values (percentages).