Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>i would use the <a href="http://www.dojotoolkit.org/reference-guide/dojox/charting/DataChart.html" rel="nofollow noreferrer">dojox.data.DataChart</a>. You have to use a datastore to pass in the data. See <a href="http://dojotoolkit.org/reference-guide/quickstart/data/usingdatastores.html#quickstart-data-usingdatastores" rel="nofollow noreferrer">quickstart-data-usingdatastores</a> and <a href="http://dojotoolkit.org/reference-guide/dojo/data.html#dojo-data" rel="nofollow noreferrer">dojo.data</a>.</p> <p>First use a <a href="http://dojotoolkit.org/reference-guide/dojo/data/ItemFileReadStore.html#dojo-data-itemfilereadstore" rel="nofollow noreferrer">dojo.data.ItemFileReadStore</a>. If that works fine, use a composite datastore, that wraps other datastores to get your data from multiple sources (You might have to create that class by yourself)</p> <p>-- EDIT --</p> <p>An example using a datachart with an itemfilereadstore:</p> <pre><code>&lt;html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"&gt; &lt;head&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js.uncompressed.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; //&lt;![CDATA[ dojo.require("dojox.charting.DataChart"); dojo.require("dojo.data.ItemFileWriteStore"); dojo.addOnLoad(function() { var store = new dojo.data.ItemFileWriteStore({ url: "stock.json" }); chart = new dojox.charting.DataChart("chartDiv" ,{}); chart.setStore(store, {symbol:"*"}, "historicPrice"); // &lt;-- single value property }); //]]&gt; &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="chartDiv" style="width: 600px; height: 400px;"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>The content of stock.json:</p> <pre><code>{ "identifier": "symbol", "idAttribute":"symbol", "label": "symbol","items": [ { "symbol":"ANDT", "name":"Anduct", "historicPrice":[0.01,3.52,3.66,3.11,3.90,3.11,3.11], "open":3.13, "price":3.52, "updown":"^", "change":"+0.39 (+21%)", "low":3.13, "high":3.69 }, { "symbol":"ATEU", "name":"Ations Europe", "historicPrice":[6.72,6.76,6.61,6.41,6.31,6.99,7.20], "open":6.72, "price":6.76, "updown":"^", "change":"+0.04 (+01%)", "low":6.56, "high":6.77 }, { "symbol":"BGCN", "name":"Bagies Consulting", "historicPrice":[4.11,3.98,4.05,4.20,4.16,4.22,3.80], "open":4.11, "price":3.98, "updown":"v", "change":"-0.13 (-05%)", "low":3.77, "high":4.11 }, { "symbol":"BAYC", "name":"BAY Corporation", "historicPrice":[9.79,9.60,9.50,2.23,9.45,9.76,9.99], "open":9.79, "price":9.60, "updown":"v", "change":"-0.19 (+14%)", "low":9.60, "high":9.81 }, { "symbol":"CRCR", "name":"Corcor PLC", "historicPrice":[8.44,8.44,8.54,8.60,9.65,8.42,8.44], "open":8.44, "price":8.44, "updown":"--", "change":"+0.00 (+00%)", "low":8.22, "high":8.44 }, { "symbol":"DTOA", "name":"Datio PLC", "historicPrice":[2.11,2.47,3.11,3.06,3.01,3.01,3.00], "open":2.11, "price":2.47, "updown":"^", "change":"+0.36 (+36%)", "low":2.11, "high":3.01 } ]} </code></pre> <p>To use multiple stores you need to create a compositeStore that groups multiple stores . Unfortunately it doesn't seem to exist, so you have to implement that class yourself.</p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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