From 4269851160ffb24bdbd7466a05a9ecbeca58b402 Mon Sep 17 00:00:00 2001 From: Michael Nesen Date: Mon, 25 Sep 2023 17:50:37 +0000 Subject: [PATCH] Donut Chart UX updates --- packages/polaris-viz/CHANGELOG.md | 6 ++++++ packages/polaris-viz/src/components/DonutChart/Chart.tsx | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/packages/polaris-viz/CHANGELOG.md b/packages/polaris-viz/CHANGELOG.md index 5803a78a26..e5366a3017 100644 --- a/packages/polaris-viz/CHANGELOG.md +++ b/packages/polaris-viz/CHANGELOG.md @@ -11,6 +11,12 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - Fixed issue where `` bar width would be 1px when data changes from all 0 values to data with non-zero values. +### Changed + +- Changed `` to include 0 or negative values in data. +- Changed `` to show any number of data points. +- Updated `` wrapper to take full height of container and center contents. + ## [9.12.0] - 2023-09-19 - No updates. Transitive dependency bump. diff --git a/packages/polaris-viz/src/components/DonutChart/Chart.tsx b/packages/polaris-viz/src/components/DonutChart/Chart.tsx index efd8b79627..e8d861d4e8 100644 --- a/packages/polaris-viz/src/components/DonutChart/Chart.tsx +++ b/packages/polaris-viz/src/components/DonutChart/Chart.tsx @@ -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,