Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
72 lines (64 sloc) 1.91 KB
<!DOCTYPE html>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
<title>log scale</title>
<!--[if IE]>
<script type="text/javascript" src="../excanvas.js"></script>
For production (minified) code, use:
<script type="text/javascript" src="dygraph-combined.js"></script>
<script type="text/javascript" src="../dygraph-dev.js"></script>
<input id='log' type="button" value="log scale" onclick="setLogScale(true)">
<input id='linear' type="button" value="linear scale" onclick="setLogScale(false)">
<h2>X axis of dates</h2>
<div id="div_g0" style="width:600px; height:300px;"></div>
<h2>X axis of numbers</h2>
<div id="div_g1" style="width:600px; height:300px;"></div>
<script type="text/javascript">
function data0() {
return "Date,A\n" +
function data1() {
return "X,A\n" +
var g0 = new Dygraph(document.getElementById("div_g0"),
data0, { logscale : true });
var g1 = new Dygraph(document.getElementById("div_g1"),
data1, { logscale : true });
function setLogScale(val) {
g0.updateOptions({ logscale: val });
g1.updateOptions({ logscale: val });
document.getElementById("linear").disabled = !val;
document.getElementById("log").disabled = val;
Something went wrong with that request. Please try again.