Skip to content

Commit

Permalink
fix title padding and chart margins
Browse files Browse the repository at this point in the history
  • Loading branch information
nickofthyme committed Dec 17, 2020
1 parent 30c2d13 commit 03e93de
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/plugins/vis_type_xy/public/components/xy_settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,23 @@ export const XYSettings: FC<XYSettingsProps> = ({
},
},
},
axes: {
axisTitle: {
padding: {
outer: 10,
},
},
},
chartMargins:
legendPosition === Position.Top || legendPosition === Position.Right
? {
bottom: 10,
bottom: (theme.chartMargins?.bottom ?? 0) + 10,
}
: {
right: 10,
right: (theme.chartMargins?.right ?? 0) + 10,
},
};

const headerValueFormatter: TickFormatter<any> | undefined = xAxis.ticks?.formatter
? (value) => fillEmptyValue(xAxis.ticks?.formatter?.(value)) ?? ''
: undefined;
Expand Down

0 comments on commit 03e93de

Please sign in to comment.