Skip to content

Commit

Permalink
fix(theme): legacy margins (#2262) [61.0.x] (#2263)
Browse files Browse the repository at this point in the history
fix(theme): legacy margins (#2262)
  • Loading branch information
nickofthyme authored Nov 29, 2023
1 parent 7f23c60 commit d60b2fe
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
8 changes: 4 additions & 4 deletions packages/charts/src/utils/themes/legacy_dark_theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions packages/charts/src/utils/themes/legacy_light_theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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,
Expand Down
11 changes: 11 additions & 0 deletions packages/charts/src/utils/themes/theme_common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d60b2fe

Please sign in to comment.