+/*global Gallery,Dygraph,data */
Gallery.register(
'edge-padding',
{
title: 'Graph edge padding and axis position',
setup: function(parent) {
parent.innerHTML = (
+ "<style>.dygraph-legend { width: 100px; }</style>" +
"<p>" +
" <b>Mode:</b>" +
" <input type='radio' name='mode'>use {x,y}RangePad</input>" +
var g = new Dygraph(gdiv, data, {
labels: ['x', 'A', 'B'],
- labelDivWidth: 100,
gridLineColor: '#ccc',
includeZero: true,
width: 250,
avoidMinZero: false,
xRangePad: 3,
yRangePad: 10,
- drawAxesAtZero: true})};
+ drawAxesAtZero: true});
+ };
mode[1].onchange = function() {
updateGraphOpts({
avoidMinZero: true,
xRangePad: 0,
yRangePad: null,
- drawAxesAtZero: false})};
+ drawAxesAtZero: false});
+ };
mode[0].checked = true;
mode[0].onchange();