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 f789b55
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/polaris-viz-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export {
MAX_DIAGONAL_VISIBLE_HEIGHT,
VERTICAL_LABEL_TARGET_WIDTH,
DIAGONAL_LABEL_MIN_WIDTH,
DONUT_CHART_MAX_SERIES_COUNT,
HORIZONTAL_LABEL_TARGET_HEIGHT,
VERTICAL_LABEL_MIN_WIDTH,
Y_AXIS_CHART_SPACING,
Expand Down
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
2 changes: 1 addition & 1 deletion packages/polaris-viz/src/components/DonutChart/Chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function Chart({

const {height, width, legend, setLegendDimensions, isLegendMounted} =
useLegend({
data: [{series: data.slice(0, 5), shape: 'Bar'}],
data: [{series: data, shape: 'Bar'}],
dimensions,
showLegend,
direction: legendDirection,
Expand Down

0 comments on commit f789b55

Please sign in to comment.