Skip to content

Commit 299c869

Browse files
authored
fix(theme): legacy margins (#2262)
1 parent 4b30db7 commit 299c869

3 files changed

Lines changed: 19 additions & 8 deletions

File tree

packages/charts/src/utils/themes/legacy_dark_theme.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
import { palettes } from './colors';
1010
import { Theme } from './theme';
1111
import {
12-
DEFAULT_CHART_MARGINS,
13-
DEFAULT_CHART_PADDING,
1412
DEFAULT_GEOMETRY_STYLES,
1513
DEFAULT_MISSING_COLOR,
14+
LEGACY_CHART_MARGINS,
15+
LEGACY_CHART_PADDING,
1616
} from './theme_common';
1717
import { DARK_THEME_BULLET_STYLE } from '../../chart_types/bullet_graph/theme';
1818
import { Colors } from '../../common/colors';
@@ -26,8 +26,8 @@ import { ColorVariant } from '../common';
2626
* @deprecated Use new `DARK_THEME`
2727
*/
2828
export const LEGACY_DARK_THEME: Theme = {
29-
chartPaddings: DEFAULT_CHART_PADDING,
30-
chartMargins: DEFAULT_CHART_MARGINS,
29+
chartPaddings: LEGACY_CHART_PADDING,
30+
chartMargins: LEGACY_CHART_MARGINS,
3131
lineSeriesStyle: {
3232
line: {
3333
visible: true,

packages/charts/src/utils/themes/legacy_light_theme.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
import { palettes } from './colors';
1010
import { Theme } from './theme';
1111
import {
12-
DEFAULT_CHART_MARGINS,
13-
DEFAULT_CHART_PADDING,
1412
DEFAULT_GEOMETRY_STYLES,
1513
DEFAULT_MISSING_COLOR,
14+
LEGACY_CHART_MARGINS,
15+
LEGACY_CHART_PADDING,
1616
} from './theme_common';
1717
import { LIGHT_THEME_BULLET_STYLE } from '../../chart_types/bullet_graph/theme';
1818
import { Colors } from '../../common/colors';
@@ -26,8 +26,8 @@ import { ColorVariant } from '../common';
2626
* @deprecated use new `LIGHT_THEME`
2727
*/
2828
export const LEGACY_LIGHT_THEME: Theme = {
29-
chartPaddings: DEFAULT_CHART_PADDING,
30-
chartMargins: DEFAULT_CHART_MARGINS,
29+
chartPaddings: LEGACY_CHART_PADDING,
30+
chartMargins: LEGACY_CHART_MARGINS,
3131
lineSeriesStyle: {
3232
line: {
3333
visible: true,

packages/charts/src/utils/themes/theme_common.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ export const DEFAULT_CHART_MARGINS: Margins = {
2828
bottom: 0,
2929
};
3030

31+
/**
32+
* Remove in next step to limit diffs
33+
* @internal
34+
*/
35+
export const LEGACY_CHART_PADDING: Margins = {
36+
left: 0,
37+
right: 0,
38+
top: 0,
39+
bottom: 0,
40+
};
41+
3142
/**
3243
* Remove in next step to limit diffs
3344
* @internal

0 commit comments

Comments
 (0)