Skip to content

Commit 76e2f80

Browse files
committed
round legend title font size and increase it to all orientations
1 parent 432c937 commit 76e2f80

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/legend/attributes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ module.exports = {
191191
description: [
192192
'Sets this legend\'s title font.',
193193
'Defaulted to `legend.font`.',
194-
'When `orientation` is *h*, the size would be defaulted to be',
195-
'20% greater than the font size used for legend items.'
194+
'The size would be defaulted to be',
195+
'around 20% greater than the font size used for legend items.'
196196
].join(' '),
197197
}),
198198
side: {

src/components/legend/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) {
122122
if(titleText) {
123123
coerce('title.side', isHorizontal ? 'left' : 'top');
124124
var dfltTitleFont = Lib.extendFlat({}, itemFont, {
125-
size: itemFont.size * (isHorizontal ? 1.2 : 1)
125+
size: Math.round(itemFont.size * 1.2)
126126
});
127127

128128
Lib.coerceFont(coerce, 'title.font', dfltTitleFont);

0 commit comments

Comments
 (0)