Commit 36737fd0 authored by David Schnur's avatar David Schnur

Merge pull request #68 from andromedado/patch-1

Cast tick label to string prior to `replace` call
parents 5c978cdd b52df3ca
...@@ -943,7 +943,7 @@ ...@@ -943,7 +943,7 @@
// accept various kinds of newlines, including HTML ones // accept various kinds of newlines, including HTML ones
// (you can actually split directly on regexps in Javascript, // (you can actually split directly on regexps in Javascript,
// but IE is unfortunately broken) // but IE is unfortunately broken)
var lines = t.label.replace(/<br ?\/?>|\r\n|\r/g, "\n").split("\n"); var lines = String(t.label).replace(/<br ?\/?>|\r\n|\r/g, "\n").split("\n");
for (var j = 0; j < lines.length; ++j) { for (var j = 0; j < lines.length; ++j) {
var line = { text: lines[j] }, var line = { text: lines[j] },
m = ctx.measureText(line.text); m = ctx.measureText(line.text);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment