From cff03e4a5704ed79cfb2dd88b9f9c32b05576b35 Mon Sep 17 00:00:00 2001 From: Michael Nesen Date: Mon, 25 Sep 2023 15:22:05 +0000 Subject: [PATCH] Donut Chart UX updates --- packages/polaris-viz/CHANGELOG.md | 8 +++++++- packages/polaris-viz/src/components/DonutChart/Chart.tsx | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/polaris-viz/CHANGELOG.md b/packages/polaris-viz/CHANGELOG.md index b3659821ff..71cd8e701d 100644 --- a/packages/polaris-viz/CHANGELOG.md +++ b/packages/polaris-viz/CHANGELOG.md @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## Unreleased + +### 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 diff --git a/packages/polaris-viz/src/components/DonutChart/Chart.tsx b/packages/polaris-viz/src/components/DonutChart/Chart.tsx index efd8b79627..9dbbec1dd3 100644 --- a/packages/polaris-viz/src/components/DonutChart/Chart.tsx +++ b/packages/polaris-viz/src/components/DonutChart/Chart.tsx @@ -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,