Skip to content

Commit db5de4d

Browse files
committed
set subtitle font size based on title font size
1 parent 28d30ee commit db5de4d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/titles/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ function draw(gd, titleClass, options) {
247247
subtitleEl.style('opacity', subtitleOpacity * Color.opacity(subFontColor))
248248
.call(Drawing.font, {
249249
color: Color.rgb(subFontColor),
250-
size: d3.round(subFontSize * 0.8, 2),
250+
size: d3.round(subFontSize, 2),
251251
family: subFontFamily,
252252
weight: subFontWeight,
253253
style: subFontStyle,

src/plots/plots.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@ plots.supplyLayoutGlobalDefaults = function(layoutIn, layoutOut, formatObj) {
14981498
coerce('title.subtitle.text', layoutOut._dfltTitle.plotsubtitle);
14991499
Lib.coerceFont(coerce, 'title.subtitle.font', font, {
15001500
overrideDflt: {
1501-
size: Math.round(fontSize * 1.2)
1501+
size: Math.round(layoutOut.title.font.size * 0.65)
15021502
}
15031503
});
15041504

0 commit comments

Comments
 (0)