From d60b2feb36d3da3de29d057edcddb6b3277db9b3 Mon Sep 17 00:00:00 2001 From: Nick Partridge Date: Wed, 29 Nov 2023 11:13:35 -0700 Subject: [PATCH] fix(theme): legacy margins (#2262) [61.0.x] (#2263) fix(theme): legacy margins (#2262) --- packages/charts/src/utils/themes/legacy_dark_theme.ts | 8 ++++---- .../charts/src/utils/themes/legacy_light_theme.ts | 8 ++++---- packages/charts/src/utils/themes/theme_common.ts | 11 +++++++++++ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/packages/charts/src/utils/themes/legacy_dark_theme.ts b/packages/charts/src/utils/themes/legacy_dark_theme.ts index a761a47630..8382adb4f8 100644 --- a/packages/charts/src/utils/themes/legacy_dark_theme.ts +++ b/packages/charts/src/utils/themes/legacy_dark_theme.ts @@ -9,10 +9,10 @@ import { palettes } from './colors'; import { Theme } from './theme'; import { - DEFAULT_CHART_MARGINS, - DEFAULT_CHART_PADDING, DEFAULT_GEOMETRY_STYLES, DEFAULT_MISSING_COLOR, + LEGACY_CHART_MARGINS, + LEGACY_CHART_PADDING, } from './theme_common'; import { Colors } from '../../common/colors'; import { GOLDEN_RATIO, TAU } from '../../common/constants'; @@ -25,8 +25,8 @@ import { ColorVariant } from '../common'; * @deprecated Use new `DARK_THEME` */ export const LEGACY_DARK_THEME: Theme = { - chartPaddings: DEFAULT_CHART_PADDING, - chartMargins: DEFAULT_CHART_MARGINS, + chartPaddings: LEGACY_CHART_PADDING, + chartMargins: LEGACY_CHART_MARGINS, lineSeriesStyle: { line: { visible: true, diff --git a/packages/charts/src/utils/themes/legacy_light_theme.ts b/packages/charts/src/utils/themes/legacy_light_theme.ts index fb5f48ad2f..b1f03f426a 100644 --- a/packages/charts/src/utils/themes/legacy_light_theme.ts +++ b/packages/charts/src/utils/themes/legacy_light_theme.ts @@ -9,10 +9,10 @@ import { palettes } from './colors'; import { Theme } from './theme'; import { - DEFAULT_CHART_MARGINS, - DEFAULT_CHART_PADDING, DEFAULT_GEOMETRY_STYLES, DEFAULT_MISSING_COLOR, + LEGACY_CHART_MARGINS, + LEGACY_CHART_PADDING, } from './theme_common'; import { Colors } from '../../common/colors'; import { GOLDEN_RATIO, TAU } from '../../common/constants'; @@ -25,8 +25,8 @@ import { ColorVariant } from '../common'; * @deprecated use new `LIGHT_THEME` */ export const LEGACY_LIGHT_THEME: Theme = { - chartPaddings: DEFAULT_CHART_PADDING, - chartMargins: DEFAULT_CHART_MARGINS, + chartPaddings: LEGACY_CHART_PADDING, + chartMargins: LEGACY_CHART_MARGINS, lineSeriesStyle: { line: { visible: true, diff --git a/packages/charts/src/utils/themes/theme_common.ts b/packages/charts/src/utils/themes/theme_common.ts index 65cffb715c..a57341c113 100644 --- a/packages/charts/src/utils/themes/theme_common.ts +++ b/packages/charts/src/utils/themes/theme_common.ts @@ -28,6 +28,17 @@ export const DEFAULT_CHART_MARGINS: Margins = { bottom: 0, }; +/** + * Remove in next step to limit diffs + * @internal + */ +export const LEGACY_CHART_PADDING: Margins = { + left: 0, + right: 0, + top: 0, + bottom: 0, +}; + /** * Remove in next step to limit diffs * @internal