From: Dan Vanderkam Date: Wed, 28 Sep 2016 12:45:57 +0000 (-0400) Subject: Use CSS for tests, gallery and docs X-Git-Tag: v2.0.0~19^2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=93a5bb4c827d6665f395c48b216438f95e94d76e;p=dygraphs.git Use CSS for tests, gallery and docs --- diff --git a/docs/annotations.html b/docs/annotations.html index 0a3ba17..9ed49b1 100644 --- a/docs/annotations.html +++ b/docs/annotations.html @@ -6,6 +6,9 @@ .annotation { font-size: 12px !important; } + .dygraph-legend { + width: 300px; + }

dygraphs Annotations

@@ -26,7 +29,6 @@ them.

showRoller: true, customBars: true, labelsKMB: true, - labelsDivWidth: 300 } ); diff --git a/gallery/border.js b/gallery/border.js index b5e4f68..eacaf46 100644 --- a/gallery/border.js +++ b/gallery/border.js @@ -6,12 +6,12 @@ Gallery.register( title: 'Graph stays within the border', setup: function(parent) { parent.innerHTML = + "" + "
"; }, run: function() { new Dygraph(document.getElementById('bordered'), data, { - labelsDivStyles: { border: '1px solid black' }, title: 'Chart Title', xlabel: 'Date', ylabel: 'Temperature (F)' diff --git a/gallery/edge-padding.js b/gallery/edge-padding.js index be79054..5956d4a 100644 --- a/gallery/edge-padding.js +++ b/gallery/edge-padding.js @@ -6,6 +6,7 @@ Gallery.register( title: 'Graph edge padding and axis position', setup: function(parent) { parent.innerHTML = ( + "" + "

" + " Mode:" + " use {x,y}RangePad" + @@ -39,7 +40,6 @@ Gallery.register( var g = new Dygraph(gdiv, data, { labels: ['x', 'A', 'B'], - labelsDivWidth: 100, gridLineColor: '#ccc', includeZero: true, width: 250, diff --git a/gallery/index.html b/gallery/index.html index c953deb..a749cf0 100644 --- a/gallery/index.html +++ b/gallery/index.html @@ -2,6 +2,7 @@ Dygraphs Gallery + diff --git a/gallery/range-selector.js b/gallery/range-selector.js index 09bfd49..e243b43 100644 --- a/gallery/range-selector.js +++ b/gallery/range-selector.js @@ -7,6 +7,11 @@ Gallery.register( title: 'Demo of the Range Selector', setup: function(parent) { parent.innerHTML = [ + "", "

No roll period.

", "
", "", @@ -27,7 +32,6 @@ Gallery.register( title: 'Daily Temperatures in New York vs. San Francisco', ylabel: 'Temperature (F)', legend: 'always', - labelsDivStyles: { 'textAlign': 'right' }, showRangeSelector: true } ); @@ -41,7 +45,6 @@ Gallery.register( title: 'Daily Temperatures in New York vs. San Francisco', ylabel: 'Temperature (F)', legend: 'always', - labelsDivStyles: { 'textAlign': 'right' }, showRangeSelector: true, rangeSelectorHeight: 30, rangeSelectorPlotStrokeColor: 'yellow', @@ -58,11 +61,9 @@ Gallery.register( title: 'Nightly Temperatures in New York vs. San Francisco', ylabel: 'Temperature (F)', legend: 'always', - labelsDivStyles: { 'textAlign': 'right', 'backgroundColor': '#101015' }, showRangeSelector: true, rangeSelectorPlotFillColor: 'MediumSlateBlue', rangeSelectorPlotFillGradientColor: 'rgba(123, 104, 238, 0)', - axisLabelColor: 'white', colorValue: 0.9, fillAlpha: 0.4 } diff --git a/gallery/styled-chart-labels.js b/gallery/styled-chart-labels.js index 0268f6d..6f8c3b4 100644 --- a/gallery/styled-chart-labels.js +++ b/gallery/styled-chart-labels.js @@ -6,6 +6,7 @@ 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:

", @@ -21,10 +22,6 @@ 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 } ); @@ -37,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 } ); diff --git a/gallery/temperature-sf-ny.js b/gallery/temperature-sf-ny.js index f2c9ad1..7e41310 100644 --- a/gallery/temperature-sf-ny.js +++ b/gallery/temperature-sf-ny.js @@ -8,6 +8,7 @@ Gallery.register( title: 'Demo of a graph with many data points and custom error bars.', setup: function(parent) { parent.innerHTML = [ + "", "

Roll period of 14 timesteps.

", "
", "

No roll period.

", @@ -23,7 +24,6 @@ Gallery.register( title: 'Daily Temperatures in New York vs. San Francisco', ylabel: 'Temperature (F)', legend: 'always', - labelsDivStyles: { 'textAlign': 'right' } } ); new Dygraph( @@ -36,7 +36,6 @@ Gallery.register( title: 'Daily Temperatures in New York vs. San Francisco', ylabel: 'Temperature (F)', legend: 'always', - labelsDivStyles: { 'textAlign': 'right' } } ); } diff --git a/tests/annotation-native.html b/tests/annotation-native.html index a003497..4e4538d 100644 --- a/tests/annotation-native.html +++ b/tests/annotation-native.html @@ -1,6 +1,7 @@ + Native format annotations diff --git a/tests/annotation.html b/tests/annotation.html index 6d477e2..4cdcb10 100644 --- a/tests/annotation.html +++ b/tests/annotation.html @@ -1,6 +1,7 @@ + demo