<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[.fillText() in a canvas box]]></title><description><![CDATA[<p dir="auto">I’m working on a weather graph, and using a Canvas box to draw the lines.  It’s based off of MMM-Forecast-io, which has a good basic precip graph.</p>
<p dir="auto">I’m having issues adding text labels into the graph.  Trimming the code down, this is what I’m trying to do:</p>
<pre><code>var element = document.createElement('canvas');            
var context = element.getContext('2d');
context.font = "10px Arial";
context.fillText("X", 10, 10 );   // problem here
</code></pre>
<p dir="auto">If I include that last line, the module breaks. What’s the right way to put text in a a Canvas box?</p>
<p dir="auto">Also, when I break modules doing stuff like this, how do you see an error message to get an idea of what went wrong?</p>
]]></description><link>https://forum.magicmirror.builders/topic/1962/filltext-in-a-canvas-box</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 14:09:30 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/1962.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Mar 2017 15:52:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to .fillText() in a canvas box on Sun, 05 Mar 2017 03:23:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cato" aria-label="Profile: Cato">@<bdi>Cato</bdi></a> [facepalm] Further proof that my heritage is from case-insensitive programming languages.</p>
]]></description><link>https://forum.magicmirror.builders/post/16477</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/16477</guid><dc:creator><![CDATA[FlatPepsi]]></dc:creator><pubDate>Sun, 05 Mar 2017 03:23:51 GMT</pubDate></item><item><title><![CDATA[Reply to .fillText() in a canvas box on Sat, 04 Mar 2017 18:21:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/flatpepsi" aria-label="Profile: FlatPepsi">@<bdi>FlatPepsi</bdi></a> remember is <code>fillText</code> with a small <strong>f</strong> … 😉</p>
]]></description><link>https://forum.magicmirror.builders/post/16454</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/16454</guid><dc:creator><![CDATA[Cato]]></dc:creator><pubDate>Sat, 04 Mar 2017 18:21:56 GMT</pubDate></item><item><title><![CDATA[Reply to .fillText() in a canvas box on Sat, 04 Mar 2017 18:18:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cato" aria-label="Profile: Cato">@<bdi>Cato</bdi></a> Thanks - that was the key to what I needed.</p>
<p dir="auto">My coordinates for placing the text was using a variable “TempY”, when I had earlier defined it as “tempY”. Stupid case sensitive variable names.</p>
<p dir="auto">tl;dr: I’m an idiot.</p>
<p dir="auto">Thanks for the tip, now I can see error messages, and my FillText() command is working.</p>
]]></description><link>https://forum.magicmirror.builders/post/16453</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/16453</guid><dc:creator><![CDATA[FlatPepsi]]></dc:creator><pubDate>Sat, 04 Mar 2017 18:18:51 GMT</pubDate></item><item><title><![CDATA[Reply to .fillText() in a canvas box on Sat, 04 Mar 2017 16:57:47 GMT]]></title><description><![CDATA[<p dir="auto">Since you’re asking how to see the error message I guess you don’t really know if that line has an error or just don’t do what you thought.</p>
<p dir="auto">To see errors, open your mirror in a browser and press F12 for developer tools. Look in Console tab.</p>
<p dir="auto">Syntax of <code>fillText</code>: <a href="https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Drawing_text" target="_blank" rel="noopener noreferrer nofollow ugc">https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Drawing_text</a></p>
]]></description><link>https://forum.magicmirror.builders/post/16433</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/16433</guid><dc:creator><![CDATA[Cato]]></dc:creator><pubDate>Sat, 04 Mar 2017 16:57:47 GMT</pubDate></item></channel></rss>