Skip to content

Commit 03e93de

Browse files
committed
fix title padding and chart margins
1 parent 30c2d13 commit 03e93de

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/plugins/vis_type_xy/public/components/xy_settings.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,23 @@ export const XYSettings: FC<XYSettingsProps> = ({
113113
},
114114
},
115115
},
116+
axes: {
117+
axisTitle: {
118+
padding: {
119+
outer: 10,
120+
},
121+
},
122+
},
116123
chartMargins:
117124
legendPosition === Position.Top || legendPosition === Position.Right
118125
? {
119-
bottom: 10,
126+
bottom: (theme.chartMargins?.bottom ?? 0) + 10,
120127
}
121128
: {
122-
right: 10,
129+
right: (theme.chartMargins?.right ?? 0) + 10,
123130
},
124131
};
132+
125133
const headerValueFormatter: TickFormatter<any> | undefined = xAxis.ticks?.formatter
126134
? (value) => fillEmptyValue(xAxis.ticks?.formatter?.(value)) ?? ''
127135
: undefined;

0 commit comments

Comments
 (0)