Skip to content

Commit 77bc2b9

Browse files
committed
Add fallback to calls to texttemplateStringForShapes
1 parent 02a4cad commit 77bc2b9

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/components/shapes/display_labels.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ module.exports = function drawLabel(gd, index, options, shapeGroup) {
3232
if (val !== undefined) templateValues[key] = val;
3333
}
3434
}
35-
text = Lib.texttemplateStringForShapes(
36-
options.label.texttemplate,
37-
{},
38-
gd._fullLayout._d3locale,
39-
templateValues
40-
);
35+
text = Lib.texttemplateStringForShapes({
36+
args: [templateValues],
37+
d3locale: gd._fullLayout._d3locale,
38+
fallback: options.label.texttemplatefallback,
39+
labels: {},
40+
string: options.label.texttemplate
41+
});
4142
} else {
4243
text = options.label.text;
4344
}

0 commit comments

Comments
 (0)