X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=gallery%2Fstyled-chart-labels.js;h=6f8c3b46a8c4b5e7e5f7f533a7c380f63886caf1;hb=9154f07d785b038e8af866da745a67f5ba531771;hp=1248855a9a9f92cda5e106e1ef8c99db10732332;hpb=605b6119bcc80db4ea100d66df3483425dcd32af;p=dygraphs.git diff --git a/gallery/styled-chart-labels.js b/gallery/styled-chart-labels.js index 1248855..6f8c3b4 100644 --- a/gallery/styled-chart-labels.js +++ b/gallery/styled-chart-labels.js @@ -1,3 +1,4 @@ +/*global Gallery,Dygraph,data */ Gallery.register( 'styled-chart-labels', { @@ -5,13 +6,14 @@ Gallery.register( title: 'Each chart label is styled independently with CSS', setup: function(parent) { parent.innerHTML = [ + "", "

This chart's labels are styled

", "
", "

This version of the chart uses the default styles:

", "
"].join("\n"); }, run: function() { - g = new Dygraph( + new Dygraph( document.getElementById("div_g"), data, { rollPeriod: 7, @@ -20,15 +22,11 @@ Gallery.register( titleHeight: 32, ylabel: 'Temperature (F)', xlabel: 'Date (Ticks indicate the start of the indicated time period)', - labelsDivStyles: { - 'text-align': 'right', - 'background': 'none' - }, strokeWidth: 1.5 } ); - g2 = new Dygraph( + new Dygraph( document.getElementById("div_g2"), data, { rollPeriod: 30, @@ -36,10 +34,6 @@ Gallery.register( title: 'High and Low Temperatures (30-day average)', ylabel: 'Temperature (F)', xlabel: 'Date (Ticks indicate the start of the indicated time period)', - labelsDivStyles: { - 'text-align': 'right', - 'background': 'none' - }, strokeWidth: 1.5 } );