Skip to content

Commit

Permalink
fix(theme): legacy margins (#2262)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickofthyme committed Nov 29, 2023
1 parent 4b30db7 commit 299c869
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
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 { DARK_THEME_BULLET_STYLE } from '../../chart_types/bullet_graph/theme';
import { Colors } from '../../common/colors';
Expand All @@ -26,8 +26,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
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 { LIGHT_THEME_BULLET_STYLE } from '../../chart_types/bullet_graph/theme';
import { Colors } from '../../common/colors';
Expand All @@ -26,8 +26,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
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 299c869

Please sign in to comment.