Note that there are some explanatory texts on larger screens.

plurals
  1. POflotr2 The target container must be visible at
    text
    copied!<p>I'm trying to get flotr2 graphs working in my Phonegap application. I can get their example graph(http://www.humblesoftware.com/flotr2/documentation#usage) to run on an AVD, but if I try to use it in my actual application it gives me the error Uncaught The target container must be visible at file:///android_asset/www/flotr2.min.js:27 How would I fix this?</p> <p>Code relating to flotr2:</p> <pre><code>//Flotr2 style contained in head below other styles &lt;style type="text/css"&gt; body { margin: 0px; padding: 0px; } #container { width : 600px; height: 384px; margin: 8px auto; } &lt;/style&gt; //Accidentally changing &lt;/style&gt; to &lt;/script&gt; causes the graph to display //but everything else is wrong, as can be expected </code></pre> <p>and:</p> <pre><code>//Page meant to contain graph; in body &lt;!-- Graphs --&gt; &lt;div data-role="page" data-theme="a" id="page21"&gt; &lt;div data-theme="a" data-role="header"&gt; &lt;h3&gt; Graphs &lt;/h3&gt; &lt;a data-role="button" data-direction="reverse" data-transition="slide" href="#page15" data-icon="arrow-l" data-iconpos="left" class="ui-btn-left"&gt; Back &lt;/a&gt; &lt;/div&gt; &lt;div data-role="content" style="padding: 15px"&gt; &lt;div id="container"&gt;&lt;/div&gt; &lt;script type="text/javascript" src="flotr2.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; (function () { var container = document.getElementById('container'), start = (new Date).getTime(), data, graph, offset, i; // Draw a sine curve at time t function animate (t) { data = []; offset = 2 * Math.PI * (t - start) / 10000; // Sample the sine function for (i = 0; i &lt; 4 * Math.PI; i += 0.2) { data.push([i, Math.sin(i - offset)]); } // Draw Graph graph = Flotr.draw(container, [ data ], { yaxis : { max : 2, min : -2 } }); // Animate setTimeout(function () { animate((new Date).getTime()); }, 50); } animate(start); })(); &lt;/script&gt; &lt;/div&gt; &lt;/div&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload