JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://nvd3.org/assets/js/data/stream_layers.js"></script>
<script src="http://nvd3.org/assets/lib/d3.v3.js"></script>
<script src="http://nvd3.org/assets/js/nv.d3.js"></script>
<link rel="stylesheet" href="http://nvd3.org/assets/css/nv.d3.css">
<script src="http://nvd3.org/assets/js/page/index.js"></script>
<div id="chart">
<svg></svg>
</div>
CSS
#chart svg {
height: 400px;
}
JavaScript
nv.addGraph(function() {
var chart = nv.models.lineChart()
.options({
showXAxis: true,
showYAxis: true,
tooltips: true,
transitionDuration: 250
});
chart.useInteractiveGuideline(true)
chart.xAxis
.axisLabel(' ')
;
chart.yAxis
.axisLabel(' ')
;
var datax = [{"key":"IOVN","values":[{"x":0,"y":387.3,"z":"01640"},{"x":1,"y":387.3,"z":"01640"},{"x":2,"y":387.3,"z":"01640"},{"x":3,"y":387,"z":"01166"},{"x":4,"y":387.3,"z":"01959"},{"x":5,"y":387.3,"z":"01959"},{"x":6,"y":387.3,"z":"01959"}]},{"key":"IOVX","values":[{"x":0,"y":387.3,"z":"01640"},{"x":1,"y":387.3,"z":"01640"},{"x":2,"y":387.3,"z":"01640"},{"x":3,"y":388,"z":"01166"},{"x":4,"y":387.3,"z":"01959"},{"x":5,"y":387.3,"z":"01959"},{"x":6,"y":387.3,"z":"01959"}]}];
d3.select('#chart svg')
.datum(datax)
.transition().duration(500)
.call(chart)
;
nv.utils.windowResize(chart.update);
return chart;
});