Skip to content

Commit

Permalink
Donut Chart UX updates
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnesen committed Sep 25, 2023
1 parent fffd61b commit 4269851
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/polaris-viz/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

- Fixed issue where `<BarChart />` bar width would be 1px when data changes from all 0 values to data with non-zero values.

### Changed

- Changed `<DonutChart />` to include 0 or negative values in data.
- Changed `<DonutChart />` to show any number of data points.
- Updated `<DonutChart />` wrapper to take full height of container and center contents.

## [9.12.0] - 2023-09-19

- No updates. Transitive dependency bump.
Expand Down
4 changes: 4 additions & 0 deletions packages/polaris-viz/src/components/DonutChart/Chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ export function Chart({

const {height, width, legend, setLegendDimensions, isLegendMounted} =
useLegend({
<<<<<<< HEAD
data: [{series: data.slice(0, 5), shape: 'Bar'}],
=======
data: [{series: data, shape: 'Bar'}],
>>>>>>> d81f02a4 (Donut Chart UX updates)
dimensions,
showLegend,
direction: legendDirection,
Expand Down

0 comments on commit 4269851

Please sign in to comment.