dcos-dygraphs
Version:
dygraphs is a fast, flexible open source JavaScript charting library.
34 lines (30 loc) • 898 B
HTML
<html>
<head>
<title>Layout Options</title>
<!--
For production (minified) code, use:
<script type="text/javascript" src="dygraph-combined.js"></script>
-->
<script type="text/javascript" src="../dist/dygraph.js"></script>
<script type="text/javascript" src="data.js"></script>
</head>
<body>
<h2>Layout Options Update</h2>
<div id="chart" style="width:600px; height:300px;"></div>
<script type="text/javascript">
g = new Dygraph(document.getElementById('chart'), data,
{
strokeWidth: 2
});
function change() {
g.updateOptions({strokeWidth:
parseFloat(document.getElementById("strokeWidth").value)});
}
</script>
<p>Stroke Width:
<input type=text id="strokeWidth" value="2.0" />
<input type=button value="Change Stroke Width" onClick="change()" />
</p>
</body>
</html>