div.style.width = this.area.w + 'px';
div.style.height = this.attr_('titleHeight') + 'px';
div.style.textAlign = 'center';
- div.style.fontSize = (this.attr_('titleHeight') - 2) + 'px';
+ div.style.fontSize = (this.attr_('titleHeight') - 8) + 'px';
div.style.fontWeight = 'bold';
var class_div = document.createElement("div");
class_div.className = 'dygraph-label dygraph-title';
font-size: 18px;
text-shadow: gray -2px 2px 2px; /* (offsets are in a rotated frame) */
}
+ .chart {
+ border: 1px dashed black;
+ margin: 5px;
+ padding: 2px;
+ }
</style>
</head>
<body>
<p>In this chart, each chart label is styled independently. View source to
see how it works.</p>
- <div id="div_g" style="width:600px; height:300px;"></div>
+ <div class="chart" id="div_g" style="width:600px; height:300px;"></div>
<p>This version of the chart uses the default styles:</p>
- <div id="div_g2" style="width:600px; height:300px;"></div>
+ <div class="chart" id="div_g2" style="width:600px; height:300px;"></div>
<script type="text/javascript">
g = new Dygraph(
title: 'High and Low Temperatures',
titleHeight: 32,
ylabel: 'Temperature (F)',
- xlabel: 'Date (Pacific Time Zone)',
+ xlabel: 'Date (Ticks indicate the start of the indicated time period)',
labelsDivStyles: {
'text-align': 'right',
'background': 'none'
legend: 'always',
title: 'High and Low Temperatures (30-day average)',
ylabel: 'Temperature (F)',
- xlabel: 'Date (Pacific Time Zone)',
+ xlabel: 'Date (Ticks indicate the start of the indicated time period)',
labelsDivStyles: {
'text-align': 'right',
'background': 'none'