title: change chart type in dimple.js to automate chart production
body: <p>I would like to be able to change the chart type of charts using dimple.js by using a variable. I want for instance to switch from bars to lines. I've tried with no success, it seems simple however! Any idea?</p>
  
  <p>Below is my code :</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;title&gt;Test&lt;/title&gt;
          &lt;script type="text/javascript" src="http://d3js.org/d3.v3.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="http://dimplejs.org/dist/dimple.v2.1.0.min.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="chartContainer"&gt;
    &lt;script type="text/javascript"&gt;
    var chartType = "line";
    var chartDimple = "dimple.plot." + chartType;
      var svg = dimple.newSvg("#chartContainer", 590, 400);
      d3.csv("data/test.csv", function (data) { //d3.tsv("data/example_data.tsv", function (data) {
        var myChart = new dimple.chart(svg, data);
        myChart.setBounds(60, 30, 510, 305)
        var x = myChart.addCategoryAxis("x", "Month");
        x.addOrderRule("Date");
        myChart.addMeasureAxis("y", "Unit Sales");
        // myChart.addSeries(null, dimple.plot.bar);
        myChart.addSeries(null, chartDimple);
        myChart.draw();
      });
    &lt;/script&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>