Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!doctype html>
<html lang="en">
<head>
  <script src="http://d3js.org/d3.v3.min.js"></script>
  <script src="http://dimplejs.org/dist/dimple.v2.0.0.min.js"></script>  
</head>
<body>
  <div id="chart" style="background:grey"></div>
</body>
</html>
 
        var svg1 = dimple.newSvg("#chart", 600, 400);
        var data1 = [
          [
            {week: 'week 1', miles: 1},
            {week: 'week 2', miles: 2},
            {week: 'week 3', miles: 3},
            {week: 'week 4', miles: 4}
          ],
          [
            {week: 'week 1', miles: 2},
            {week: 'week 2', miles: 4},
            {week: 'week 3', miles: 6},
            {week: 'week 4', miles: 8}
          ]
        ];
        
        var chart1 = new dimple.chart(svg1);
        var xAxis = chart1.addCategoryAxis("x", "week");
        var yAxis = chart1.addMeasureAxis("y", "miles");
        s1 = chart1.addSeries("Bill", dimple.plot.line);
        s1.data = data1[0];
        s1.plot=dimple.plot.line;
        s2 = chart1.addSeries("Sarah", dimple.plot.line);
        s2.data = data1[1];
        s2.plot=dimple.plot.line;
    
    chart1.draw(1000);
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers