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