From 972299e25c8116d6bb6615393b7ab0a57d4dae1c 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 | 6 +++++- packages/polaris-viz/src/components/LineChart/Chart.tsx | 3 ++- packages/polaris-viz/src/constants.ts | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/polaris-viz/CHANGELOG.md b/packages/polaris-viz/CHANGELOG.md index 2e14768a7..1859b2e85 100644 --- a/packages/polaris-viz/CHANGELOG.md +++ b/packages/polaris-viz/CHANGELOG.md @@ -5,7 +5,11 @@ 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 + +- Added an offset to y-axis labels for `` to accommodate variations in font rendering ## [9.16.0] - 2023-10-17 diff --git a/packages/polaris-viz/src/components/LineChart/Chart.tsx b/packages/polaris-viz/src/components/LineChart/Chart.tsx index c1c4adbeb..a4033e962 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({