Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(theme): legacy margins #2262

Merged
merged 2 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 { 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
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 { 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
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