nvd3.py
HTML code produced by the test code of the nvd3.py Python module in my "Goulib" library available at http://pypi.python.org/pypi/Goulib
by Philippe Guglielmetti
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<link media="all" href="http://nvd3.org/src/nv.d3.css" type="text/css" rel="stylesheet" />
<script src="http://nvd3.org/lib/d3.v2.js" type="text/javascript"></script>
<script src="http://nvd3.org/nv.d3.js" type="text/javascript"></script>
</head>
<body>
<h3>lineChart</h3>
<div id="chart1"><svg></svg></div>
<script type="text/javascript">
nv.addGraph(function() {
var chart = nv.models.lineChart();
chart.xAxis
.tickFormat(d3.format(',.2f'))
chart.yAxis
.tickFormat(d3.format(',.2f'))
d3.select('#chart1 svg')
.datum(data_chart1)
.transition().duration(500).call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
data_chart1=[{"color": "#ff0000", "values": [{"y": 0.004339838693226169, "x": 0.0}, {"y": 0.0022740504495798934, "x": 0.06283185307179587}, {"y": 0.0011539088758382157, "x": 0.12566370614359174}, {"y": 0.0005670062084606388, "x": 0.1884955592153876}, {"y": 0.00026980437672409794, "x": 0.25132741228718347}, {"y": 0.00012432401914819668, "x": 0.3141592653589793}, {"y": 5.547610575890558e-05, "x": 0.37699111843077515}, {"y": 2.3971861950185253e-05, "x": 0.439822971502571}, {"y": 1.0030958723041138e-05, "x": 0.5026548245743668}, {"y": 4.06469528148683e-06, "x": 0.5654866776461627}, {"y": 1.5949916657429412e-06, "x": 0.6283185307179585}, {"y": 6.060852536879417e-07, "x": 0.6911503837897544}, {"y": 2.2302517651423244e-07, "x": 0.7539822368615502}, {"y": 7.94728780020243e-08, "x": 0.816814089933346}, {"y": 2.7423877754670164e-08, "x": 0.8796459430051419}, {"y": 9.163970082620044e-09, "x": 0.9424777960769377}, {"y": 2.965400358832345e-09, "x": 1.0053096491487337}, {"y": 9.292399731480428e-10, "x": 1.0681415022205296}, {"y": 2.819793507316384e-10, "x": 1.1309733552923256}, {"y": 8.286127373026213e-11, "x": 1.1938052083641215}, {"y": 2.3579294020846345e-11, "x": 1.2566370614359175}, {"y": 6.497632621151039e-12, "x": 1.3194689145077134}, {"y":...