Skip to content

Commit b7cda0b

Browse files
committed
render subtitle even if title is not present
1 parent 7cc019d commit b7cda0b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/titles/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ function draw(gd, titleClass, options) {
136136
txt = Lib.templateString(txt, fullLayout._meta);
137137
}
138138

139-
var elShouldExist = txt || editable;
139+
var elShouldExist = txt || subtitleTxt || editable;
140140

141141
var hColorbarMoveTitle;
142142
if(!group) {
@@ -158,9 +158,9 @@ function draw(gd, titleClass, options) {
158158

159159
var subtitleEl = null;
160160
var subtitleClass = titleClass + '-subtitle';
161+
var subtitleElShouldExist = subtitleTxt || editable;
161162

162-
if(subtitleEnabled && (subtitleTxt || editable)) {
163-
var subtitleElShouldExist = subtitleTxt || editable;
163+
if(subtitleEnabled && subtitleElShouldExist) {
164164
subtitleEl = group.selectAll('text.' + subtitleClass)
165165
.data(subtitleElShouldExist ? [0] : []);
166166
subtitleEl.enter().append('text');

0 commit comments

Comments
 (0)