title: Dojo Line chart from JSON with multiple series and common x-axis
body: <p>I believe what I am trying to accomplish should be a fairly common task, yet I'm having difficulty getting it to work.  I simply wish to create a multi-series plot from a data set containing (for each record) an ISO8601 timestamp along with multiple data points.  The data is in JSON format and I'm using dojox.charting.chart "Lines" type.</p>
  
  <p>I'm already aware that the Dojo charts cannot directly handle time-based axis data, let alone ISO8601.  So I've already dealt with converting the x-axis to milliseconds-since-T0 server-side.</p>
  
  <p>Here is a distilled example excerpt of my JSON:</p>
  
  <pre><code>[{"Offset_ms":0,"CP":250.58368,"TP":181.88211},
  {"Offset_ms":360000,"CP":233.18443,"TP":119.94824},
  {"Offset_ms":540000,"CP":227.15465,"TP":117.99422},
  {"Offset_ms":720000,"CP":222.87495,"TP":117.55895},
  {"Offset_ms":896000,"CP":218.19876,"TP":117.64221},
  {"Offset_ms":900000,"CP":219.77487,"TP":117.93475}]
  </code></pre>
  
  <p>And the distilled JavaScript (assume the above JSON is in the variable 'sequenceData'):</p>
  
  <pre><code>var chart = new dojox.charting.Chart("sequenceDataGraph");
  
  chart.addPlot("default", {
      type: "Lines",
      tension: "X"
  });
  chart.addAxis("x", { labelFunc: labelTimeAxis });
  chart.addAxis("y", { vertical: true });
  
  var sequenceDataStore = new dojo.store.Observable(new dojo.store.Memory({
      data: {
          label: "Sequence",
          items: sequenceData
      }
  }));
  
  addSequenceDataSeries(chart, sequenceDataStore, "TP");
  addSequenceDataSeries(chart, sequenceDataStore, "CP");
  
  chart.render();
  
  function addSequenceDataSeries(chart, sequenceDataStore, sColumnName) {
      chart.addSeries(sColumnName, new dojox.charting.StoreSeries(sequenceDataStore, { query: {} },
                      sColumnName));
  }
  </code></pre>
  
  <p>What appears to be happening, is that Dojo Chart is not using the x-axis data at all, but instead plotting each point at a fixed interval based on the number of data points.  That is, each data point seems to be assigned an ordinal, such as if Offset_ms was merely 1, 2, 3...  Since my data points are <em>not</em> always at fixed intervals, the resulting graph is distorted.</p>
  
  <p>How do I instruct Dojo Chart to use the "Offset_ms" field in the JSON data for the x-axis component?</p>
  
  <p>I've scoured the tutorials, the API docs and performed numerous Google &amp; SO searches to no avail.  I've even browsed portions of the Dojo source, particularly StoreSeries.js.uncompressed.js, but I'm not finding any answers.  Surely this is possible, and hopefully trivial!</p>