4 <link rel=
"stylesheet" href=
"../css/dygraph.css">
5 <title>Charting combinations
</title>
6 <script type=
"text/javascript" src=
"../dist/dygraph.js"></script>
7 <script type=
"text/javascript" src=
"data.js"></script>
8 <style type=
"text/css">
25 <p>There are four options which fundmanentally change the behavior of the standard plotter:
</p>
27 <li> errorBars / customBars
33 <p>This page exhaustively checks all combinations of these parameters.
</p>
35 <div id=container
> </div>
36 <div id=results
> <b>Valid combinations
</b>
41 <script type=
"text/javascript">
42 // NOTE: this is an odd thing to do; dygraphs should really throw here.
43 console.warn = function(x) {
47 var bools = [false, true];
48 var containerDiv = document.getElementById(
"container");
49 var resultsList = document.getElementById(
"results-ol");
50 bools.forEach(function(errorBars) {
51 var data_csv = errorBars ? NoisyData() : data();
52 bools.forEach(function(stepPlot) {
53 bools.forEach(function(fillGraph) {
54 bools.forEach(function(strokePattern) {
56 if (errorBars) title_parts.push('errorBars');
57 if (stepPlot) title_parts.push('stepPlot');
58 if (fillGraph) title_parts.push('fillGraph');
59 if (strokePattern) title_parts.push('strokePattern');
60 var title = title_parts.join(', ');
61 if (!title) title = '(none)';
63 var title_h2 = document.createElement('h2');
64 title_h2.innerHTML = title;
65 containerDiv.appendChild(title_h2);
67 var div = document.createElement('div');
68 div.className = 'chart';
69 containerDiv.appendChild(div);
72 var g = new Dygraph(div, data_csv, {
76 strokePattern: strokePattern ? Dygraph.DASHED_LINE : null
79 resultsList.innerHTML += '
<li> ' + title + '
</li>';