Commit b52f74e5 authored by Ole Laursen's avatar Ole Laursen

Merge pull request #6 from smashedpumpkin/fix-fonts

Fix bug with font of the axis labels when multiple font-families are specified
parents b15669fd a35b7d0f
...@@ -1693,7 +1693,9 @@ ...@@ -1693,7 +1693,9 @@
// placeholder.append('<div style="position:absolute;opacity:0.10;background-color:red;left:' + box.left + 'px;top:' + box.top + 'px;width:' + box.width + 'px;height:' + box.height + 'px"></div>') // debug // placeholder.append('<div style="position:absolute;opacity:0.10;background-color:red;left:' + box.left + 'px;top:' + box.top + 'px;width:' + box.width + 'px;height:' + box.height + 'px"></div>') // debug
ctx.fillStyle = axis.options.color; ctx.fillStyle = axis.options.color;
ctx.font = f.style + " " + f.variant + " " + f.weight + " " + f.size + "px '" + f.family + "'"; // Important: Don't use quotes around axis.font.family! Just around single
// font names like 'Times New Roman' that have a space or special character in it.
ctx.font = f.style + " " + f.variant + " " + f.weight + " " + f.size + "px " + f.family;
ctx.textAlign = "start"; ctx.textAlign = "start";
// middle align the labels - top would be more // middle align the labels - top would be more
// natural, but browsers can differ a pixel or two in // natural, but browsers can differ a pixel or two in
......
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