JSFiddle - React, Tailwind, and code Playground

by juErik

HTML

<link rel="stylesheet" href="//cdn.jsdelivr.net/taucharts/latest/tauCharts.min.css">
<link rel="stylesheet" href="http://cdn.jsdelivr.net/taucharts/latest/tauCharts.normalize.min.css">
<script src="//d3js.org/d3.v3.min.js"></script>
<script src="//jashkenas.github.io/underscore/underscore-min.js"></script>
<script src="http://cdn.jsdelivr.net/taucharts/latest/tauCharts.min.js"></script>
<div id="line"></div>

CSS

body,#line {
    height:100%
}
.color-us {
  stroke:blue
}
.color-bug {
  stroke:red
}

JavaScript

var defData = [{
  type:'us', count:0, date:'12-2013'
},{
  type:'us', count:10, date:'01-2014'
},{
  type:'us', count:15, date:'02-2014'
},{
  type:'us', count:12, date:'03-2014'
},{
  type:'us', count:16, date:'04-2014'
},{
  type:'us', count:3, date:'05-2014'
},{
  type:'bug', count:21, date:'01-2014'
},{
  type:'bug', count:19, date:'02-2014'
},{
  type:'bug', count:23, date:'03-2014'
},{
  type:'bug', count:26, date:'04-2014'
},{
  type:'bug', count:23, date:'05-2014'
}];
var chart = new tauCharts.Chart({
            guide:{
              padding:{l:70, t:10, b:70,r:10},
              showGridLines:'xy',
              color:{
                brewer:{
                  us:'color-us',
                  bug:'color-bug'
                }
              },
              y:{
                label:{
                  text:'Count of completed entities',
                  padding:50
                }
              },
              x:{
                label:'Month'
              }
            },
            data: defData,
            type: 'line',           
            x: 'date',
            y: 'count',
            color: 'type'
        });

  chart.renderTo('#line');