Note that there are some explanatory texts on larger screens.

plurals
  1. POdrop down menu with visualization
    primarykey
    data
    text
    <p>I'm trying to to add a drop-down box menu in which i will make my choice in order to visualize data. My visualization works fine without the drop-down box but when i put them together something goes wrong. In my code i want to visualize the data when i choose selection02. Could anyone help me?</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/static/modules/gviz/1.0/chart.js"&gt; function allagi() { if (document.getElementById("selection01").selected==true) { function01(); } else if (document.getElementById("selection02").selected==true) { f1(); } else if (document.getElementById("selection03").selected==true) { function03(); } else if (document.getElementById("selection04").selected==true) { function04(); } } function f1(){ {"dataSourceUrl":"//docs.google.com/spreadsheet/tq?key=0AihqKzH-MgAndERnaFVsYk1RLUM3S0pDSmNjcEQ4M1E&amp;transpose=0&amp;headers=0&amp;range=A2%3AB13&amp;gid=0&amp;pub=1","options":{"vAxes":[{"useFormatFromData":true,"viewWindowMode":"pretty","viewWindow":{}},{"useFormatFromData":true,"viewWindowMode":"pretty","viewWindow":{}}],"booleanRole":"certainty","animation":{"duration":0},"useFirstColumnAsDomain":true,"hAxis":{"useFormatFromData":true,"viewWindowMode":"pretty","viewWindow":{}},"isStacked":false,"width":454,"height":285},"state":{},"chartType":"AreaChart","chartName":"\u0393\u03c1\u03ac\u03c6\u03b7\u03bc\u03b1 1"} }&lt;/script&gt; &lt;/head&gt; &lt;body onLoad="loadContent();"&gt; &lt;div id="logo"&gt;&lt;select onchange="allagi()"&gt; &lt;option id="selection01"&gt;Selection01&lt;/option&gt; &lt;option id="selection02"&gt;Selection02&lt;/option&gt; &lt;option id="selection03"&gt;Selection03&lt;/option&gt; &lt;option id="selection04"&gt;Selection04&lt;/option&gt; &lt;/select&gt;&lt;/div&gt; &lt;div id="contentArea" style="margin: 20px 0px 10px 10px; border: 1px solid #CCC; width: 780px; height: 250px; float: left;"&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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