From 93a5bb4c827d6665f395c48b216438f95e94d76e Mon Sep 17 00:00:00 2001
From: Dan Vanderkam
Date: Wed, 28 Sep 2016 08:45:57 -0400
Subject: [PATCH] Use CSS for tests, gallery and docs
---
docs/annotations.html | 4 +++-
gallery/border.js | 2 +-
gallery/edge-padding.js | 2 +-
gallery/index.html | 1 +
gallery/range-selector.js | 9 +++++----
gallery/styled-chart-labels.js | 9 +--------
gallery/temperature-sf-ny.js | 3 +--
tests/annotation-native.html | 1 +
tests/annotation.html | 1 +
tests/avoidMinZero.html | 1 +
tests/border.html | 5 ++++-
tests/callback.html | 1 +
tests/century-scale.html | 1 +
tests/charting-combinations.html | 1 +
tests/color-cycle.html | 1 +
tests/color-visibility.html | 1 +
tests/connect-separated.html | 1 +
tests/crosshair.html | 1 +
tests/css-positioning.html | 1 +
tests/custom-bars.html | 1 +
tests/custom-circles.html | 1 +
tests/customLabel.html | 1 +
tests/customLabelCss3.html | 19 +++++++++++--------
tests/dateWindow.html | 1 +
tests/daylight-savings.html | 1 +
tests/demo.html | 1 +
tests/dense-fill.html | 1 +
tests/draw-points.html | 1 +
tests/drawing.html | 1 +
tests/dygraph-many-points-benchmark.html | 1 +
tests/dygraph.html | 1 +
tests/dynamic-update.html | 1 +
tests/exported-symbols.html | 1 +
tests/fillGraph-alpha.html | 1 +
tests/fillGraph.html | 1 +
tests/fractions.html | 1 +
tests/grid_dot.html | 1 +
tests/gviz-infinity.html | 1 +
tests/gviz-selection.html | 1 +
tests/gviz.html | 1 +
tests/hairlines.html | 1 +
tests/highlighted-region.html | 1 +
tests/hourly.html | 1 +
tests/iframe.html | 1 +
tests/independent-series.html | 1 +
tests/interaction.html | 1 +
tests/is-zoomed-ignore-programmatic-zoom.html | 1 +
tests/is-zoomed.html | 1 +
tests/isolated-points.html | 1 +
tests/label-div.html | 1 +
tests/labelsDateUTC.html | 1 +
tests/labelsKMB.html | 1 +
tests/layout-options.html | 1 +
tests/legend-formatter.html | 1 +
tests/legend-values.html | 3 ++-
tests/linear-regression-addseries.html | 1 +
tests/linear-regression-fractions.html | 1 +
tests/linear-regression.html | 1 +
tests/link-interaction.html | 1 +
tests/logscale.html | 1 +
tests/missing-data.html | 1 +
tests/multi-scale.html | 1 +
tests/native-format.html | 1 +
tests/negative.html | 1 +
tests/no-range.html | 1 +
tests/no-visibility.html | 1 +
tests/number-format.html | 1 +
tests/numeric-axis.html | 1 +
tests/numeric-gviz.html | 1 +
tests/out-of-order.html | 1 +
tests/per-series.html | 1 +
tests/perf.html | 1 +
tests/plotter.html | 1 +
tests/plotters.html | 1 +
tests/plugins.html | 1 +
tests/range-selector.html | 22 ++++++++++++++++------
tests/resize.html | 1 +
tests/reverse-y-axis.html | 1 +
tests/series-highlight.html | 1 +
tests/small-range-zero.html | 1 +
tests/smooth-plots.html | 1 +
tests/spacing.html | 1 +
tests/stacked.html | 1 +
tests/steps.html | 1 +
tests/stock.html | 1 +
tests/straw-broom.html | 1 +
tests/styled-chart-labels.html | 13 +++++--------
tests/synchronize.html | 1 +
tests/temperature-sf-ny.html | 6 ++++--
tests/two-axes-vr.html | 1 +
tests/two-axes.html | 1 +
tests/unboxed-spark.html | 1 +
tests/underlay-callback.html | 1 +
tests/value-axis-formatters.html | 1 +
tests/visibility.html | 1 +
tests/x-axis-formatter.html | 1 +
tests/zero-series.html | 1 +
tests/zoom.html | 1 +
98 files changed, 140 insertions(+), 43 deletions(-)
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