From: Dan Vanderkam Date: Sat, 29 Nov 2014 17:27:32 +0000 (-0500) Subject: Merge pull request #501 from danvk/options-link X-Git-Tag: v1.1.0~4 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=d1cbfdede73dd1cac2c0beb70f0a0f9bc7c0a322;hp=4731ec3a0b60f81e8ef26fc95a69b9751069686b;p=dygraphs.git Merge pull request #501 from danvk/options-link Documentation tweaks --- diff --git a/docs/ie.html b/docs/ie.html index 9b0579f..0b1233b 100644 --- a/docs/ie.html +++ b/docs/ie.html @@ -10,6 +10,8 @@

When IE9 is in HTML5 mode, dygraphs works just like in other modern browsers.

+

You should seriously consider stopping here! Older versions of IE have a small market share that's decreasing by the day. Major web sites, like the New York Times, have already dropped support for IE8. Future versions of dygraphs will do the same. But if you insist…

+

If you want to support previous versions of Internet Explorer (IE6–IE8), you'll need to include the excanvas library, which emulates the <canvas> tag using VML. You can add excanvas by including the following snippet:

diff --git a/docs/per-axis.html b/docs/per-axis.html
index df59a3d..09c6ebc 100644
--- a/docs/per-axis.html
+++ b/docs/per-axis.html
@@ -39,11 +39,13 @@ write:

..., { strokeWidth: 5, // default stroke width - 'Y1': { - strokeWidth: 3 // Y1 gets a special value. - }, - 'Y3': { - strokeWidth: 1 // so does Y3. + series: { + Y1: { + strokeWidth: 3 // Y1 gets a special value. + }, + Y3: { + strokeWidth: 1 // so does Y3. + } } });
diff --git a/docs/site.css b/docs/site.css index 3c81eba..58232d7 100644 --- a/docs/site.css +++ b/docs/site.css @@ -131,17 +131,24 @@ pre{ /* When you visit dygraphs.com/options.html#errorBars, the fixed top nav * obscures the top 100px of content for that anchor. This is a workaround. - * See http://stackoverflow.com/questions/9047703/fixed-position-navbar-obscures-anchors + * See http://stackoverflow.com/questions/10732690/offsetting-an-html-anchor-to-adjust-for-fixed-header */ a[name] { - padding-top: 100px; /* matches body { padding-top } */ - margin-top: -100px; /* matches body { padding-top } */ - display: inline-block; /* required for webkit browsers */ + display: block; + position: relative; + top: -100px; + visibility: hidden; } @media screen and (min-width: 768px) and (max-width: 992px) { a[name] { - padding-top: 130px; /* matches body { padding-top } */ - margin-top: -130px; /* matches body { padding-top } */ - display: inline-block; /* required for webkit browsers */ + top: -130px; } } +a.link { + visibility: hidden; + text-decoration: none; + color: #777; +} +.option:hover a.link { + visibility: visible; +} diff --git a/docs/tutorial.html b/docs/tutorial.html index c4e4dc5..a8f84f0 100644 --- a/docs/tutorial.html +++ b/docs/tutorial.html @@ -6,7 +6,7 @@ } -

To use dygraphs, include the dygraph-combined.js JavaScript file and instantiate a Dygraph object.

+

To use dygraphs, include the dygraph-combined-dev.js JavaScript file and instantiate a Dygraph object.

Here's a basic example to get things started:

@@ -17,7 +17,7 @@ <html> <head> <script type="text/javascript" - src="dygraph-combined.js"></script> + src="dygraph-combined-dev.js"></script> </head> <body> <div id="graphdiv"></div> @@ -69,7 +69,7 @@ <html> <head> <script type="text/javascript" - src="dygraph-combined.js"></script> + src="dygraph-combined-dev.js"></script> </head> <body> <div id="graphdiv2" @@ -120,7 +120,7 @@ <html> <head> <script type="text/javascript" - src="dygraph-combined.js"></script> + src="dygraph-combined-dev.js"></script> </head> <body> <div id="graphdiv3" diff --git a/gallery/index.html b/gallery/index.html index 9e661d4..9cf4791 100644 --- a/gallery/index.html +++ b/gallery/index.html @@ -8,6 +8,8 @@ + + diff --git a/gallery/synchronize.js b/gallery/synchronize.js index ae92efb..233da0c 100644 --- a/gallery/synchronize.js +++ b/gallery/synchronize.js @@ -8,14 +8,30 @@ Gallery.register( title: 'Multiple graphs in sync', setup: function(parent) { parent.innerHTML = [ - "

Zooming and panning on any of the charts will zoom and pan all the", - "others.

", - "

", - "", - "", - "", - "", - "
"].join("\n"); + '', + '

Zooming and panning on any of the charts will zoom and pan all the', + 'others. Selecting points on one will select points on the others.

', + '

To use this, source extras/synchronizer.js on your page.', + 'See the comments in that file for usage.

', + '
', + '
', + '
', + '
', + '
', + '
', + '

', + ' Synchronize what?', + ' ', + ' ', + '

' + ].join("\n"); }, run: function() { var gs = []; @@ -27,23 +43,21 @@ Gallery.register( NoisyData, { rollPeriod: 7, errorBars: true, - drawCallback: function(me, initial) { - if (blockRedraw || initial) return; - blockRedraw = true; - var range = me.xAxisRange(); - var yrange = me.yAxisRange(); - for (var j = 0; j < 4; j++) { - if (gs[j] == me) continue; - gs[j].updateOptions( { - dateWindow: range, - valueRange: yrange - } ); - } - blockRedraw = false; - } } ) ); } + var sync = Dygraph.synchronize(gs); + + function update() { + var zoom = document.getElementById('chk-zoom').checked; + var selection = document.getElementById('chk-selection').checked; + sync.detach(); + sync = Dygraph.synchronize(gs, { + zoom: zoom, + selection: selection + }); + } + $('#chk-zoom, #chk-selection').change(update); } }); diff --git a/generate-documentation.py b/generate-documentation.py index d73fcc4..0d6760e 100755 --- a/generate-documentation.py +++ b/generate-documentation.py @@ -150,7 +150,7 @@ def urlify_gallery(f): for label in sorted(labels): - print '

%s

\n' % (label, label) + print '

%s

\n' % (label, label) for opt_name in sorted(docs.keys()): opt = docs[opt_name] @@ -181,7 +181,9 @@ for label in sorted(labels): if not opt['description']: opt['description'] = '(missing)' print """ -
%(name)s
+
%(name)s + # +

%(desc)s

Type: %(type)s
%(parameters)s Default: %(default)s

diff --git a/tests/synchronize.html b/tests/synchronize.html index b93a219..92a4e4a 100644 --- a/tests/synchronize.html +++ b/tests/synchronize.html @@ -14,7 +14,7 @@ -