From ed1267733a72c85574b10179623833a1b0967eab Mon Sep 17 00:00:00 2001 From: Margarita Morozova Date: Tue, 7 Nov 2023 10:57:20 -0800 Subject: [PATCH] add an offset to y-axis label in linechart --- packages/polaris-viz/CHANGELOG.md | 4 ++++ packages/polaris-viz/src/components/LineChart/Chart.tsx | 3 ++- packages/polaris-viz/src/constants.ts | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/polaris-viz/CHANGELOG.md b/packages/polaris-viz/CHANGELOG.md index 2e14768a73..4f7bec2218 100644 --- a/packages/polaris-viz/CHANGELOG.md +++ b/packages/polaris-viz/CHANGELOG.md @@ -7,6 +7,10 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +### Changed + +- Added an offset to y-axis labels for `` to accommodate variations in font rendering + ## [9.16.0] - 2023-10-17 - No updates. Transitive dependency bump. diff --git a/packages/polaris-viz/src/components/LineChart/Chart.tsx b/packages/polaris-viz/src/components/LineChart/Chart.tsx index c1c4adbeb4..a4033e9621 100644 --- a/packages/polaris-viz/src/components/LineChart/Chart.tsx +++ b/packages/polaris-viz/src/components/LineChart/Chart.tsx @@ -53,6 +53,7 @@ import { import { ChartMargin, ANNOTATIONS_LABELS_OFFSET, + Y_AXIS_LABEL_OFFSET, CROSSHAIR_ID, } from '../../constants'; import {VisuallyHiddenRows} from '../VisuallyHiddenRows'; @@ -316,7 +317,7 @@ export function Chart({