+++ /dev/null
-<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
- .KEYW {color: #933;}
- .COMM {color: #bbb; font-style: italic;}
- .NUMB {color: #393;}
- .STRN {color: #393;}
- .REGX {color: #339;}
- .line {border-right: 1px dotted #666; color: #666; font-style: normal;}
- </style></head><body><pre><span class='line'> 1</span> <span class="COMM">// Copyright 2006 Dan Vanderkam (danvdk@gmail.com)</span><span class="WHIT">
-<span class='line'> 2</span> </span><span class="COMM">// All Rights Reserved.</span><span class="WHIT">
-<span class='line'> 3</span>
-<span class='line'> 4</span> </span><span class="COMM">/**
-<span class='line'> 5</span> * @fileoverview Creates an interactive, zoomable graph based on a CSV file or
-<span class='line'> 6</span> * string. Dygraph can handle multiple series with or without error bars. The
-<span class='line'> 7</span> * date/value ranges will be automatically set. Dygraph uses the
-<span class='line'> 8</span> * <canvas> tag, so it only works in FF1.5+.
-<span class='line'> 9</span> * @author danvdk@gmail.com (Dan Vanderkam)
-<span class='line'> 10</span>
-<span class='line'> 11</span> Usage:
-<span class='line'> 12</span> <div id="graphdiv" style="width:800px; height:500px;"></div>
-<span class='line'> 13</span> <script type="text/javascript">
-<span class='line'> 14</span> new Dygraph(document.getElementById("graphdiv"),
-<span class='line'> 15</span> "datafile.csv", // CSV file with headers
-<span class='line'> 16</span> { }); // options
-<span class='line'> 17</span> </script>
-<span class='line'> 18</span>
-<span class='line'> 19</span> The CSV file is of the form
-<span class='line'> 20</span>
-<span class='line'> 21</span> Date,SeriesA,SeriesB,SeriesC
-<span class='line'> 22</span> YYYYMMDD,A1,B1,C1
-<span class='line'> 23</span> YYYYMMDD,A2,B2,C2
-<span class='line'> 24</span>
-<span class='line'> 25</span> If the 'errorBars' option is set in the constructor, the input should be of
-<span class='line'> 26</span> the form
-<span class='line'> 27</span> Date,SeriesA,SeriesB,...
-<span class='line'> 28</span> YYYYMMDD,A1,sigmaA1,B1,sigmaB1,...
-<span class='line'> 29</span> YYYYMMDD,A2,sigmaA2,B2,sigmaB2,...
-<span class='line'> 30</span>
-<span class='line'> 31</span> If the 'fractions' option is set, the input should be of the form:
-<span class='line'> 32</span>
-<span class='line'> 33</span> Date,SeriesA,SeriesB,...
-<span class='line'> 34</span> YYYYMMDD,A1/B1,A2/B2,...
-<span class='line'> 35</span> YYYYMMDD,A1/B1,A2/B2,...
-<span class='line'> 36</span>
-<span class='line'> 37</span> And error bars will be calculated automatically using a binomial distribution.
-<span class='line'> 38</span>
-<span class='line'> 39</span> For further documentation and examples, see http://dygraphs.com/
-<span class='line'> 40</span>
-<span class='line'> 41</span> */</span><span class="WHIT">
-<span class='line'> 42</span>
-<span class='line'> 43</span> </span><span class="COMM">/**
-<span class='line'> 44</span> * Creates an interactive, zoomable chart.
-<span class='line'> 45</span> *
-<span class='line'> 46</span> * @constructor
-<span class='line'> 47</span> * @param {div | String} div A div or the id of a div into which to construct
-<span class='line'> 48</span> * the chart.
-<span class='line'> 49</span> * @param {String | Function} file A file containing CSV data or a function
-<span class='line'> 50</span> * that returns this data. The most basic expected format for each line is
-<span class='line'> 51</span> * "YYYY/MM/DD,val1,val2,...". For more information, see
-<span class='line'> 52</span> * http://dygraphs.com/data.html.
-<span class='line'> 53</span> * @param {Object} attrs Various other attributes, e.g. errorBars determines
-<span class='line'> 54</span> * whether the input data contains error ranges. For a complete list of
-<span class='line'> 55</span> * options, see http://dygraphs.com/options.html.
-<span class='line'> 56</span> */</span><span class="WHIT">
-<span class='line'> 57</span> </span><span class="NAME">Dygraph</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">div</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">opts</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'> 58</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">arguments.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'> 59</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">arguments.length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">4</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'> 60</span> </span><span class="WHIT"> </span><span class="COMM">// Old versions of dygraphs took in the series labels as a constructor</span><span class="WHIT">
-<span class='line'> 61</span> </span><span class="WHIT"> </span><span class="COMM">// parameter. This doesn't make sense anymore, but it's easy to continue</span><span class="WHIT">
-<span class='line'> 62</span> </span><span class="WHIT"> </span><span class="COMM">// to support this usage.</span><span class="WHIT">
-<span class='line'> 63</span> </span><span class="WHIT"> </span><span class="NAME">this.warn</span><span class="PUNC">(</span><span class="STRN">"Using deprecated four-argument dygraph constructor"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 64</span> </span><span class="WHIT"> </span><span class="NAME">this.__old_init__</span><span class="PUNC">(</span><span class="NAME">div</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NUMB">3</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 65</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'> 66</span> </span><span class="WHIT"> </span><span class="NAME">this.__init__</span><span class="PUNC">(</span><span class="NAME">div</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">opts</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 67</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'> 68</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'> 69</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 70</span>
-<span class='line'> 71</span> </span><span class="NAME">Dygraph.NAME</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"Dygraph"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 72</span> </span><span class="NAME">Dygraph.VERSION</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"1.2"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 73</span> </span><span class="NAME">Dygraph.__repr__</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'> 74</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"["</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.NAME</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.VERSION</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"]"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 75</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 76</span>
-<span class='line'> 77</span> </span><span class="COMM">/**
-<span class='line'> 78</span> * Returns information about the Dygraph class.
-<span class='line'> 79</span> */</span><span class="WHIT">
-<span class='line'> 80</span> </span><span class="NAME">Dygraph.toString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'> 81</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.__repr__</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 82</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 83</span>
-<span class='line'> 84</span> </span><span class="COMM">// Various default values</span><span class="WHIT">
-<span class='line'> 85</span> </span><span class="NAME">Dygraph.DEFAULT_ROLL_PERIOD</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 86</span> </span><span class="NAME">Dygraph.DEFAULT_WIDTH</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">480</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 87</span> </span><span class="NAME">Dygraph.DEFAULT_HEIGHT</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">320</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 88</span> </span><span class="NAME">Dygraph.AXIS_LINE_WIDTH</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0.3</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 89</span>
-<span class='line'> 90</span> </span><span class="NAME">Dygraph.LOG_SCALE</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 91</span> </span><span class="NAME">Dygraph.LN_TEN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.log</span><span class="PUNC">(</span><span class="NAME">Dygraph.LOG_SCALE</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 92</span> </span><span class="COMM">/**
-<span class='line'> 93</span> * @private
-<span class='line'> 94</span> */</span><span class="WHIT">
-<span class='line'> 95</span> </span><span class="NAME">Dygraph.log10</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'> 96</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Math.log</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">Dygraph.LN_TEN</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'> 97</span> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'> 98</span>
-<span class='line'> 99</span> </span><span class="COMM">// Default attribute values.</span><span class="WHIT">
-<span class='line'>100</span> </span><span class="NAME">Dygraph.DEFAULT_ATTRS</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>101</span> </span><span class="WHIT"> </span><span class="NAME">highlightCircleSize</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>102</span> </span><span class="WHIT"> </span><span class="NAME">pixelsPerXLabel</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">60</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>103</span> </span><span class="WHIT"> </span><span class="NAME">pixelsPerYLabel</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">30</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>104</span>
-<span class='line'>105</span> </span><span class="WHIT"> </span><span class="NAME">labelsDivWidth</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">250</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>106</span> </span><span class="WHIT"> </span><span class="NAME">labelsDivStyles</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>107</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): move defaults from createStatusMessage_ here.</span><span class="WHIT">
-<span class='line'>108</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>109</span> </span><span class="WHIT"> </span><span class="NAME">labelsSeparateLines</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>110</span> </span><span class="WHIT"> </span><span class="NAME">labelsShowZeroValues</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>111</span> </span><span class="WHIT"> </span><span class="NAME">labelsKMB</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>112</span> </span><span class="WHIT"> </span><span class="NAME">labelsKMG2</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>113</span> </span><span class="WHIT"> </span><span class="NAME">showLabelsOnHighlight</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>114</span>
-<span class='line'>115</span> </span><span class="WHIT"> </span><span class="NAME">yValueFormatter</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">b</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Dygraph.numberFormatter</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>116</span> </span><span class="WHIT"> </span><span class="NAME">digitsAfterDecimal</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>117</span> </span><span class="WHIT"> </span><span class="NAME">maxNumberWidth</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">6</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>118</span> </span><span class="WHIT"> </span><span class="NAME">sigFigs</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>119</span>
-<span class='line'>120</span> </span><span class="WHIT"> </span><span class="NAME">strokeWidth</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">1.0</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>121</span>
-<span class='line'>122</span> </span><span class="WHIT"> </span><span class="NAME">axisTickSize</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>123</span> </span><span class="WHIT"> </span><span class="NAME">axisLabelFontSize</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">14</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>124</span> </span><span class="WHIT"> </span><span class="NAME">xAxisLabelWidth</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">50</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>125</span> </span><span class="WHIT"> </span><span class="NAME">yAxisLabelWidth</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">50</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>126</span> </span><span class="WHIT"> </span><span class="NAME">xAxisLabelFormatter</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateAxisFormatter</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>127</span> </span><span class="WHIT"> </span><span class="NAME">rightGap</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">5</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>128</span>
-<span class='line'>129</span> </span><span class="WHIT"> </span><span class="NAME">showRoller</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>130</span> </span><span class="WHIT"> </span><span class="NAME">xValueFormatter</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateString_</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>131</span> </span><span class="WHIT"> </span><span class="NAME">xValueParser</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateParser</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>132</span> </span><span class="WHIT"> </span><span class="NAME">xTicker</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateTicker</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>133</span>
-<span class='line'>134</span> </span><span class="WHIT"> </span><span class="NAME">delimiter</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">','</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>135</span>
-<span class='line'>136</span> </span><span class="WHIT"> </span><span class="NAME">sigma</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">2.0</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>137</span> </span><span class="WHIT"> </span><span class="NAME">errorBars</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>138</span> </span><span class="WHIT"> </span><span class="NAME">fractions</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>139</span> </span><span class="WHIT"> </span><span class="NAME">wilsonInterval</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// only relevant if fractions is true</span><span class="WHIT">
-<span class='line'>140</span> </span><span class="WHIT"> </span><span class="NAME">customBars</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>141</span> </span><span class="WHIT"> </span><span class="NAME">fillGraph</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>142</span> </span><span class="WHIT"> </span><span class="NAME">fillAlpha</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0.15</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>143</span> </span><span class="WHIT"> </span><span class="NAME">connectSeparatedPoints</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>144</span>
-<span class='line'>145</span> </span><span class="WHIT"> </span><span class="NAME">stackedGraph</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>146</span> </span><span class="WHIT"> </span><span class="NAME">hideOverlayOnMouseOut</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>147</span>
-<span class='line'>148</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): support 'onmouseover' and 'never', and remove synonyms.</span><span class="WHIT">
-<span class='line'>149</span> </span><span class="WHIT"> </span><span class="NAME">legend</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'onmouseover'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// the only relevant value at the moment is 'always'.</span><span class="WHIT">
-<span class='line'>150</span>
-<span class='line'>151</span> </span><span class="WHIT"> </span><span class="NAME">stepPlot</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>152</span> </span><span class="WHIT"> </span><span class="NAME">avoidMinZero</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>153</span>
-<span class='line'>154</span> </span><span class="WHIT"> </span><span class="COMM">// Sizes of the various chart labels.</span><span class="WHIT">
-<span class='line'>155</span> </span><span class="WHIT"> </span><span class="NAME">titleHeight</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">28</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>156</span> </span><span class="WHIT"> </span><span class="NAME">xLabelHeight</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">18</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>157</span> </span><span class="WHIT"> </span><span class="NAME">yLabelWidth</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">18</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>158</span>
-<span class='line'>159</span> </span><span class="WHIT"> </span><span class="NAME">interactionModel</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="COMM">// will be set to Dygraph.defaultInteractionModel.</span><span class="WHIT">
-<span class='line'>160</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>161</span>
-<span class='line'>162</span> </span><span class="COMM">// Various logging levels.</span><span class="WHIT">
-<span class='line'>163</span> </span><span class="NAME">Dygraph.DEBUG</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>164</span> </span><span class="NAME">Dygraph.INFO</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>165</span> </span><span class="NAME">Dygraph.WARNING</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>166</span> </span><span class="NAME">Dygraph.ERROR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>167</span>
-<span class='line'>168</span> </span><span class="COMM">// Directions for panning and zooming. Use bit operations when combined</span><span class="WHIT">
-<span class='line'>169</span> </span><span class="COMM">// values are possible.</span><span class="WHIT">
-<span class='line'>170</span> </span><span class="NAME">Dygraph.HORIZONTAL</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>171</span> </span><span class="NAME">Dygraph.VERTICAL</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>172</span>
-<span class='line'>173</span> </span><span class="COMM">// Used for initializing annotation CSS rules only once.</span><span class="WHIT">
-<span class='line'>174</span> </span><span class="NAME">Dygraph.addedAnnotationCSS</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>175</span>
-<span class='line'>176</span> </span><span class="COMM">/**
-<span class='line'>177</span> * @private
-<span class='line'>178</span> * Return the 2d context for a dygraph canvas.
-<span class='line'>179</span> *
-<span class='line'>180</span> * This method is only exposed for the sake of replacing the function in
-<span class='line'>181</span> * automated tests, e.g.
-<span class='line'>182</span> *
-<span class='line'>183</span> * var oldFunc = Dygraph.getContext();
-<span class='line'>184</span> * Dygraph.getContext = function(canvas) {
-<span class='line'>185</span> * var realContext = oldFunc(canvas);
-<span class='line'>186</span> * return new Proxy(realContext);
-<span class='line'>187</span> * };
-<span class='line'>188</span> */</span><span class="WHIT">
-<span class='line'>189</span> </span><span class="NAME">Dygraph.getContext</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">canvas</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>190</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">canvas.getContext</span><span class="PUNC">(</span><span class="STRN">"2d"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>191</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>192</span>
-<span class='line'>193</span> </span><span class="NAME">Dygraph.prototype.__old_init__</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">div</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">file</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">labels</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>194</span> </span><span class="WHIT"> </span><span class="COMM">// Labels is no longer a constructor parameter, since it's typically set</span><span class="WHIT">
-<span class='line'>195</span> </span><span class="WHIT"> </span><span class="COMM">// directly from the data source. It also conains a name for the x-axis,</span><span class="WHIT">
-<span class='line'>196</span> </span><span class="WHIT"> </span><span class="COMM">// which the previous constructor form did not.</span><span class="WHIT">
-<span class='line'>197</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">labels</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>198</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">new_labels</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Date"</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>199</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">labels.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">new_labels.push</span><span class="PUNC">(</span><span class="NAME">labels</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>200</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">attrs</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="STRN">'labels'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">new_labels</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>201</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>202</span> </span><span class="WHIT"> </span><span class="NAME">this.__init__</span><span class="PUNC">(</span><span class="NAME">div</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">file</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>203</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>204</span>
-<span class='line'>205</span> </span><span class="COMM">/**
-<span class='line'>206</span> * Initializes the Dygraph. This creates a new DIV and constructs the PlotKit
-<span class='line'>207</span> * and context <canvas> inside of it. See the constructor for details.
-<span class='line'>208</span> * on the parameters.
-<span class='line'>209</span> * @param {Element} div the Element to render the graph into.
-<span class='line'>210</span> * @param {String | Function} file Source data
-<span class='line'>211</span> * @param {Object} attrs Miscellaneous other options
-<span class='line'>212</span> * @private
-<span class='line'>213</span> */</span><span class="WHIT">
-<span class='line'>214</span> </span><span class="NAME">Dygraph.prototype.__init__</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">div</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">file</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>215</span> </span><span class="WHIT"> </span><span class="COMM">// Hack for IE: if we're using excanvas and the document hasn't finished</span><span class="WHIT">
-<span class='line'>216</span> </span><span class="WHIT"> </span><span class="COMM">// loading yet (and hence may not have initialized whatever it needs to</span><span class="WHIT">
-<span class='line'>217</span> </span><span class="WHIT"> </span><span class="COMM">// initialize), then keep calling this routine periodically until it has.</span><span class="WHIT">
-<span class='line'>218</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="REGX">/MSIE/</span><span class="PUNC">.</span><span class="NAME">test</span><span class="PUNC">(</span><span class="NAME">navigator.userAgent</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">window.opera</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
-<span class='line'>219</span> </span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">G_vmlCanvasManager</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
-<span class='line'>220</span> </span><span class="WHIT"> </span><span class="NAME">document.readyState</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'complete'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>221</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>222</span> </span><span class="WHIT"> </span><span class="NAME">setTimeout</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">self.__init__</span><span class="PUNC">(</span><span class="NAME">div</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">file</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">100</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>223</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>224</span>
-<span class='line'>225</span> </span><span class="WHIT"> </span><span class="COMM">// Support two-argument constructor</span><span class="WHIT">
-<span class='line'>226</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">attrs</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>227</span>
-<span class='line'>228</span> </span><span class="WHIT"> </span><span class="COMM">// Copy the important bits into the object</span><span class="WHIT">
-<span class='line'>229</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): most of these should just stay in the attrs_ dictionary.</span><span class="WHIT">
-<span class='line'>230</span> </span><span class="WHIT"> </span><span class="NAME">this.maindiv_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">div</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>231</span> </span><span class="WHIT"> </span><span class="NAME">this.file_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">file</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>232</span> </span><span class="WHIT"> </span><span class="NAME">this.rollPeriod_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">attrs.rollPeriod</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">Dygraph.DEFAULT_ROLL_PERIOD</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>233</span> </span><span class="WHIT"> </span><span class="NAME">this.previousVerticalX_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>234</span> </span><span class="WHIT"> </span><span class="NAME">this.fractions_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">attrs.fractions</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>235</span> </span><span class="WHIT"> </span><span class="NAME">this.dateWindow_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">attrs.dateWindow</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>236</span>
-<span class='line'>237</span> </span><span class="WHIT"> </span><span class="NAME">this.wilsonInterval_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">attrs.wilsonInterval</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>238</span> </span><span class="WHIT"> </span><span class="NAME">this.is_initial_draw_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>239</span> </span><span class="WHIT"> </span><span class="NAME">this.annotations_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>240</span>
-<span class='line'>241</span> </span><span class="WHIT"> </span><span class="COMM">// Zoomed indicators - These indicate when the graph has been zoomed and on what axis.</span><span class="WHIT">
-<span class='line'>242</span> </span><span class="WHIT"> </span><span class="NAME">this.zoomed_x_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>243</span> </span><span class="WHIT"> </span><span class="NAME">this.zoomed_y_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>244</span>
-<span class='line'>245</span> </span><span class="WHIT"> </span><span class="COMM">// Clear the div. This ensure that, if multiple dygraphs are passed the same</span><span class="WHIT">
-<span class='line'>246</span> </span><span class="WHIT"> </span><span class="COMM">// div, then only one will be drawn.</span><span class="WHIT">
-<span class='line'>247</span> </span><span class="WHIT"> </span><span class="NAME">div.innerHTML</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>248</span>
-<span class='line'>249</span> </span><span class="WHIT"> </span><span class="COMM">// If the div isn't already sized then inherit from our attrs or</span><span class="WHIT">
-<span class='line'>250</span> </span><span class="WHIT"> </span><span class="COMM">// give it a default size.</span><span class="WHIT">
-<span class='line'>251</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">div.style.width</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>252</span> </span><span class="WHIT"> </span><span class="NAME">div.style.width</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">attrs.width</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">Dygraph.DEFAULT_WIDTH</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>253</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>254</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">div.style.height</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>255</span> </span><span class="WHIT"> </span><span class="NAME">div.style.height</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">attrs.height</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">Dygraph.DEFAULT_HEIGHT</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>256</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>257</span> </span><span class="WHIT"> </span><span class="NAME">this.width_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="NAME">div.style.width</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>258</span> </span><span class="WHIT"> </span><span class="NAME">this.height_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="NAME">div.style.height</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>259</span> </span><span class="WHIT"> </span><span class="COMM">// The div might have been specified as percent of the current window size,</span><span class="WHIT">
-<span class='line'>260</span> </span><span class="WHIT"> </span><span class="COMM">// convert that to an appropriate number of pixels.</span><span class="WHIT">
-<span class='line'>261</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">div.style.width.indexOf</span><span class="PUNC">(</span><span class="STRN">"%"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">div.style.width.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>262</span> </span><span class="WHIT"> </span><span class="NAME">this.width_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">div.offsetWidth</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>263</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>264</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">div.style.height.indexOf</span><span class="PUNC">(</span><span class="STRN">"%"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">div.style.height.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>265</span> </span><span class="WHIT"> </span><span class="NAME">this.height_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">div.offsetHeight</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>266</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>267</span>
-<span class='line'>268</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.width_</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>269</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">"dygraph has zero width. Please specify a width in pixels."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>270</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>271</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.height_</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>272</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">"dygraph has zero height. Please specify a height in pixels."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>273</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>274</span>
-<span class='line'>275</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): set fillGraph to be part of attrs_ here, not user_attrs_.</span><span class="WHIT">
-<span class='line'>276</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">attrs</span><span class="PUNC">[</span><span class="STRN">'stackedGraph'</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>277</span> </span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">[</span><span class="STRN">'fillGraph'</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>278</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(nikhilk): Add any other stackedGraph checks here.</span><span class="WHIT">
-<span class='line'>279</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>280</span>
-<span class='line'>281</span> </span><span class="WHIT"> </span><span class="COMM">// Dygraphs has many options, some of which interact with one another.</span><span class="WHIT">
-<span class='line'>282</span> </span><span class="WHIT"> </span><span class="COMM">// To keep track of everything, we maintain two sets of options:</span><span class="WHIT">
-<span class='line'>283</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
-<span class='line'>284</span> </span><span class="WHIT"> </span><span class="COMM">// this.user_attrs_ only options explicitly set by the user.</span><span class="WHIT">
-<span class='line'>285</span> </span><span class="WHIT"> </span><span class="COMM">// this.attrs_ defaults, options derived from user_attrs_, data.</span><span class="WHIT">
-<span class='line'>286</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
-<span class='line'>287</span> </span><span class="WHIT"> </span><span class="COMM">// Options are then accessed this.attr_('attr'), which first looks at</span><span class="WHIT">
-<span class='line'>288</span> </span><span class="WHIT"> </span><span class="COMM">// user_attrs_ and then computed attrs_. This way Dygraphs can set intelligent</span><span class="WHIT">
-<span class='line'>289</span> </span><span class="WHIT"> </span><span class="COMM">// defaults without overriding behavior that the user specifically asks for.</span><span class="WHIT">
-<span class='line'>290</span> </span><span class="WHIT"> </span><span class="NAME">this.user_attrs_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>291</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">this.user_attrs_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>292</span>
-<span class='line'>293</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>294</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">this.attrs_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Dygraph.DEFAULT_ATTRS</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>295</span>
-<span class='line'>296</span> </span><span class="WHIT"> </span><span class="NAME">this.boundaryIds_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>297</span>
-<span class='line'>298</span> </span><span class="WHIT"> </span><span class="COMM">// Make a note of whether labels will be pulled from the CSV file.</span><span class="WHIT">
-<span class='line'>299</span> </span><span class="WHIT"> </span><span class="NAME">this.labelsFromCSV_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"labels"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>300</span>
-<span class='line'>301</span> </span><span class="WHIT"> </span><span class="COMM">// Create the containing DIV and other interactive elements</span><span class="WHIT">
-<span class='line'>302</span> </span><span class="WHIT"> </span><span class="NAME">this.createInterface_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>303</span>
-<span class='line'>304</span> </span><span class="WHIT"> </span><span class="NAME">this.start_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>305</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>306</span>
-<span class='line'>307</span> </span><span class="COMM">/**
-<span class='line'>308</span> * Returns the zoomed status of the chart for one or both axes.
-<span class='line'>309</span> *
-<span class='line'>310</span> * Axis is an optional parameter. Can be set to 'x' or 'y'.
-<span class='line'>311</span> *
-<span class='line'>312</span> * The zoomed status for an axis is set whenever a user zooms using the mouse
-<span class='line'>313</span> * or when the dateWindow or valueRange are updated (unless the isZoomedIgnoreProgrammaticZoom
-<span class='line'>314</span> * option is also specified).
-<span class='line'>315</span> */</span><span class="WHIT">
-<span class='line'>316</span> </span><span class="NAME">Dygraph.prototype.isZoomed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">axis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>317</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">axis</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.zoomed_x_</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.zoomed_y_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>318</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">axis</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'x'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.zoomed_x_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>319</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">axis</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'y'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.zoomed_y_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>320</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"axis parameter to Dygraph.isZoomed must be missing, 'x' or 'y'."</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>321</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>322</span>
-<span class='line'>323</span> </span><span class="COMM">/**
-<span class='line'>324</span> * Returns information about the Dygraph object, including its containing ID.
-<span class='line'>325</span> */</span><span class="WHIT">
-<span class='line'>326</span> </span><span class="NAME">Dygraph.prototype.toString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>327</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">maindiv</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.maindiv_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>328</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">maindiv</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">maindiv.id</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">maindiv.id</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">maindiv</span><span class="WHIT">
-<span class='line'>329</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"[Dygraph "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"]"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>330</span> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>331</span>
-<span class='line'>332</span> </span><span class="COMM">/**
-<span class='line'>333</span> * @private
-<span class='line'>334</span> * Returns the value of an option. This may be set by the user (either in the
-<span class='line'>335</span> * constructor or by calling updateOptions) or by dygraphs, and may be set to a
-<span class='line'>336</span> * per-series value.
-<span class='line'>337</span> * @param { String } name The name of the option, e.g. 'rollPeriod'.
-<span class='line'>338</span> * @param { String } [seriesName] The name of the series to which the option
-<span class='line'>339</span> * will be applied. If no per-series value of this option is available, then
-<span class='line'>340</span> * the global value is returned. This is optional.
-<span class='line'>341</span> * @return { ... } The value of the option.
-<span class='line'>342</span> */</span><span class="WHIT">
-<span class='line'>343</span> </span><span class="NAME">Dygraph.prototype.attr_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">name</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">seriesName</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>344</span> </span><span class="COMM">// <REMOVE_FOR_COMBINED></span><span class="WHIT">
-<span class='line'>345</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">Dygraph.OPTIONS_REFERENCE</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>346</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">'Must include options reference JS for testing'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>347</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">Dygraph.OPTIONS_REFERENCE.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">name</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>348</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">'Dygraphs is using property '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">', which has no entry '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>349</span> </span><span class="WHIT"> </span><span class="STRN">'in the Dygraphs.OPTIONS_REFERENCE listing.'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>350</span> </span><span class="WHIT"> </span><span class="COMM">// Only log this error once.</span><span class="WHIT">
-<span class='line'>351</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.OPTIONS_REFERENCE</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>352</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>353</span> </span><span class="COMM">// </REMOVE_FOR_COMBINED></span><span class="WHIT">
-<span class='line'>354</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">seriesName</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
-<span class='line'>355</span> </span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">this.user_attrs_</span><span class="PUNC">[</span><span class="NAME">seriesName</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
-<span class='line'>356</span> </span><span class="WHIT"> </span><span class="NAME">this.user_attrs_</span><span class="PUNC">[</span><span class="NAME">seriesName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
-<span class='line'>357</span> </span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">this.user_attrs_</span><span class="PUNC">[</span><span class="NAME">seriesName</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>358</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.user_attrs_</span><span class="PUNC">[</span><span class="NAME">seriesName</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>359</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">this.user_attrs_</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>360</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.user_attrs_</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>361</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">this.attrs_</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>362</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.attrs_</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>363</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>364</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>365</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>366</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>367</span>
-<span class='line'>368</span> </span><span class="COMM">// TODO(danvk): any way I can get the line numbers to be this.warn call?</span><span class="WHIT">
-<span class='line'>369</span> </span><span class="COMM">/**
-<span class='line'>370</span> * @private
-<span class='line'>371</span> * Log an error on the JS console at the given severity.
-<span class='line'>372</span> * @param { Integer } severity One of Dygraph.{DEBUG,INFO,WARNING,ERROR}
-<span class='line'>373</span> * @param { String } The message to log.
-<span class='line'>374</span> */</span><span class="WHIT">
-<span class='line'>375</span> </span><span class="NAME">Dygraph.prototype.log</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">severity</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>376</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">console</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>377</span> </span><span class="WHIT"> </span><span class="KEYW">switch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">severity</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>378</span> </span><span class="WHIT"> </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NAME">Dygraph.DEBUG</span><span class="PUNC">:</span><span class="WHIT">
-<span class='line'>379</span> </span><span class="WHIT"> </span><span class="NAME">console.debug</span><span class="PUNC">(</span><span class="STRN">'dygraphs: '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>380</span> </span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>381</span> </span><span class="WHIT"> </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NAME">Dygraph.INFO</span><span class="PUNC">:</span><span class="WHIT">
-<span class='line'>382</span> </span><span class="WHIT"> </span><span class="NAME">console.info</span><span class="PUNC">(</span><span class="STRN">'dygraphs: '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>383</span> </span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>384</span> </span><span class="WHIT"> </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NAME">Dygraph.WARNING</span><span class="PUNC">:</span><span class="WHIT">
-<span class='line'>385</span> </span><span class="WHIT"> </span><span class="NAME">console.warn</span><span class="PUNC">(</span><span class="STRN">'dygraphs: '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>386</span> </span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>387</span> </span><span class="WHIT"> </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NAME">Dygraph.ERROR</span><span class="PUNC">:</span><span class="WHIT">
-<span class='line'>388</span> </span><span class="WHIT"> </span><span class="NAME">console.error</span><span class="PUNC">(</span><span class="STRN">'dygraphs: '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>389</span> </span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>390</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>391</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>392</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>393</span>
-<span class='line'>394</span> </span><span class="COMM">/**
-<span class='line'>395</span> * @private
-<span class='line'>396</span> */</span><span class="WHIT">
-<span class='line'>397</span> </span><span class="NAME">Dygraph.prototype.info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>398</span> </span><span class="WHIT"> </span><span class="NAME">this.log</span><span class="PUNC">(</span><span class="NAME">Dygraph.INFO</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>399</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>400</span>
-<span class='line'>401</span> </span><span class="COMM">/**
-<span class='line'>402</span> * @private
-<span class='line'>403</span> */</span><span class="WHIT">
-<span class='line'>404</span> </span><span class="NAME">Dygraph.prototype.warn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>405</span> </span><span class="WHIT"> </span><span class="NAME">this.log</span><span class="PUNC">(</span><span class="NAME">Dygraph.WARNING</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>406</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>407</span>
-<span class='line'>408</span> </span><span class="COMM">/**
-<span class='line'>409</span> * @private
-<span class='line'>410</span> */</span><span class="WHIT">
-<span class='line'>411</span> </span><span class="NAME">Dygraph.prototype.error</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>412</span> </span><span class="WHIT"> </span><span class="NAME">this.log</span><span class="PUNC">(</span><span class="NAME">Dygraph.ERROR</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>413</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>414</span>
-<span class='line'>415</span> </span><span class="COMM">/**
-<span class='line'>416</span> * Returns the current rolling period, as set by the user or an option.
-<span class='line'>417</span> * @return {Number} The number of points in the rolling window
-<span class='line'>418</span> */</span><span class="WHIT">
-<span class='line'>419</span> </span><span class="NAME">Dygraph.prototype.rollPeriod</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>420</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.rollPeriod_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>421</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>422</span>
-<span class='line'>423</span> </span><span class="COMM">/**
-<span class='line'>424</span> * Returns the currently-visible x-range. This can be affected by zooming,
-<span class='line'>425</span> * panning or a call to updateOptions.
-<span class='line'>426</span> * Returns a two-element array: [left, right].
-<span class='line'>427</span> * If the Dygraph has dates on the x-axis, these will be millis since epoch.
-<span class='line'>428</span> */</span><span class="WHIT">
-<span class='line'>429</span> </span><span class="NAME">Dygraph.prototype.xAxisRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>430</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.dateWindow_</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">this.dateWindow_</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.xAxisExtremes</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>431</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>432</span>
-<span class='line'>433</span> </span><span class="COMM">/**
-<span class='line'>434</span> * Returns the lower- and upper-bound x-axis values of the
-<span class='line'>435</span> * data set.
-<span class='line'>436</span> */</span><span class="WHIT">
-<span class='line'>437</span> </span><span class="NAME">Dygraph.prototype.xAxisExtremes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>438</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">left</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.rawData_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>439</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">right</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.rawData_</span><span class="PUNC">[</span><span class="NAME">this.rawData_.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>440</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">left</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">right</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>441</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>442</span>
-<span class='line'>443</span> </span><span class="COMM">/**
-<span class='line'>444</span> * Returns the currently-visible y-range for an axis. This can be affected by
-<span class='line'>445</span> * zooming, panning or a call to updateOptions. Axis indices are zero-based. If
-<span class='line'>446</span> * called with no arguments, returns the range of the first axis.
-<span class='line'>447</span> * Returns a two-element array: [bottom, top].
-<span class='line'>448</span> */</span><span class="WHIT">
-<span class='line'>449</span> </span><span class="NAME">Dygraph.prototype.yAxisRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">idx</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>450</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">idx</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>451</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NAME">this.axes_.length</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>452</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">this.axes_</span><span class="PUNC">[</span><span class="NAME">idx</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">computedValueRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>453</span> </span><span class="WHIT"> </span><span class="NAME">this.axes_</span><span class="PUNC">[</span><span class="NAME">idx</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">computedValueRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>454</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>455</span>
-<span class='line'>456</span> </span><span class="COMM">/**
-<span class='line'>457</span> * Returns the currently-visible y-ranges for each axis. This can be affected by
-<span class='line'>458</span> * zooming, panning, calls to updateOptions, etc.
-<span class='line'>459</span> * Returns an array of [bottom, top] pairs, one for each y-axis.
-<span class='line'>460</span> */</span><span class="WHIT">
-<span class='line'>461</span> </span><span class="NAME">Dygraph.prototype.yAxisRanges</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>462</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ret</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>463</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.axes_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>464</span> </span><span class="WHIT"> </span><span class="NAME">ret.push</span><span class="PUNC">(</span><span class="NAME">this.yAxisRange</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>465</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>466</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">ret</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>467</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>468</span>
-<span class='line'>469</span> </span><span class="COMM">// TODO(danvk): use these functions throughout dygraphs.</span><span class="WHIT">
-<span class='line'>470</span> </span><span class="COMM">/**
-<span class='line'>471</span> * Convert from data coordinates to canvas/div X/Y coordinates.
-<span class='line'>472</span> * If specified, do this conversion for the coordinate system of a particular
-<span class='line'>473</span> * axis. Uses the first axis by default.
-<span class='line'>474</span> * Returns a two-element array: [X, Y]
-<span class='line'>475</span> *
-<span class='line'>476</span> * Note: use toDomXCoord instead of toDomCoords(x, null) and use toDomYCoord
-<span class='line'>477</span> * instead of toDomCoords(null, y, axis).
-<span class='line'>478</span> */</span><span class="WHIT">
-<span class='line'>479</span> </span><span class="NAME">Dygraph.prototype.toDomCoords</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">y</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>480</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">this.toDomXCoord</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.toDomYCoord</span><span class="PUNC">(</span><span class="NAME">y</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>481</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>482</span>
-<span class='line'>483</span> </span><span class="COMM">/**
-<span class='line'>484</span> * Convert from data x coordinates to canvas/div X coordinate.
-<span class='line'>485</span> * If specified, do this conversion for the coordinate system of a particular
-<span class='line'>486</span> * axis.
-<span class='line'>487</span> * Returns a single value or null if x is null.
-<span class='line'>488</span> */</span><span class="WHIT">
-<span class='line'>489</span> </span><span class="NAME">Dygraph.prototype.toDomXCoord</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>490</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>491</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>492</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>493</span>
-<span class='line'>494</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">area</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.plotter_.area</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>495</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.xAxisRange</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>496</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">area.x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">xRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">xRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">xRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">area.w</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>497</span> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>498</span>
-<span class='line'>499</span> </span><span class="COMM">/**
-<span class='line'>500</span> * Convert from data x coordinates to canvas/div Y coordinate and optional
-<span class='line'>501</span> * axis. Uses the first axis by default.
-<span class='line'>502</span> *
-<span class='line'>503</span> * returns a single value or null if y is null.
-<span class='line'>504</span> */</span><span class="WHIT">
-<span class='line'>505</span> </span><span class="NAME">Dygraph.prototype.toDomYCoord</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">y</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>506</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pct</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.toPercentYCoord</span><span class="PUNC">(</span><span class="NAME">y</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>507</span>
-<span class='line'>508</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pct</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>509</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>510</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>511</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">area</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.plotter_.area</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>512</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">area.y</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">pct</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">area.h</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>513</span> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>514</span>
-<span class='line'>515</span> </span><span class="COMM">/**
-<span class='line'>516</span> * Convert from canvas/div coords to data coordinates.
-<span class='line'>517</span> * If specified, do this conversion for the coordinate system of a particular
-<span class='line'>518</span> * axis. Uses the first axis by default.
-<span class='line'>519</span> * Returns a two-element array: [X, Y].
-<span class='line'>520</span> *
-<span class='line'>521</span> * Note: use toDataXCoord instead of toDataCoords(x, null) and use toDataYCoord
-<span class='line'>522</span> * instead of toDataCoords(null, y, axis).
-<span class='line'>523</span> */</span><span class="WHIT">
-<span class='line'>524</span> </span><span class="NAME">Dygraph.prototype.toDataCoords</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">y</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>525</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">this.toDataXCoord</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.toDataYCoord</span><span class="PUNC">(</span><span class="NAME">y</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>526</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>527</span>
-<span class='line'>528</span> </span><span class="COMM">/**
-<span class='line'>529</span> * Convert from canvas/div x coordinate to data coordinate.
-<span class='line'>530</span> *
-<span class='line'>531</span> * If x is null, this returns null.
-<span class='line'>532</span> */</span><span class="WHIT">
-<span class='line'>533</span> </span><span class="NAME">Dygraph.prototype.toDataXCoord</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>534</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>535</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>536</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>537</span>
-<span class='line'>538</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">area</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.plotter_.area</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>539</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.xAxisRange</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>540</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">xRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">area.x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">area.w</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">xRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">xRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>541</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>542</span>
-<span class='line'>543</span> </span><span class="COMM">/**
-<span class='line'>544</span> * Convert from canvas/div y coord to value.
-<span class='line'>545</span> *
-<span class='line'>546</span> * If y is null, this returns null.
-<span class='line'>547</span> * if axis is null, this uses the first axis.
-<span class='line'>548</span> */</span><span class="WHIT">
-<span class='line'>549</span> </span><span class="NAME">Dygraph.prototype.toDataYCoord</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">y</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>550</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>551</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>552</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>553</span>
-<span class='line'>554</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">area</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.plotter_.area</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>555</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">yRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.yAxisRange</span><span class="PUNC">(</span><span class="NAME">axis</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>556</span>
-<span class='line'>557</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">axis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>558</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.axes_</span><span class="PUNC">[</span><span class="NAME">axis</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">logscale</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>559</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">area.h</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">y</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">area.h</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>560</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>561</span> </span><span class="WHIT"> </span><span class="COMM">// Computing the inverse of toDomCoord.</span><span class="WHIT">
-<span class='line'>562</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pct</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">area.y</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">area.h</span><span class="WHIT">
-<span class='line'>563</span>
-<span class='line'>564</span> </span><span class="WHIT"> </span><span class="COMM">// Computing the inverse of toPercentYCoord. The function was arrived at with</span><span class="WHIT">
-<span class='line'>565</span> </span><span class="WHIT"> </span><span class="COMM">// the following steps:</span><span class="WHIT">
-<span class='line'>566</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
-<span class='line'>567</span> </span><span class="WHIT"> </span><span class="COMM">// Original calcuation:</span><span class="WHIT">
-<span class='line'>568</span> </span><span class="WHIT"> </span><span class="COMM">// pct = (logr1 - Dygraph.log10(y)) / (logr1 - Dygraph.log10(yRange[0]));</span><span class="WHIT">
-<span class='line'>569</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
-<span class='line'>570</span> </span><span class="WHIT"> </span><span class="COMM">// Move denominator to both sides:</span><span class="WHIT">
-<span class='line'>571</span> </span><span class="WHIT"> </span><span class="COMM">// pct * (logr1 - Dygraph.log10(yRange[0])) = logr1 - Dygraph.log10(y);</span><span class="WHIT">
-<span class='line'>572</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
-<span class='line'>573</span> </span><span class="WHIT"> </span><span class="COMM">// subtract logr1, and take the negative value.</span><span class="WHIT">
-<span class='line'>574</span> </span><span class="WHIT"> </span><span class="COMM">// logr1 - (pct * (logr1 - Dygraph.log10(yRange[0]))) = Dygraph.log10(y);</span><span class="WHIT">
-<span class='line'>575</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
-<span class='line'>576</span> </span><span class="WHIT"> </span><span class="COMM">// Swap both sides of the equation, and we can compute the log of the</span><span class="WHIT">
-<span class='line'>577</span> </span><span class="WHIT"> </span><span class="COMM">// return value. Which means we just need to use that as the exponent in</span><span class="WHIT">
-<span class='line'>578</span> </span><span class="WHIT"> </span><span class="COMM">// e^exponent.</span><span class="WHIT">
-<span class='line'>579</span> </span><span class="WHIT"> </span><span class="COMM">// Dygraph.log10(y) = logr1 - (pct * (logr1 - Dygraph.log10(yRange[0])));</span><span class="WHIT">
-<span class='line'>580</span>
-<span class='line'>581</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">logr1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.log10</span><span class="PUNC">(</span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>582</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">exponent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">logr1</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pct</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">logr1</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">Dygraph.log10</span><span class="PUNC">(</span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>583</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.pow</span><span class="PUNC">(</span><span class="NAME">Dygraph.LOG_SCALE</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">exponent</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>584</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>585</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>586</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>587</span>
-<span class='line'>588</span> </span><span class="COMM">/**
-<span class='line'>589</span> * Converts a y for an axis to a percentage from the top to the
-<span class='line'>590</span> * bottom of the drawing area.
-<span class='line'>591</span> *
-<span class='line'>592</span> * If the coordinate represents a value visible on the canvas, then
-<span class='line'>593</span> * the value will be between 0 and 1, where 0 is the top of the canvas.
-<span class='line'>594</span> * However, this method will return values outside the range, as
-<span class='line'>595</span> * values can fall outside the canvas.
-<span class='line'>596</span> *
-<span class='line'>597</span> * If y is null, this returns null.
-<span class='line'>598</span> * if axis is null, this uses the first axis.
-<span class='line'>599</span> *
-<span class='line'>600</span> * @param { Number } y The data y-coordinate.
-<span class='line'>601</span> * @param { Number } [axis] The axis number on which the data coordinate lives.
-<span class='line'>602</span> * @return { Number } A fraction in [0, 1] where 0 = the top edge.
-<span class='line'>603</span> */</span><span class="WHIT">
-<span class='line'>604</span> </span><span class="NAME">Dygraph.prototype.toPercentYCoord</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">y</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>605</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>606</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>607</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>608</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">axis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>609</span>
-<span class='line'>610</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">area</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.plotter_.area</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>611</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">yRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.yAxisRange</span><span class="PUNC">(</span><span class="NAME">axis</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>612</span>
-<span class='line'>613</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pct</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>614</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.axes_</span><span class="PUNC">[</span><span class="NAME">axis</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">logscale</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>615</span> </span><span class="WHIT"> </span><span class="COMM">// yRange[1] - y is unit distance from the bottom.</span><span class="WHIT">
-<span class='line'>616</span> </span><span class="WHIT"> </span><span class="COMM">// yRange[1] - yRange[0] is the scale of the range.</span><span class="WHIT">
-<span class='line'>617</span> </span><span class="WHIT"> </span><span class="COMM">// (yRange[1] - y) / (yRange[1] - yRange[0]) is the % from the bottom.</span><span class="WHIT">
-<span class='line'>618</span> </span><span class="WHIT"> </span><span class="NAME">pct</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">y</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>619</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>620</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">logr1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.log10</span><span class="PUNC">(</span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>621</span> </span><span class="WHIT"> </span><span class="NAME">pct</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">logr1</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">Dygraph.log10</span><span class="PUNC">(</span><span class="NAME">y</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">logr1</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">Dygraph.log10</span><span class="PUNC">(</span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>622</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>623</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">pct</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>624</span> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>625</span>
-<span class='line'>626</span> </span><span class="COMM">/**
-<span class='line'>627</span> * Converts an x value to a percentage from the left to the right of
-<span class='line'>628</span> * the drawing area.
-<span class='line'>629</span> *
-<span class='line'>630</span> * If the coordinate represents a value visible on the canvas, then
-<span class='line'>631</span> * the value will be between 0 and 1, where 0 is the left of the canvas.
-<span class='line'>632</span> * However, this method will return values outside the range, as
-<span class='line'>633</span> * values can fall outside the canvas.
-<span class='line'>634</span> *
-<span class='line'>635</span> * If x is null, this returns null.
-<span class='line'>636</span> * @param { Number } x The data x-coordinate.
-<span class='line'>637</span> * @return { Number } A fraction in [0, 1] where 0 = the left edge.
-<span class='line'>638</span> */</span><span class="WHIT">
-<span class='line'>639</span> </span><span class="NAME">Dygraph.prototype.toPercentXCoord</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>640</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>641</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>642</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>643</span>
-<span class='line'>644</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.xAxisRange</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>645</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">xRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">xRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">xRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>646</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>647</span>
-<span class='line'>648</span> </span><span class="COMM">/**
-<span class='line'>649</span> * Returns the number of columns (including the independent variable).
-<span class='line'>650</span> * @return { Integer } The number of columns.
-<span class='line'>651</span> */</span><span class="WHIT">
-<span class='line'>652</span> </span><span class="NAME">Dygraph.prototype.numColumns</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>653</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.rawData_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>654</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>655</span>
-<span class='line'>656</span> </span><span class="COMM">/**
-<span class='line'>657</span> * Returns the number of rows (excluding any header/label row).
-<span class='line'>658</span> * @return { Integer } The number of rows, less any header.
-<span class='line'>659</span> */</span><span class="WHIT">
-<span class='line'>660</span> </span><span class="NAME">Dygraph.prototype.numRows</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>661</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.rawData_.length</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>662</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>663</span>
-<span class='line'>664</span> </span><span class="COMM">/**
-<span class='line'>665</span> * Returns the value in the given row and column. If the row and column exceed
-<span class='line'>666</span> * the bounds on the data, returns null. Also returns null if the value is
-<span class='line'>667</span> * missing.
-<span class='line'>668</span> * @param { Number} row The row number of the data (0-based). Row 0 is the
-<span class='line'>669</span> * first row of data, not a header row.
-<span class='line'>670</span> * @param { Number} col The column number of the data (0-based)
-<span class='line'>671</span> * @return { Number } The value in the specified cell or null if the row/col
-<span class='line'>672</span> * were out of range.
-<span class='line'>673</span> */</span><span class="WHIT">
-<span class='line'>674</span> </span><span class="NAME">Dygraph.prototype.getValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">row</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">col</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>675</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">row</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">row</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">this.rawData_.length</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>676</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">col</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">col</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">this.rawData_</span><span class="PUNC">[</span><span class="NAME">row</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>677</span>
-<span class='line'>678</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.rawData_</span><span class="PUNC">[</span><span class="NAME">row</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">col</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>679</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>680</span>
-<span class='line'>681</span> </span><span class="COMM">/**
-<span class='line'>682</span> * @private
-<span class='line'>683</span> * Add an event handler. This smooths a difference between IE and the rest of
-<span class='line'>684</span> * the world.
-<span class='line'>685</span> * @param { DOM element } el The element to add the event to.
-<span class='line'>686</span> * @param { String } evt The name of the event, e.g. 'click' or 'mousemove'.
-<span class='line'>687</span> * @param { Function } fn The function to call on the event. The function takes
-<span class='line'>688</span> * one parameter: the event object.
-<span class='line'>689</span> */</span><span class="WHIT">
-<span class='line'>690</span> </span><span class="NAME">Dygraph.addEvent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">el</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">fn</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>691</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">normed_fn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>692</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">e</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">window.event</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>693</span> </span><span class="WHIT"> </span><span class="NAME">fn</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>694</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>695</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">window.addEventListener</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// Mozilla, Netscape, Firefox</span><span class="WHIT">
-<span class='line'>696</span> </span><span class="WHIT"> </span><span class="NAME">el.addEventListener</span><span class="PUNC">(</span><span class="NAME">evt</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">normed_fn</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>697</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// IE</span><span class="WHIT">
-<span class='line'>698</span> </span><span class="WHIT"> </span><span class="NAME">el.attachEvent</span><span class="PUNC">(</span><span class="STRN">'on'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">evt</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">normed_fn</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>699</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>700</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>701</span>
-<span class='line'>702</span>
-<span class='line'>703</span> </span><span class="COMM">/**
-<span class='line'>704</span> * @private
-<span class='line'>705</span> * Cancels further processing of an event. This is useful to prevent default
-<span class='line'>706</span> * browser actions, e.g. highlighting text on a double-click.
-<span class='line'>707</span> * Based on the article at
-<span class='line'>708</span> * http://www.switchonthecode.com/tutorials/javascript-tutorial-the-scroll-wheel
-<span class='line'>709</span> * @param { Event } e The event whose normal behavior should be canceled.
-<span class='line'>710</span> */</span><span class="WHIT">
-<span class='line'>711</span> </span><span class="NAME">Dygraph.cancelEvent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>712</span> </span><span class="WHIT"> </span><span class="NAME">e</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">e</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">e</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">window.event</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>713</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e.stopPropagation</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>714</span> </span><span class="WHIT"> </span><span class="NAME">e.stopPropagation</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>715</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>716</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e.preventDefault</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>717</span> </span><span class="WHIT"> </span><span class="NAME">e.preventDefault</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>718</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>719</span> </span><span class="WHIT"> </span><span class="NAME">e.cancelBubble</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>720</span> </span><span class="WHIT"> </span><span class="NAME">e.cancel</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>721</span> </span><span class="WHIT"> </span><span class="NAME">e.returnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>722</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>723</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>724</span>
-<span class='line'>725</span>
-<span class='line'>726</span> </span><span class="COMM">/**
-<span class='line'>727</span> * Generates interface elements for the Dygraph: a containing div, a div to
-<span class='line'>728</span> * display the current point, and a textbox to adjust the rolling average
-<span class='line'>729</span> * period. Also creates the Renderer/Layout elements.
-<span class='line'>730</span> * @private
-<span class='line'>731</span> */</span><span class="WHIT">
-<span class='line'>732</span> </span><span class="NAME">Dygraph.prototype.createInterface_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>733</span> </span><span class="WHIT"> </span><span class="COMM">// Create the all-enclosing graph div</span><span class="WHIT">
-<span class='line'>734</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">enclosing</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.maindiv_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>735</span>
-<span class='line'>736</span> </span><span class="WHIT"> </span><span class="NAME">this.graphDiv</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElement</span><span class="PUNC">(</span><span class="STRN">"div"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>737</span> </span><span class="WHIT"> </span><span class="NAME">this.graphDiv.style.width</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.width_</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>738</span> </span><span class="WHIT"> </span><span class="NAME">this.graphDiv.style.height</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.height_</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>739</span> </span><span class="WHIT"> </span><span class="NAME">enclosing.appendChild</span><span class="PUNC">(</span><span class="NAME">this.graphDiv</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>740</span>
-<span class='line'>741</span> </span><span class="WHIT"> </span><span class="COMM">// Create the canvas for interactive parts of the chart.</span><span class="WHIT">
-<span class='line'>742</span> </span><span class="WHIT"> </span><span class="NAME">this.canvas_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.createCanvas</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>743</span> </span><span class="WHIT"> </span><span class="NAME">this.canvas_.style.position</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"absolute"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>744</span> </span><span class="WHIT"> </span><span class="NAME">this.canvas_.width</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.width_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>745</span> </span><span class="WHIT"> </span><span class="NAME">this.canvas_.height</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.height_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>746</span> </span><span class="WHIT"> </span><span class="NAME">this.canvas_.style.width</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.width_</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// for IE</span><span class="WHIT">
-<span class='line'>747</span> </span><span class="WHIT"> </span><span class="NAME">this.canvas_.style.height</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.height_</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// for IE</span><span class="WHIT">
-<span class='line'>748</span>
-<span class='line'>749</span> </span><span class="WHIT"> </span><span class="NAME">this.canvas_ctx_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.getContext</span><span class="PUNC">(</span><span class="NAME">this.canvas_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>750</span>
-<span class='line'>751</span> </span><span class="WHIT"> </span><span class="COMM">// ... and for static parts of the chart.</span><span class="WHIT">
-<span class='line'>752</span> </span><span class="WHIT"> </span><span class="NAME">this.hidden_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.createPlotKitCanvas_</span><span class="PUNC">(</span><span class="NAME">this.canvas_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>753</span> </span><span class="WHIT"> </span><span class="NAME">this.hidden_ctx_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.getContext</span><span class="PUNC">(</span><span class="NAME">this.hidden_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>754</span>
-<span class='line'>755</span> </span><span class="WHIT"> </span><span class="COMM">// The interactive parts of the graph are drawn on top of the chart.</span><span class="WHIT">
-<span class='line'>756</span> </span><span class="WHIT"> </span><span class="NAME">this.graphDiv.appendChild</span><span class="PUNC">(</span><span class="NAME">this.hidden_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>757</span> </span><span class="WHIT"> </span><span class="NAME">this.graphDiv.appendChild</span><span class="PUNC">(</span><span class="NAME">this.canvas_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>758</span> </span><span class="WHIT"> </span><span class="NAME">this.mouseEventElement_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.canvas_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>759</span>
-<span class='line'>760</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dygraph</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>761</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.addEvent</span><span class="PUNC">(</span><span class="NAME">this.mouseEventElement_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'mousemove'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>762</span> </span><span class="WHIT"> </span><span class="NAME">dygraph.mouseMove_</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>763</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>764</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.addEvent</span><span class="PUNC">(</span><span class="NAME">this.mouseEventElement_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'mouseout'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>765</span> </span><span class="WHIT"> </span><span class="NAME">dygraph.mouseOut_</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>766</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>767</span>
-<span class='line'>768</span> </span><span class="WHIT"> </span><span class="COMM">// Create the grapher</span><span class="WHIT">
-<span class='line'>769</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): why does the Layout need its own set of options?</span><span class="WHIT">
-<span class='line'>770</span> </span><span class="WHIT"> </span><span class="NAME">this.layoutOptions_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="STRN">'xOriginIsZero'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>771</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">this.layoutOptions_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.attrs_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>772</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">this.layoutOptions_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.user_attrs_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>773</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">this.layoutOptions_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>774</span> </span><span class="WHIT"> </span><span class="STRN">'errorBars'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"errorBars"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"customBars"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>775</span>
-<span class='line'>776</span> </span><span class="WHIT"> </span><span class="NAME">this.layout_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">DygraphLayout</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.layoutOptions_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>777</span>
-<span class='line'>778</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): why does the Renderer need its own set of options?</span><span class="WHIT">
-<span class='line'>779</span> </span><span class="WHIT"> </span><span class="NAME">this.renderOptions_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">colorScheme</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.colors_</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>780</span> </span><span class="WHIT"> </span><span class="NAME">strokeColor</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>781</span> </span><span class="WHIT"> </span><span class="NAME">axisLineWidth</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Dygraph.AXIS_LINE_WIDTH</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>782</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">this.renderOptions_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.attrs_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>783</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">this.renderOptions_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.user_attrs_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>784</span>
-<span class='line'>785</span> </span><span class="WHIT"> </span><span class="NAME">this.createStatusMessage_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>786</span> </span><span class="WHIT"> </span><span class="NAME">this.createDragInterface_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>787</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>788</span>
-<span class='line'>789</span> </span><span class="COMM">/**
-<span class='line'>790</span> * Detach DOM elements in the dygraph and null out all data references.
-<span class='line'>791</span> * Calling this when you're done with a dygraph can dramatically reduce memory
-<span class='line'>792</span> * usage. See, e.g., the tests/perf.html example.
-<span class='line'>793</span> */</span><span class="WHIT">
-<span class='line'>794</span> </span><span class="NAME">Dygraph.prototype.destroy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>795</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">removeRecursive</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">node</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>796</span> </span><span class="WHIT"> </span><span class="KEYW">while</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">node.hasChildNodes</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>797</span> </span><span class="WHIT"> </span><span class="NAME">removeRecursive</span><span class="PUNC">(</span><span class="NAME">node.firstChild</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>798</span> </span><span class="WHIT"> </span><span class="NAME">node.removeChild</span><span class="PUNC">(</span><span class="NAME">node.firstChild</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>799</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>800</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>801</span> </span><span class="WHIT"> </span><span class="NAME">removeRecursive</span><span class="PUNC">(</span><span class="NAME">this.maindiv_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>802</span>
-<span class='line'>803</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nullOut</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>804</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>805</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">n</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'object'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>806</span> </span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">n</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>807</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>808</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>809</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>810</span>
-<span class='line'>811</span> </span><span class="WHIT"> </span><span class="COMM">// These may not all be necessary, but it can't hurt...</span><span class="WHIT">
-<span class='line'>812</span> </span><span class="WHIT"> </span><span class="NAME">nullOut</span><span class="PUNC">(</span><span class="NAME">this.layout_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>813</span> </span><span class="WHIT"> </span><span class="NAME">nullOut</span><span class="PUNC">(</span><span class="NAME">this.plotter_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>814</span> </span><span class="WHIT"> </span><span class="NAME">nullOut</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>815</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>816</span>
-<span class='line'>817</span> </span><span class="COMM">/**
-<span class='line'>818</span> * Creates the canvas on which the chart will be drawn. Only the Renderer ever
-<span class='line'>819</span> * draws on this particular canvas. All Dygraph work (i.e. drawing hover dots
-<span class='line'>820</span> * or the zoom rectangles) is done on this.canvas_.
-<span class='line'>821</span> * @param {Object} canvas The Dygraph canvas over which to overlay the plot
-<span class='line'>822</span> * @return {Object} The newly-created canvas
-<span class='line'>823</span> * @private
-<span class='line'>824</span> */</span><span class="WHIT">
-<span class='line'>825</span> </span><span class="NAME">Dygraph.prototype.createPlotKitCanvas_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">canvas</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>826</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">h</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.createCanvas</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>827</span> </span><span class="WHIT"> </span><span class="NAME">h.style.position</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"absolute"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>828</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): h should be offset from canvas. canvas needs to include</span><span class="WHIT">
-<span class='line'>829</span> </span><span class="WHIT"> </span><span class="COMM">// some extra area to make it easier to zoom in on the far left and far</span><span class="WHIT">
-<span class='line'>830</span> </span><span class="WHIT"> </span><span class="COMM">// right. h needs to be precisely the plot area, so that clipping occurs.</span><span class="WHIT">
-<span class='line'>831</span> </span><span class="WHIT"> </span><span class="NAME">h.style.top</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">canvas.style.top</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>832</span> </span><span class="WHIT"> </span><span class="NAME">h.style.left</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">canvas.style.left</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>833</span> </span><span class="WHIT"> </span><span class="NAME">h.width</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.width_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>834</span> </span><span class="WHIT"> </span><span class="NAME">h.height</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.height_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>835</span> </span><span class="WHIT"> </span><span class="NAME">h.style.width</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.width_</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// for IE</span><span class="WHIT">
-<span class='line'>836</span> </span><span class="WHIT"> </span><span class="NAME">h.style.height</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.height_</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// for IE</span><span class="WHIT">
-<span class='line'>837</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>838</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>839</span>
-<span class='line'>840</span> </span><span class="COMM">/**
-<span class='line'>841</span> * Convert hsv values to an rgb(r,g,b) string. Taken from MochiKit.Color. This
-<span class='line'>842</span> * is used to generate default series colors which are evenly spaced on the
-<span class='line'>843</span> * color wheel.
-<span class='line'>844</span> * @param { Number } hue Range is 0.0-1.0.
-<span class='line'>845</span> * @param { Number } saturation Range is 0.0-1.0.
-<span class='line'>846</span> * @param { Number } value Range is 0.0-1.0.
-<span class='line'>847</span> * @return { String } "rgb(r,g,b)" where r, g and b range from 0-255.
-<span class='line'>848</span> * @private
-<span class='line'>849</span> */</span><span class="WHIT">
-<span class='line'>850</span> </span><span class="NAME">Dygraph.hsvToRGB</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hue</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">saturation</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>851</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">red</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>852</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">green</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>853</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">blue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>854</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">saturation</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>855</span> </span><span class="WHIT"> </span><span class="NAME">red</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>856</span> </span><span class="WHIT"> </span><span class="NAME">green</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>857</span> </span><span class="WHIT"> </span><span class="NAME">blue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>858</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>859</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="NAME">hue</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">6</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>860</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">f</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hue</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">6</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>861</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">saturation</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>862</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">q</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">saturation</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">f</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>863</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">t</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">saturation</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">f</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>864</span> </span><span class="WHIT"> </span><span class="KEYW">switch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>865</span> </span><span class="WHIT"> </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">red</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">q</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">green</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">blue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">p</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>866</span> </span><span class="WHIT"> </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">red</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">p</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">green</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">blue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">t</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>867</span> </span><span class="WHIT"> </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">red</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">p</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">green</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">q</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">blue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>868</span> </span><span class="WHIT"> </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NUMB">4</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">red</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">t</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">green</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">p</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">blue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>869</span> </span><span class="WHIT"> </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NUMB">5</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">red</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">green</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">p</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">blue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">q</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>870</span> </span><span class="WHIT"> </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NUMB">6</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="COMM">// fall through</span><span class="WHIT">
-<span class='line'>871</span> </span><span class="WHIT"> </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">red</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">green</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">t</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">blue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">p</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>872</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>873</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>874</span> </span><span class="WHIT"> </span><span class="NAME">red</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="NUMB">255</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">red</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">0.5</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>875</span> </span><span class="WHIT"> </span><span class="NAME">green</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="NUMB">255</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">green</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">0.5</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>876</span> </span><span class="WHIT"> </span><span class="NAME">blue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="NUMB">255</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">blue</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">0.5</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>877</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">'rgb('</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">red</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">','</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">green</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">','</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">blue</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">')'</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>878</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>879</span>
-<span class='line'>880</span>
-<span class='line'>881</span> </span><span class="COMM">/**
-<span class='line'>882</span> * Generate a set of distinct colors for the data series. This is done with a
-<span class='line'>883</span> * color wheel. Saturation/Value are customizable, and the hue is
-<span class='line'>884</span> * equally-spaced around the color wheel. If a custom set of colors is
-<span class='line'>885</span> * specified, that is used instead.
-<span class='line'>886</span> * @private
-<span class='line'>887</span> */</span><span class="WHIT">
-<span class='line'>888</span> </span><span class="NAME">Dygraph.prototype.setColors_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>889</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): compute this directly into this.attrs_['colorScheme'] and do</span><span class="WHIT">
-<span class='line'>890</span> </span><span class="WHIT"> </span><span class="COMM">// away with this.renderOptions_.</span><span class="WHIT">
-<span class='line'>891</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">num</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"labels"</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>892</span> </span><span class="WHIT"> </span><span class="NAME">this.colors_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>893</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">colors</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'colors'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>894</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">colors</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>895</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sat</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'colorSaturation'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NUMB">1.0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>896</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'colorValue'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NUMB">0.5</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>897</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">half</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.ceil</span><span class="PUNC">(</span><span class="NAME">num</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>898</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><=</span><span class="WHIT"> </span><span class="NAME">num</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>899</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.visibility</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>900</span> </span><span class="WHIT"> </span><span class="COMM">// alternate colors for high contrast.</span><span class="WHIT">
-<span class='line'>901</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">%</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">Math.ceil</span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">half</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>902</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NUMB">1.0</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">/</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">num</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>903</span> </span><span class="WHIT"> </span><span class="NAME">this.colors_.push</span><span class="PUNC">(</span><span class="NAME">Dygraph.hsvToRGB</span><span class="PUNC">(</span><span class="NAME">hue</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sat</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">val</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>904</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>905</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>906</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">num</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>907</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.visibility</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>908</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">colorStr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">colors</span><span class="PUNC">[</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">%</span><span class="WHIT"> </span><span class="NAME">colors.length</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>909</span> </span><span class="WHIT"> </span><span class="NAME">this.colors_.push</span><span class="PUNC">(</span><span class="NAME">colorStr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>910</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>911</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>912</span>
-<span class='line'>913</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): update this w/r/t/ the new options system.</span><span class="WHIT">
-<span class='line'>914</span> </span><span class="WHIT"> </span><span class="NAME">this.renderOptions_.colorScheme</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.colors_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>915</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">this.plotter_.options</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.renderOptions_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>916</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">this.layoutOptions_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.user_attrs_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>917</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">this.layoutOptions_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.attrs_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>918</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>919</span>
-<span class='line'>920</span> </span><span class="COMM">/**
-<span class='line'>921</span> * Return the list of colors. This is either the list of colors passed in the
-<span class='line'>922</span> * attributes or the autogenerated list of rgb(r,g,b) strings.
-<span class='line'>923</span> * @return {Array<string>} The list of colors.
-<span class='line'>924</span> */</span><span class="WHIT">
-<span class='line'>925</span> </span><span class="NAME">Dygraph.prototype.getColors</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>926</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.colors_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>927</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>928</span>
-<span class='line'>929</span> </span><span class="COMM">// The following functions are from quirksmode.org with a modification for Safari from</span><span class="WHIT">
-<span class='line'>930</span> </span><span class="COMM">// http://blog.firetree.net/2005/07/04/javascript-find-position/</span><span class="WHIT">
-<span class='line'>931</span> </span><span class="COMM">// http://www.quirksmode.org/js/findpos.html</span><span class="WHIT">
-<span class='line'>932</span>
-<span class='line'>933</span> </span><span class="COMM">/**
-<span class='line'>934</span> * @private
-<span class='line'>935</span> */</span><span class="WHIT">
-<span class='line'>936</span> </span><span class="NAME">Dygraph.findPosX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>937</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">curleft</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>938</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">obj.offsetParent</span><span class="PUNC">)</span><span class="WHIT">
-<span class='line'>939</span> </span><span class="WHIT"> </span><span class="KEYW">while</span><span class="PUNC">(</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT">
-<span class='line'>940</span> </span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>941</span> </span><span class="WHIT"> </span><span class="NAME">curleft</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">obj.offsetLeft</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>942</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">obj.offsetParent</span><span class="PUNC">)</span><span class="WHIT">
-<span class='line'>943</span> </span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>944</span> </span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">obj.offsetParent</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>945</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>946</span> </span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">obj.x</span><span class="PUNC">)</span><span class="WHIT">
-<span class='line'>947</span> </span><span class="WHIT"> </span><span class="NAME">curleft</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">obj.x</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>948</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">curleft</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>949</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>950</span>
-<span class='line'>951</span>
-<span class='line'>952</span> </span><span class="COMM">/**
-<span class='line'>953</span> * @private
-<span class='line'>954</span> */</span><span class="WHIT">
-<span class='line'>955</span> </span><span class="NAME">Dygraph.findPosY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>956</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">curtop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>957</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">obj.offsetParent</span><span class="PUNC">)</span><span class="WHIT">
-<span class='line'>958</span> </span><span class="WHIT"> </span><span class="KEYW">while</span><span class="PUNC">(</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT">
-<span class='line'>959</span> </span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>960</span> </span><span class="WHIT"> </span><span class="NAME">curtop</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">obj.offsetTop</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>961</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">obj.offsetParent</span><span class="PUNC">)</span><span class="WHIT">
-<span class='line'>962</span> </span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>963</span> </span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">obj.offsetParent</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>964</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>965</span> </span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">obj.y</span><span class="PUNC">)</span><span class="WHIT">
-<span class='line'>966</span> </span><span class="WHIT"> </span><span class="NAME">curtop</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">obj.y</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>967</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">curtop</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>968</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>969</span>
-<span class='line'>970</span>
-<span class='line'>971</span> </span><span class="COMM">/**
-<span class='line'>972</span> * Create the div that contains information on the selected point(s)
-<span class='line'>973</span> * This goes in the top right of the canvas, unless an external div has already
-<span class='line'>974</span> * been specified.
-<span class='line'>975</span> * @private
-<span class='line'>976</span> */</span><span class="WHIT">
-<span class='line'>977</span> </span><span class="NAME">Dygraph.prototype.createStatusMessage_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>978</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">userLabelsDiv</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.user_attrs_</span><span class="PUNC">[</span><span class="STRN">"labelsDiv"</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>979</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">userLabelsDiv</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">userLabelsDiv</span><span class="WHIT">
-<span class='line'>980</span> </span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">userLabelsDiv</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">userLabelsDiv</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">String</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>981</span> </span><span class="WHIT"> </span><span class="NAME">this.user_attrs_</span><span class="PUNC">[</span><span class="STRN">"labelsDiv"</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.getElementById</span><span class="PUNC">(</span><span class="NAME">userLabelsDiv</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>982</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>983</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"labelsDiv"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>984</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">divWidth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'labelsDivWidth'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>985</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">messagestyle</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>986</span> </span><span class="WHIT"> </span><span class="STRN">"position"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"absolute"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>987</span> </span><span class="WHIT"> </span><span class="STRN">"fontSize"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"14px"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>988</span> </span><span class="WHIT"> </span><span class="STRN">"zIndex"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>989</span> </span><span class="WHIT"> </span><span class="STRN">"width"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">divWidth</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>990</span> </span><span class="WHIT"> </span><span class="STRN">"top"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"0px"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>991</span> </span><span class="WHIT"> </span><span class="STRN">"left"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.width_</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">divWidth</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>992</span> </span><span class="WHIT"> </span><span class="STRN">"background"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"white"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>993</span> </span><span class="WHIT"> </span><span class="STRN">"textAlign"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"left"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>994</span> </span><span class="WHIT"> </span><span class="STRN">"overflow"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"hidden"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>995</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">messagestyle</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'labelsDivStyles'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>996</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">div</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElement</span><span class="PUNC">(</span><span class="STRN">"div"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>997</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">messagestyle</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>998</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">messagestyle.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">name</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>999</span> </span><span class="WHIT"> </span><span class="NAME">div.style</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">messagestyle</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1000</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1001</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1002</span> </span><span class="WHIT"> </span><span class="NAME">this.graphDiv.appendChild</span><span class="PUNC">(</span><span class="NAME">div</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1003</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.labelsDiv</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">div</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1004</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1005</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1006</span>
-<span class='line'>1007</span> </span><span class="COMM">/**
-<span class='line'>1008</span> * Position the labels div so that:
-<span class='line'>1009</span> * - its right edge is flush with the right edge of the charting area
-<span class='line'>1010</span> * - its top edge is flush with the top edge of the charting area
-<span class='line'>1011</span> * @private
-<span class='line'>1012</span> */</span><span class="WHIT">
-<span class='line'>1013</span> </span><span class="NAME">Dygraph.prototype.positionLabelsDiv_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1014</span> </span><span class="WHIT"> </span><span class="COMM">// Don't touch a user-specified labelsDiv.</span><span class="WHIT">
-<span class='line'>1015</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.user_attrs_.hasOwnProperty</span><span class="PUNC">(</span><span class="STRN">"labelsDiv"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1016</span>
-<span class='line'>1017</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">area</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.plotter_.area</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1018</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">div</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"labelsDiv"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1019</span> </span><span class="WHIT"> </span><span class="NAME">div.style.left</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">area.x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">area.w</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"labelsDivWidth"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1020</span> </span><span class="WHIT"> </span><span class="NAME">div.style.top</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">area.y</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1021</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1022</span>
-<span class='line'>1023</span> </span><span class="COMM">/**
-<span class='line'>1024</span> * Create the text box to adjust the averaging period
-<span class='line'>1025</span> * @private
-<span class='line'>1026</span> */</span><span class="WHIT">
-<span class='line'>1027</span> </span><span class="NAME">Dygraph.prototype.createRollInterface_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1028</span> </span><span class="WHIT"> </span><span class="COMM">// Create a roller if one doesn't exist already.</span><span class="WHIT">
-<span class='line'>1029</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.roller_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1030</span> </span><span class="WHIT"> </span><span class="NAME">this.roller_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElement</span><span class="PUNC">(</span><span class="STRN">"input"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1031</span> </span><span class="WHIT"> </span><span class="NAME">this.roller_.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"text"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1032</span> </span><span class="WHIT"> </span><span class="NAME">this.roller_.style.display</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"none"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1033</span> </span><span class="WHIT"> </span><span class="NAME">this.graphDiv.appendChild</span><span class="PUNC">(</span><span class="NAME">this.roller_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1034</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1035</span>
-<span class='line'>1036</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">display</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'showRoller'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'block'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'none'</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1037</span>
-<span class='line'>1038</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">area</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.plotter_.area</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1039</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">textAttr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="STRN">"position"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"absolute"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1040</span> </span><span class="WHIT"> </span><span class="STRN">"zIndex"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1041</span> </span><span class="WHIT"> </span><span class="STRN">"top"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">area.y</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">area.h</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">25</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1042</span> </span><span class="WHIT"> </span><span class="STRN">"left"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">area.x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1043</span> </span><span class="WHIT"> </span><span class="STRN">"display"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">display</span><span class="WHIT">
-<span class='line'>1044</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1045</span> </span><span class="WHIT"> </span><span class="NAME">this.roller_.size</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"2"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1046</span> </span><span class="WHIT"> </span><span class="NAME">this.roller_.value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.rollPeriod_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1047</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">textAttr</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1048</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">textAttr.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">name</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1049</span> </span><span class="WHIT"> </span><span class="NAME">this.roller_.style</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">textAttr</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1050</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1051</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1052</span>
-<span class='line'>1053</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dygraph</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1054</span> </span><span class="WHIT"> </span><span class="NAME">this.roller_.onchange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">dygraph.adjustRoll</span><span class="PUNC">(</span><span class="NAME">dygraph.roller_.value</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1055</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1056</span>
-<span class='line'>1057</span> </span><span class="COMM">/**
-<span class='line'>1058</span> * @private
-<span class='line'>1059</span> * Returns the x-coordinate of the event in a coordinate system where the
-<span class='line'>1060</span> * top-left corner of the page (not the window) is (0,0).
-<span class='line'>1061</span> * Taken from MochiKit.Signal
-<span class='line'>1062</span> */</span><span class="WHIT">
-<span class='line'>1063</span> </span><span class="NAME">Dygraph.pageX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1064</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e.pageX</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1065</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">e.pageX</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">e.pageX</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">e.pageX</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1066</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1067</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">de</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1068</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.body</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1069</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">e.clientX</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>1070</span> </span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">de.scrollLeft</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">b.scrollLeft</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT">
-<span class='line'>1071</span> </span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">de.clientLeft</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1072</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1073</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1074</span>
-<span class='line'>1075</span> </span><span class="COMM">/**
-<span class='line'>1076</span> * @private
-<span class='line'>1077</span> * Returns the y-coordinate of the event in a coordinate system where the
-<span class='line'>1078</span> * top-left corner of the page (not the window) is (0,0).
-<span class='line'>1079</span> * Taken from MochiKit.Signal
-<span class='line'>1080</span> */</span><span class="WHIT">
-<span class='line'>1081</span> </span><span class="NAME">Dygraph.pageY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1082</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e.pageY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1083</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">e.pageY</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">e.pageY</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">e.pageY</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1084</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1085</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">de</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1086</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.body</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1087</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">e.clientY</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>1088</span> </span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">de.scrollTop</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">b.scrollTop</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT">
-<span class='line'>1089</span> </span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">de.clientTop</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1090</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1091</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1092</span>
-<span class='line'>1093</span> </span><span class="COMM">/**
-<span class='line'>1094</span> * @private
-<span class='line'>1095</span> * Converts page the x-coordinate of the event to pixel x-coordinates on the
-<span class='line'>1096</span> * canvas (i.e. DOM Coords).
-<span class='line'>1097</span> */</span><span class="WHIT">
-<span class='line'>1098</span> </span><span class="NAME">Dygraph.prototype.dragGetX_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1099</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Dygraph.pageX</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">context.px</span><span class="WHIT">
-<span class='line'>1100</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1101</span>
-<span class='line'>1102</span> </span><span class="COMM">/**
-<span class='line'>1103</span> * @private
-<span class='line'>1104</span> * Converts page the y-coordinate of the event to pixel y-coordinates on the
-<span class='line'>1105</span> * canvas (i.e. DOM Coords).
-<span class='line'>1106</span> */</span><span class="WHIT">
-<span class='line'>1107</span> </span><span class="NAME">Dygraph.prototype.dragGetY_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1108</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Dygraph.pageY</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">context.py</span><span class="WHIT">
-<span class='line'>1109</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1110</span>
-<span class='line'>1111</span> </span><span class="COMM">/**
-<span class='line'>1112</span> * Called in response to an interaction model operation that
-<span class='line'>1113</span> * should start the default panning behavior.
-<span class='line'>1114</span> *
-<span class='line'>1115</span> * It's used in the default callback for "mousedown" operations.
-<span class='line'>1116</span> * Custom interaction model builders can use it to provide the default
-<span class='line'>1117</span> * panning behavior.
-<span class='line'>1118</span> *
-<span class='line'>1119</span> * @param { Event } event the event object which led to the startPan call.
-<span class='line'>1120</span> * @param { Dygraph} g The dygraph on which to act.
-<span class='line'>1121</span> * @param { Object} context The dragging context object (with
-<span class='line'>1122</span> * dragStartX/dragStartY/etc. properties). This function modifies the context.
-<span class='line'>1123</span> */</span><span class="WHIT">
-<span class='line'>1124</span> </span><span class="NAME">Dygraph.startPan</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1125</span> </span><span class="WHIT"> </span><span class="NAME">context.isPanning</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1126</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.xAxisRange</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1127</span> </span><span class="WHIT"> </span><span class="NAME">context.dateRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">xRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">xRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1128</span> </span><span class="WHIT"> </span><span class="NAME">context.initialLeftmostDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">xRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1129</span> </span><span class="WHIT"> </span><span class="NAME">context.xUnitsPerPixel</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">context.dateRange</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">g.plotter_.area.w</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1130</span>
-<span class='line'>1131</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">g.attr_</span><span class="PUNC">(</span><span class="STRN">"panEdgeFraction"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1132</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">maxXPixelsToDraw</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.width_</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">g.attr_</span><span class="PUNC">(</span><span class="STRN">"panEdgeFraction"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1133</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xExtremes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.xAxisExtremes</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// I REALLY WANT TO CALL THIS xTremes!</span><span class="WHIT">
-<span class='line'>1134</span>
-<span class='line'>1135</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">boundedLeftX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.toDomXCoord</span><span class="PUNC">(</span><span class="NAME">xExtremes</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">maxXPixelsToDraw</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1136</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">boundedRightX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.toDomXCoord</span><span class="PUNC">(</span><span class="NAME">xExtremes</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">maxXPixelsToDraw</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1137</span>
-<span class='line'>1138</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">boundedLeftDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.toDataXCoord</span><span class="PUNC">(</span><span class="NAME">boundedLeftX</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1139</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">boundedRightDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.toDataXCoord</span><span class="PUNC">(</span><span class="NAME">boundedRightX</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1140</span> </span><span class="WHIT"> </span><span class="NAME">context.boundedDates</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">boundedLeftDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">boundedRightDate</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1141</span>
-<span class='line'>1142</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">boundedValues</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1143</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">maxYPixelsToDraw</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.height_</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">g.attr_</span><span class="PUNC">(</span><span class="STRN">"panEdgeFraction"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1144</span>
-<span class='line'>1145</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">g.axes_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1146</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.axes_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1147</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">yExtremes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">axis.extremeRange</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1148</span>
-<span class='line'>1149</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">boundedTopY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.toDomYCoord</span><span class="PUNC">(</span><span class="NAME">yExtremes</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">maxYPixelsToDraw</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1150</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">boundedBottomY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.toDomYCoord</span><span class="PUNC">(</span><span class="NAME">yExtremes</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">maxYPixelsToDraw</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1151</span>
-<span class='line'>1152</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">boundedTopValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.toDataYCoord</span><span class="PUNC">(</span><span class="NAME">boundedTopY</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1153</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">boundedBottomValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.toDataYCoord</span><span class="PUNC">(</span><span class="NAME">boundedBottomY</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1154</span>
-<span class='line'>1155</span> </span><span class="WHIT"> </span><span class="NAME">boundedValues</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">boundedTopValue</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">boundedBottomValue</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1156</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1157</span> </span><span class="WHIT"> </span><span class="NAME">context.boundedValues</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">boundedValues</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1158</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1159</span>
-<span class='line'>1160</span> </span><span class="WHIT"> </span><span class="COMM">// Record the range of each y-axis at the start of the drag.</span><span class="WHIT">
-<span class='line'>1161</span> </span><span class="WHIT"> </span><span class="COMM">// If any axis has a valueRange or valueWindow, then we want a 2D pan.</span><span class="WHIT">
-<span class='line'>1162</span> </span><span class="WHIT"> </span><span class="NAME">context.is2DPan</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1163</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">g.axes_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1164</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.axes_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1165</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">yRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.yAxisRange</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1166</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(konigsberg): These values should be in |context|.</span><span class="WHIT">
-<span class='line'>1167</span> </span><span class="WHIT"> </span><span class="COMM">// In log scale, initialTopValue, dragValueRange and unitsPerPixel are log scale.</span><span class="WHIT">
-<span class='line'>1168</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">axis.logscale</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1169</span> </span><span class="WHIT"> </span><span class="NAME">axis.initialTopValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.log10</span><span class="PUNC">(</span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1170</span> </span><span class="WHIT"> </span><span class="NAME">axis.dragValueRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.log10</span><span class="PUNC">(</span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">Dygraph.log10</span><span class="PUNC">(</span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1171</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1172</span> </span><span class="WHIT"> </span><span class="NAME">axis.initialTopValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1173</span> </span><span class="WHIT"> </span><span class="NAME">axis.dragValueRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">yRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1174</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1175</span> </span><span class="WHIT"> </span><span class="NAME">axis.unitsPerPixel</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">axis.dragValueRange</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">g.plotter_.area.h</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1176</span>
-<span class='line'>1177</span> </span><span class="WHIT"> </span><span class="COMM">// While calculating axes, set 2dpan.</span><span class="WHIT">
-<span class='line'>1178</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">axis.valueWindow</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">axis.valueRange</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">context.is2DPan</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1179</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1180</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1181</span>
-<span class='line'>1182</span> </span><span class="COMM">/**
-<span class='line'>1183</span> * Called in response to an interaction model operation that
-<span class='line'>1184</span> * responds to an event that pans the view.
-<span class='line'>1185</span> *
-<span class='line'>1186</span> * It's used in the default callback for "mousemove" operations.
-<span class='line'>1187</span> * Custom interaction model builders can use it to provide the default
-<span class='line'>1188</span> * panning behavior.
-<span class='line'>1189</span> *
-<span class='line'>1190</span> * @param { Event } event the event object which led to the movePan call.
-<span class='line'>1191</span> * @param { Dygraph} g The dygraph on which to act.
-<span class='line'>1192</span> * @param { Object} context The dragging context object (with
-<span class='line'>1193</span> * dragStartX/dragStartY/etc. properties). This function modifies the context.
-<span class='line'>1194</span> */</span><span class="WHIT">
-<span class='line'>1195</span> </span><span class="NAME">Dygraph.movePan</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1196</span> </span><span class="WHIT"> </span><span class="NAME">context.dragEndX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.dragGetX_</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1197</span> </span><span class="WHIT"> </span><span class="NAME">context.dragEndY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.dragGetY_</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1198</span>
-<span class='line'>1199</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">minDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">context.initialLeftmostDate</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT">
-<span class='line'>1200</span> </span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">context.dragEndX</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">context.dragStartX</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">context.xUnitsPerPixel</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1201</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">context.boundedDates</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1202</span> </span><span class="WHIT"> </span><span class="NAME">minDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NAME">minDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context.boundedDates</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1203</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1204</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">maxDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">minDate</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">context.dateRange</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1205</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">context.boundedDates</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1206</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">maxDate</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">context.boundedDates</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1207</span> </span><span class="WHIT"> </span><span class="COMM">// Adjust minDate, and recompute maxDate.</span><span class="WHIT">
-<span class='line'>1208</span> </span><span class="WHIT"> </span><span class="NAME">minDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">minDate</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">maxDate</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">context.boundedDates</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1209</span> </span><span class="WHIT"> </span><span class="NAME">maxDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">minDate</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">context.dateRange</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1210</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1211</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1212</span>
-<span class='line'>1213</span> </span><span class="WHIT"> </span><span class="NAME">g.dateWindow_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">minDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">maxDate</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1214</span>
-<span class='line'>1215</span> </span><span class="WHIT"> </span><span class="COMM">// y-axis scaling is automatic unless this is a full 2D pan.</span><span class="WHIT">
-<span class='line'>1216</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">context.is2DPan</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1217</span> </span><span class="WHIT"> </span><span class="COMM">// Adjust each axis appropriately.</span><span class="WHIT">
-<span class='line'>1218</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">g.axes_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1219</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.axes_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1220</span>
-<span class='line'>1221</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pixelsDragged</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">context.dragEndY</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">context.dragStartY</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1222</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">unitsDragged</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pixelsDragged</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">axis.unitsPerPixel</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1223</span> </span><span class="WHIT">
-<span class='line'>1224</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">boundedValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">context.boundedValues</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">context.boundedValues</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1225</span>
-<span class='line'>1226</span> </span><span class="WHIT"> </span><span class="COMM">// In log scale, maxValue and minValue are the logs of those values.</span><span class="WHIT">
-<span class='line'>1227</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">maxValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">axis.initialTopValue</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">unitsDragged</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1228</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">boundedValue</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1229</span> </span><span class="WHIT"> </span><span class="NAME">maxValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">maxValue</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">boundedValue</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1230</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1231</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">minValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">maxValue</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">axis.dragValueRange</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1232</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">boundedValue</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1233</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">minValue</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">boundedValue</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1234</span> </span><span class="WHIT"> </span><span class="COMM">// Adjust maxValue, and recompute minValue.</span><span class="WHIT">
-<span class='line'>1235</span> </span><span class="WHIT"> </span><span class="NAME">maxValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">maxValue</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">minValue</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">boundedValue</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1236</span> </span><span class="WHIT"> </span><span class="NAME">minValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">maxValue</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">axis.dragValueRange</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1237</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1238</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1239</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">axis.logscale</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1240</span> </span><span class="WHIT"> </span><span class="NAME">axis.valueWindow</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">Math.pow</span><span class="PUNC">(</span><span class="NAME">Dygraph.LOG_SCALE</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">minValue</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1241</span> </span><span class="WHIT"> </span><span class="NAME">Math.pow</span><span class="PUNC">(</span><span class="NAME">Dygraph.LOG_SCALE</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">maxValue</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1242</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1243</span> </span><span class="WHIT"> </span><span class="NAME">axis.valueWindow</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">minValue</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">maxValue</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1244</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1245</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1246</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1247</span>
-<span class='line'>1248</span> </span><span class="WHIT"> </span><span class="NAME">g.drawGraph_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1249</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1250</span>
-<span class='line'>1251</span> </span><span class="COMM">/**
-<span class='line'>1252</span> * Called in response to an interaction model operation that
-<span class='line'>1253</span> * responds to an event that ends panning.
-<span class='line'>1254</span> *
-<span class='line'>1255</span> * It's used in the default callback for "mouseup" operations.
-<span class='line'>1256</span> * Custom interaction model builders can use it to provide the default
-<span class='line'>1257</span> * panning behavior.
-<span class='line'>1258</span> *
-<span class='line'>1259</span> * @param { Event } event the event object which led to the startZoom call.
-<span class='line'>1260</span> * @param { Dygraph} g The dygraph on which to act.
-<span class='line'>1261</span> * @param { Object} context The dragging context object (with
-<span class='line'>1262</span> * dragStartX/dragStartY/etc. properties). This function modifies the context.
-<span class='line'>1263</span> */</span><span class="WHIT">
-<span class='line'>1264</span> </span><span class="NAME">Dygraph.endPan</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1265</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(konigsberg): Clear the context data from the axis.</span><span class="WHIT">
-<span class='line'>1266</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(konigsberg): mouseup should just delete the</span><span class="WHIT">
-<span class='line'>1267</span> </span><span class="WHIT"> </span><span class="COMM">// context object, and mousedown should create a new one.</span><span class="WHIT">
-<span class='line'>1268</span> </span><span class="WHIT"> </span><span class="NAME">context.isPanning</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1269</span> </span><span class="WHIT"> </span><span class="NAME">context.is2DPan</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1270</span> </span><span class="WHIT"> </span><span class="NAME">context.initialLeftmostDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1271</span> </span><span class="WHIT"> </span><span class="NAME">context.dateRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1272</span> </span><span class="WHIT"> </span><span class="NAME">context.valueRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1273</span> </span><span class="WHIT"> </span><span class="NAME">context.boundedDates</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1274</span> </span><span class="WHIT"> </span><span class="NAME">context.boundedValues</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1275</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1276</span>
-<span class='line'>1277</span> </span><span class="COMM">/**
-<span class='line'>1278</span> * Called in response to an interaction model operation that
-<span class='line'>1279</span> * responds to an event that starts zooming.
-<span class='line'>1280</span> *
-<span class='line'>1281</span> * It's used in the default callback for "mousedown" operations.
-<span class='line'>1282</span> * Custom interaction model builders can use it to provide the default
-<span class='line'>1283</span> * zooming behavior.
-<span class='line'>1284</span> *
-<span class='line'>1285</span> * @param { Event } event the event object which led to the startZoom call.
-<span class='line'>1286</span> * @param { Dygraph} g The dygraph on which to act.
-<span class='line'>1287</span> * @param { Object} context The dragging context object (with
-<span class='line'>1288</span> * dragStartX/dragStartY/etc. properties). This function modifies the context.
-<span class='line'>1289</span> */</span><span class="WHIT">
-<span class='line'>1290</span> </span><span class="NAME">Dygraph.startZoom</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1291</span> </span><span class="WHIT"> </span><span class="NAME">context.isZooming</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1292</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1293</span>
-<span class='line'>1294</span> </span><span class="COMM">/**
-<span class='line'>1295</span> * Called in response to an interaction model operation that
-<span class='line'>1296</span> * responds to an event that defines zoom boundaries.
-<span class='line'>1297</span> *
-<span class='line'>1298</span> * It's used in the default callback for "mousemove" operations.
-<span class='line'>1299</span> * Custom interaction model builders can use it to provide the default
-<span class='line'>1300</span> * zooming behavior.
-<span class='line'>1301</span> *
-<span class='line'>1302</span> * @param { Event } event the event object which led to the moveZoom call.
-<span class='line'>1303</span> * @param { Dygraph} g The dygraph on which to act.
-<span class='line'>1304</span> * @param { Object} context The dragging context object (with
-<span class='line'>1305</span> * dragStartX/dragStartY/etc. properties). This function modifies the context.
-<span class='line'>1306</span> */</span><span class="WHIT">
-<span class='line'>1307</span> </span><span class="NAME">Dygraph.moveZoom</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1308</span> </span><span class="WHIT"> </span><span class="NAME">context.dragEndX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.dragGetX_</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1309</span> </span><span class="WHIT"> </span><span class="NAME">context.dragEndY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.dragGetY_</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1310</span>
-<span class='line'>1311</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xDelta</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.abs</span><span class="PUNC">(</span><span class="NAME">context.dragStartX</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">context.dragEndX</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1312</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">yDelta</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.abs</span><span class="PUNC">(</span><span class="NAME">context.dragStartY</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">context.dragEndY</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1313</span>
-<span class='line'>1314</span> </span><span class="WHIT"> </span><span class="COMM">// drag direction threshold for y axis is twice as large as x axis</span><span class="WHIT">
-<span class='line'>1315</span> </span><span class="WHIT"> </span><span class="NAME">context.dragDirection</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">xDelta</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">yDelta</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">Dygraph.VERTICAL</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Dygraph.HORIZONTAL</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1316</span>
-<span class='line'>1317</span> </span><span class="WHIT"> </span><span class="NAME">g.drawZoomRect_</span><span class="PUNC">(</span><span class="WHIT">
-<span class='line'>1318</span> </span><span class="WHIT"> </span><span class="NAME">context.dragDirection</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1319</span> </span><span class="WHIT"> </span><span class="NAME">context.dragStartX</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1320</span> </span><span class="WHIT"> </span><span class="NAME">context.dragEndX</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1321</span> </span><span class="WHIT"> </span><span class="NAME">context.dragStartY</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1322</span> </span><span class="WHIT"> </span><span class="NAME">context.dragEndY</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1323</span> </span><span class="WHIT"> </span><span class="NAME">context.prevDragDirection</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1324</span> </span><span class="WHIT"> </span><span class="NAME">context.prevEndX</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1325</span> </span><span class="WHIT"> </span><span class="NAME">context.prevEndY</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1326</span>
-<span class='line'>1327</span> </span><span class="WHIT"> </span><span class="NAME">context.prevEndX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">context.dragEndX</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1328</span> </span><span class="WHIT"> </span><span class="NAME">context.prevEndY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">context.dragEndY</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1329</span> </span><span class="WHIT"> </span><span class="NAME">context.prevDragDirection</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">context.dragDirection</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1330</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1331</span>
-<span class='line'>1332</span> </span><span class="COMM">/**
-<span class='line'>1333</span> * Called in response to an interaction model operation that
-<span class='line'>1334</span> * responds to an event that performs a zoom based on previously defined
-<span class='line'>1335</span> * bounds..
-<span class='line'>1336</span> *
-<span class='line'>1337</span> * It's used in the default callback for "mouseup" operations.
-<span class='line'>1338</span> * Custom interaction model builders can use it to provide the default
-<span class='line'>1339</span> * zooming behavior.
-<span class='line'>1340</span> *
-<span class='line'>1341</span> * @param { Event } event the event object which led to the endZoom call.
-<span class='line'>1342</span> * @param { Dygraph} g The dygraph on which to end the zoom.
-<span class='line'>1343</span> * @param { Object} context The dragging context object (with
-<span class='line'>1344</span> * dragStartX/dragStartY/etc. properties). This function modifies the context.
-<span class='line'>1345</span> */</span><span class="WHIT">
-<span class='line'>1346</span> </span><span class="NAME">Dygraph.endZoom</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1347</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(konigsberg): Refactor or rename this fn -- it deals with clicks, too.</span><span class="WHIT">
-<span class='line'>1348</span> </span><span class="WHIT"> </span><span class="NAME">context.isZooming</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1349</span> </span><span class="WHIT"> </span><span class="NAME">context.dragEndX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.dragGetX_</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1350</span> </span><span class="WHIT"> </span><span class="NAME">context.dragEndY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.dragGetY_</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1351</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">regionWidth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.abs</span><span class="PUNC">(</span><span class="NAME">context.dragEndX</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">context.dragStartX</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1352</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">regionHeight</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.abs</span><span class="PUNC">(</span><span class="NAME">context.dragEndY</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">context.dragStartY</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1353</span>
-<span class='line'>1354</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">regionWidth</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">regionHeight</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
-<span class='line'>1355</span> </span><span class="WHIT"> </span><span class="NAME">g.lastx_</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">g.lastx_</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1356</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): pass along more info about the points, e.g. 'x'</span><span class="WHIT">
-<span class='line'>1357</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">g.attr_</span><span class="PUNC">(</span><span class="STRN">'clickCallback'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1358</span> </span><span class="WHIT"> </span><span class="NAME">g.attr_</span><span class="PUNC">(</span><span class="STRN">'clickCallback'</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g.lastx_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g.selPoints_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1359</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1360</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">g.attr_</span><span class="PUNC">(</span><span class="STRN">'pointClickCallback'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1361</span> </span><span class="WHIT"> </span><span class="COMM">// check if the click was on a particular point.</span><span class="WHIT">
-<span class='line'>1362</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">closestIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1363</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">closestDistance</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1364</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">g.selPoints_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1365</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.selPoints_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1366</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">distance</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.pow</span><span class="PUNC">(</span><span class="NAME">p.canvasx</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">context.dragEndX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>1367</span> </span><span class="WHIT"> </span><span class="NAME">Math.pow</span><span class="PUNC">(</span><span class="NAME">p.canvasy</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">context.dragEndY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1368</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">closestIdx</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">distance</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">closestDistance</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1369</span> </span><span class="WHIT"> </span><span class="NAME">closestDistance</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">distance</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1370</span> </span><span class="WHIT"> </span><span class="NAME">closestIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1371</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1372</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1373</span>
-<span class='line'>1374</span> </span><span class="WHIT"> </span><span class="COMM">// Allow any click within two pixels of the dot.</span><span class="WHIT">
-<span class='line'>1375</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">radius</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.attr_</span><span class="PUNC">(</span><span class="STRN">'highlightCircleSize'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1376</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">closestDistance</span><span class="WHIT"> </span><span class="PUNC"><=</span><span class="WHIT"> </span><span class="NUMB">5</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">5</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1377</span> </span><span class="WHIT"> </span><span class="NAME">g.attr_</span><span class="PUNC">(</span><span class="STRN">'pointClickCallback'</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g.selPoints_</span><span class="PUNC">[</span><span class="NAME">closestIdx</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1378</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1379</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1380</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1381</span>
-<span class='line'>1382</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">regionWidth</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">context.dragDirection</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.HORIZONTAL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1383</span> </span><span class="WHIT"> </span><span class="NAME">g.doZoomX_</span><span class="PUNC">(</span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">context.dragStartX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context.dragEndX</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1384</span> </span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NAME">context.dragStartX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context.dragEndX</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1385</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">regionHeight</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">context.dragDirection</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.VERTICAL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1386</span> </span><span class="WHIT"> </span><span class="NAME">g.doZoomY_</span><span class="PUNC">(</span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">context.dragStartY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context.dragEndY</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1387</span> </span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NAME">context.dragStartY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context.dragEndY</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1388</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1389</span> </span><span class="WHIT"> </span><span class="NAME">g.canvas_ctx_.clearRect</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g.canvas_.width</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g.canvas_.height</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1390</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1391</span> </span><span class="WHIT"> </span><span class="NAME">context.dragStartX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1392</span> </span><span class="WHIT"> </span><span class="NAME">context.dragStartY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1393</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1394</span>
-<span class='line'>1395</span> </span><span class="COMM">/**
-<span class='line'>1396</span> * Default interation model for dygraphs. You can refer to specific elements of
-<span class='line'>1397</span> * this when constructing your own interaction model, e.g.:
-<span class='line'>1398</span> * g.updateOptions( {
-<span class='line'>1399</span> * interactionModel: {
-<span class='line'>1400</span> * mousedown: Dygraph.defaultInteractionModel.mousedown
-<span class='line'>1401</span> * }
-<span class='line'>1402</span> * } );
-<span class='line'>1403</span> */</span><span class="WHIT">
-<span class='line'>1404</span> </span><span class="NAME">Dygraph.defaultInteractionModel</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1405</span> </span><span class="WHIT"> </span><span class="COMM">// Track the beginning of drag events</span><span class="WHIT">
-<span class='line'>1406</span> </span><span class="WHIT"> </span><span class="NAME">mousedown</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1407</span> </span><span class="WHIT"> </span><span class="NAME">context.initializeMouseDown</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1408</span>
-<span class='line'>1409</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">event.altKey</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">event.shiftKey</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1410</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.startPan</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1411</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1412</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.startZoom</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1413</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1414</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1415</span>
-<span class='line'>1416</span> </span><span class="WHIT"> </span><span class="COMM">// Draw zoom rectangles when the mouse is down and the user moves around</span><span class="WHIT">
-<span class='line'>1417</span> </span><span class="WHIT"> </span><span class="NAME">mousemove</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1418</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">context.isZooming</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1419</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.moveZoom</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1420</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">context.isPanning</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1421</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.movePan</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1422</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1423</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1424</span>
-<span class='line'>1425</span> </span><span class="WHIT"> </span><span class="NAME">mouseup</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1426</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">context.isZooming</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1427</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.endZoom</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1428</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">context.isPanning</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1429</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.endPan</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1430</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1431</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1432</span>
-<span class='line'>1433</span> </span><span class="WHIT"> </span><span class="COMM">// Temporarily cancel the dragging event when the mouse leaves the graph</span><span class="WHIT">
-<span class='line'>1434</span> </span><span class="WHIT"> </span><span class="NAME">mouseout</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1435</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">context.isZooming</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1436</span> </span><span class="WHIT"> </span><span class="NAME">context.dragEndX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1437</span> </span><span class="WHIT"> </span><span class="NAME">context.dragEndY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1438</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1439</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1440</span>
-<span class='line'>1441</span> </span><span class="WHIT"> </span><span class="COMM">// Disable zooming out if panning.</span><span class="WHIT">
-<span class='line'>1442</span> </span><span class="WHIT"> </span><span class="NAME">dblclick</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1443</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">event.altKey</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">event.shiftKey</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1444</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1445</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1446</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(konigsberg): replace g.doUnzoom()_ with something that is</span><span class="WHIT">
-<span class='line'>1447</span> </span><span class="WHIT"> </span><span class="COMM">// friendlier to public use.</span><span class="WHIT">
-<span class='line'>1448</span> </span><span class="WHIT"> </span><span class="NAME">g.doUnzoom_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1449</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1450</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1451</span>
-<span class='line'>1452</span> </span><span class="NAME">Dygraph.DEFAULT_ATTRS.interactionModel</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.defaultInteractionModel</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1453</span>
-<span class='line'>1454</span> </span><span class="COMM">/**
-<span class='line'>1455</span> * Set up all the mouse handlers needed to capture dragging behavior for zoom
-<span class='line'>1456</span> * events.
-<span class='line'>1457</span> * @private
-<span class='line'>1458</span> */</span><span class="WHIT">
-<span class='line'>1459</span> </span><span class="NAME">Dygraph.prototype.createDragInterface_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1460</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">context</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1461</span> </span><span class="WHIT"> </span><span class="COMM">// Tracks whether the mouse is down right now</span><span class="WHIT">
-<span class='line'>1462</span> </span><span class="WHIT"> </span><span class="NAME">isZooming</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1463</span> </span><span class="WHIT"> </span><span class="NAME">isPanning</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// is this drag part of a pan?</span><span class="WHIT">
-<span class='line'>1464</span> </span><span class="WHIT"> </span><span class="NAME">is2DPan</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// if so, is that pan 1- or 2-dimensional?</span><span class="WHIT">
-<span class='line'>1465</span> </span><span class="WHIT"> </span><span class="NAME">dragStartX</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1466</span> </span><span class="WHIT"> </span><span class="NAME">dragStartY</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1467</span> </span><span class="WHIT"> </span><span class="NAME">dragEndX</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1468</span> </span><span class="WHIT"> </span><span class="NAME">dragEndY</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1469</span> </span><span class="WHIT"> </span><span class="NAME">dragDirection</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1470</span> </span><span class="WHIT"> </span><span class="NAME">prevEndX</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1471</span> </span><span class="WHIT"> </span><span class="NAME">prevEndY</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1472</span> </span><span class="WHIT"> </span><span class="NAME">prevDragDirection</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1473</span>
-<span class='line'>1474</span> </span><span class="WHIT"> </span><span class="COMM">// The value on the left side of the graph when a pan operation starts.</span><span class="WHIT">
-<span class='line'>1475</span> </span><span class="WHIT"> </span><span class="NAME">initialLeftmostDate</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1476</span>
-<span class='line'>1477</span> </span><span class="WHIT"> </span><span class="COMM">// The number of units each pixel spans. (This won't be valid for log</span><span class="WHIT">
-<span class='line'>1478</span> </span><span class="WHIT"> </span><span class="COMM">// scales)</span><span class="WHIT">
-<span class='line'>1479</span> </span><span class="WHIT"> </span><span class="NAME">xUnitsPerPixel</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1480</span>
-<span class='line'>1481</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): update this comment</span><span class="WHIT">
-<span class='line'>1482</span> </span><span class="WHIT"> </span><span class="COMM">// The range in second/value units that the viewport encompasses during a</span><span class="WHIT">
-<span class='line'>1483</span> </span><span class="WHIT"> </span><span class="COMM">// panning operation.</span><span class="WHIT">
-<span class='line'>1484</span> </span><span class="WHIT"> </span><span class="NAME">dateRange</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1485</span>
-<span class='line'>1486</span> </span><span class="WHIT"> </span><span class="COMM">// Utility function to convert page-wide coordinates to canvas coords</span><span class="WHIT">
-<span class='line'>1487</span> </span><span class="WHIT"> </span><span class="NAME">px</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1488</span> </span><span class="WHIT"> </span><span class="NAME">py</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1489</span>
-<span class='line'>1490</span> </span><span class="WHIT"> </span><span class="COMM">// Values for use with panEdgeFraction, which limit how far outside the</span><span class="WHIT">
-<span class='line'>1491</span> </span><span class="WHIT"> </span><span class="COMM">// graph's data boundaries it can be panned.</span><span class="WHIT">
-<span class='line'>1492</span> </span><span class="WHIT"> </span><span class="NAME">boundedDates</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// [minDate, maxDate]</span><span class="WHIT">
-<span class='line'>1493</span> </span><span class="WHIT"> </span><span class="NAME">boundedValues</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// [[minValue, maxValue] ...]</span><span class="WHIT">
-<span class='line'>1494</span>
-<span class='line'>1495</span> </span><span class="WHIT"> </span><span class="NAME">initializeMouseDown</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1496</span> </span><span class="WHIT"> </span><span class="COMM">// prevents mouse drags from selecting page text.</span><span class="WHIT">
-<span class='line'>1497</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">event.preventDefault</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1498</span> </span><span class="WHIT"> </span><span class="NAME">event.preventDefault</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// Firefox, Chrome, etc.</span><span class="WHIT">
-<span class='line'>1499</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1500</span> </span><span class="WHIT"> </span><span class="NAME">event.returnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// IE</span><span class="WHIT">
-<span class='line'>1501</span> </span><span class="WHIT"> </span><span class="NAME">event.cancelBubble</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1502</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1503</span>
-<span class='line'>1504</span> </span><span class="WHIT"> </span><span class="NAME">context.px</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.findPosX</span><span class="PUNC">(</span><span class="NAME">g.canvas_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1505</span> </span><span class="WHIT"> </span><span class="NAME">context.py</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.findPosY</span><span class="PUNC">(</span><span class="NAME">g.canvas_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1506</span> </span><span class="WHIT"> </span><span class="NAME">context.dragStartX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.dragGetX_</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1507</span> </span><span class="WHIT"> </span><span class="NAME">context.dragStartY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.dragGetY_</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1508</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1509</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1510</span>
-<span class='line'>1511</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">interactionModel</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"interactionModel"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1512</span>
-<span class='line'>1513</span> </span><span class="WHIT"> </span><span class="COMM">// Self is the graph.</span><span class="WHIT">
-<span class='line'>1514</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1515</span>
-<span class='line'>1516</span> </span><span class="WHIT"> </span><span class="COMM">// Function that binds the graph and context to the handler.</span><span class="WHIT">
-<span class='line'>1517</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">bindHandler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">handler</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1518</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1519</span> </span><span class="WHIT"> </span><span class="NAME">handler</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">self</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">context</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1520</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1521</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1522</span>
-<span class='line'>1523</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">eventName</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">interactionModel</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1524</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">interactionModel.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">eventName</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1525</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.addEvent</span><span class="PUNC">(</span><span class="NAME">this.mouseEventElement_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">eventName</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1526</span> </span><span class="WHIT"> </span><span class="NAME">bindHandler</span><span class="PUNC">(</span><span class="NAME">interactionModel</span><span class="PUNC">[</span><span class="NAME">eventName</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1527</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1528</span>
-<span class='line'>1529</span> </span><span class="WHIT"> </span><span class="COMM">// If the user releases the mouse button during a drag, but not over the</span><span class="WHIT">
-<span class='line'>1530</span> </span><span class="WHIT"> </span><span class="COMM">// canvas, then it doesn't count as a zooming action.</span><span class="WHIT">
-<span class='line'>1531</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.addEvent</span><span class="PUNC">(</span><span class="NAME">document</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'mouseup'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1532</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">context.isZooming</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">context.isPanning</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1533</span> </span><span class="WHIT"> </span><span class="NAME">context.isZooming</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1534</span> </span><span class="WHIT"> </span><span class="NAME">context.dragStartX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1535</span> </span><span class="WHIT"> </span><span class="NAME">context.dragStartY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1536</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1537</span>
-<span class='line'>1538</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">context.isPanning</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1539</span> </span><span class="WHIT"> </span><span class="NAME">context.isPanning</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1540</span> </span><span class="WHIT"> </span><span class="NAME">context.draggingDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1541</span> </span><span class="WHIT"> </span><span class="NAME">context.dateRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1542</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">self.axes_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1543</span> </span><span class="WHIT"> </span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">self.axes_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">draggingValue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1544</span> </span><span class="WHIT"> </span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">self.axes_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">dragValueRange</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1545</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1546</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1547</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1548</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1549</span>
-<span class='line'>1550</span>
-<span class='line'>1551</span> </span><span class="COMM">/**
-<span class='line'>1552</span> * Draw a gray zoom rectangle over the desired area of the canvas. Also clears
-<span class='line'>1553</span> * up any previous zoom rectangles that were drawn. This could be optimized to
-<span class='line'>1554</span> * avoid extra redrawing, but it's tricky to avoid interactions with the status
-<span class='line'>1555</span> * dots.
-<span class='line'>1556</span> *
-<span class='line'>1557</span> * @param {Number} direction the direction of the zoom rectangle. Acceptable
-<span class='line'>1558</span> * values are Dygraph.HORIZONTAL and Dygraph.VERTICAL.
-<span class='line'>1559</span> * @param {Number} startX The X position where the drag started, in canvas
-<span class='line'>1560</span> * coordinates.
-<span class='line'>1561</span> * @param {Number} endX The current X position of the drag, in canvas coords.
-<span class='line'>1562</span> * @param {Number} startY The Y position where the drag started, in canvas
-<span class='line'>1563</span> * coordinates.
-<span class='line'>1564</span> * @param {Number} endY The current Y position of the drag, in canvas coords.
-<span class='line'>1565</span> * @param {Number} prevDirection the value of direction on the previous call to
-<span class='line'>1566</span> * this function. Used to avoid excess redrawing
-<span class='line'>1567</span> * @param {Number} prevEndX The value of endX on the previous call to this
-<span class='line'>1568</span> * function. Used to avoid excess redrawing
-<span class='line'>1569</span> * @param {Number} prevEndY The value of endY on the previous call to this
-<span class='line'>1570</span> * function. Used to avoid excess redrawing
-<span class='line'>1571</span> * @private
-<span class='line'>1572</span> */</span><span class="WHIT">
-<span class='line'>1573</span> </span><span class="NAME">Dygraph.prototype.drawZoomRect_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">direction</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">startX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">endX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">startY</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1574</span> </span><span class="WHIT"> </span><span class="NAME">endY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">prevDirection</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">prevEndX</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1575</span> </span><span class="WHIT"> </span><span class="NAME">prevEndY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1576</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ctx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.canvas_ctx_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1577</span>
-<span class='line'>1578</span> </span><span class="WHIT"> </span><span class="COMM">// Clean up from the previous rect if necessary</span><span class="WHIT">
-<span class='line'>1579</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">prevDirection</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.HORIZONTAL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1580</span> </span><span class="WHIT"> </span><span class="NAME">ctx.clearRect</span><span class="PUNC">(</span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">startX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">prevEndX</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1581</span> </span><span class="WHIT"> </span><span class="NAME">Math.abs</span><span class="PUNC">(</span><span class="NAME">startX</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">prevEndX</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.height_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1582</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">prevDirection</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.VERTICAL</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1583</span> </span><span class="WHIT"> </span><span class="NAME">ctx.clearRect</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">startY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">prevEndY</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1584</span> </span><span class="WHIT"> </span><span class="NAME">this.width_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Math.abs</span><span class="PUNC">(</span><span class="NAME">startY</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">prevEndY</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1585</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1586</span>
-<span class='line'>1587</span> </span><span class="WHIT"> </span><span class="COMM">// Draw a light-grey rectangle to show the new viewing area</span><span class="WHIT">
-<span class='line'>1588</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">direction</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.HORIZONTAL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1589</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">endX</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">startX</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1590</span> </span><span class="WHIT"> </span><span class="NAME">ctx.fillStyle</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"rgba(128,128,128,0.33)"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1591</span> </span><span class="WHIT"> </span><span class="NAME">ctx.fillRect</span><span class="PUNC">(</span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">startX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">endX</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1592</span> </span><span class="WHIT"> </span><span class="NAME">Math.abs</span><span class="PUNC">(</span><span class="NAME">endX</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">startX</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.height_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1593</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1594</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1595</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">direction</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.VERTICAL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1596</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">endY</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">startY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1597</span> </span><span class="WHIT"> </span><span class="NAME">ctx.fillStyle</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"rgba(128,128,128,0.33)"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1598</span> </span><span class="WHIT"> </span><span class="NAME">ctx.fillRect</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">startY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">endY</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1599</span> </span><span class="WHIT"> </span><span class="NAME">this.width_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Math.abs</span><span class="PUNC">(</span><span class="NAME">endY</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">startY</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1600</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1601</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1602</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1603</span>
-<span class='line'>1604</span> </span><span class="COMM">/**
-<span class='line'>1605</span> * Zoom to something containing [lowX, highX]. These are pixel coordinates in
-<span class='line'>1606</span> * the canvas. The exact zoom window may be slightly larger if there are no data
-<span class='line'>1607</span> * points near lowX or highX. Don't confuse this function with doZoomXDates,
-<span class='line'>1608</span> * which accepts dates that match the raw data. This function redraws the graph.
-<span class='line'>1609</span> *
-<span class='line'>1610</span> * @param {Number} lowX The leftmost pixel value that should be visible.
-<span class='line'>1611</span> * @param {Number} highX The rightmost pixel value that should be visible.
-<span class='line'>1612</span> * @private
-<span class='line'>1613</span> */</span><span class="WHIT">
-<span class='line'>1614</span> </span><span class="NAME">Dygraph.prototype.doZoomX_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">lowX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">highX</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1615</span> </span><span class="WHIT"> </span><span class="COMM">// Find the earliest and latest dates contained in this canvasx range.</span><span class="WHIT">
-<span class='line'>1616</span> </span><span class="WHIT"> </span><span class="COMM">// Convert the call to date ranges of the raw data.</span><span class="WHIT">
-<span class='line'>1617</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">minDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.toDataXCoord</span><span class="PUNC">(</span><span class="NAME">lowX</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1618</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">maxDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.toDataXCoord</span><span class="PUNC">(</span><span class="NAME">highX</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1619</span> </span><span class="WHIT"> </span><span class="NAME">this.doZoomXDates_</span><span class="PUNC">(</span><span class="NAME">minDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">maxDate</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1620</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1621</span>
-<span class='line'>1622</span> </span><span class="COMM">/**
-<span class='line'>1623</span> * Zoom to something containing [minDate, maxDate] values. Don't confuse this
-<span class='line'>1624</span> * method with doZoomX which accepts pixel coordinates. This function redraws
-<span class='line'>1625</span> * the graph.
-<span class='line'>1626</span> *
-<span class='line'>1627</span> * @param {Number} minDate The minimum date that should be visible.
-<span class='line'>1628</span> * @param {Number} maxDate The maximum date that should be visible.
-<span class='line'>1629</span> * @private
-<span class='line'>1630</span> */</span><span class="WHIT">
-<span class='line'>1631</span> </span><span class="NAME">Dygraph.prototype.doZoomXDates_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">minDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">maxDate</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1632</span> </span><span class="WHIT"> </span><span class="NAME">this.dateWindow_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">minDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">maxDate</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1633</span> </span><span class="WHIT"> </span><span class="NAME">this.zoomed_x_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1634</span> </span><span class="WHIT"> </span><span class="NAME">this.drawGraph_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1635</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"zoomCallback"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1636</span> </span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"zoomCallback"</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">minDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">maxDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.yAxisRanges</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1637</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1638</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1639</span>
-<span class='line'>1640</span> </span><span class="COMM">/**
-<span class='line'>1641</span> * Zoom to something containing [lowY, highY]. These are pixel coordinates in
-<span class='line'>1642</span> * the canvas. This function redraws the graph.
-<span class='line'>1643</span> *
-<span class='line'>1644</span> * @param {Number} lowY The topmost pixel value that should be visible.
-<span class='line'>1645</span> * @param {Number} highY The lowest pixel value that should be visible.
-<span class='line'>1646</span> * @private
-<span class='line'>1647</span> */</span><span class="WHIT">
-<span class='line'>1648</span> </span><span class="NAME">Dygraph.prototype.doZoomY_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">lowY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">highY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1649</span> </span><span class="WHIT"> </span><span class="COMM">// Find the highest and lowest values in pixel range for each axis.</span><span class="WHIT">
-<span class='line'>1650</span> </span><span class="WHIT"> </span><span class="COMM">// Note that lowY (in pixels) corresponds to the max Value (in data coords).</span><span class="WHIT">
-<span class='line'>1651</span> </span><span class="WHIT"> </span><span class="COMM">// This is because pixels increase as you go down on the screen, whereas data</span><span class="WHIT">
-<span class='line'>1652</span> </span><span class="WHIT"> </span><span class="COMM">// coordinates increase as you go up the screen.</span><span class="WHIT">
-<span class='line'>1653</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">valueRanges</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1654</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.axes_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1655</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hi</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.toDataYCoord</span><span class="PUNC">(</span><span class="NAME">lowY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1656</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">low</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.toDataYCoord</span><span class="PUNC">(</span><span class="NAME">highY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1657</span> </span><span class="WHIT"> </span><span class="NAME">this.axes_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">valueWindow</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">low</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hi</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1658</span> </span><span class="WHIT"> </span><span class="NAME">valueRanges.push</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="NAME">low</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hi</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1659</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1660</span>
-<span class='line'>1661</span> </span><span class="WHIT"> </span><span class="NAME">this.zoomed_y_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1662</span> </span><span class="WHIT"> </span><span class="NAME">this.drawGraph_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1663</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"zoomCallback"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1664</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.xAxisRange</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1665</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">yRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.yAxisRange</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1666</span> </span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"zoomCallback"</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">xRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">xRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.yAxisRanges</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1667</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1668</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1669</span>
-<span class='line'>1670</span> </span><span class="COMM">/**
-<span class='line'>1671</span> * Reset the zoom to the original view coordinates. This is the same as
-<span class='line'>1672</span> * double-clicking on the graph.
-<span class='line'>1673</span> *
-<span class='line'>1674</span> * @private
-<span class='line'>1675</span> */</span><span class="WHIT">
-<span class='line'>1676</span> </span><span class="NAME">Dygraph.prototype.doUnzoom_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1677</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dirty</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1678</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.dateWindow_</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1679</span> </span><span class="WHIT"> </span><span class="NAME">dirty</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1680</span> </span><span class="WHIT"> </span><span class="NAME">this.dateWindow_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1681</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1682</span>
-<span class='line'>1683</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.axes_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1684</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.axes_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">valueWindow</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1685</span> </span><span class="WHIT"> </span><span class="NAME">dirty</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1686</span> </span><span class="WHIT"> </span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">this.axes_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">valueWindow</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1687</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1688</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1689</span>
-<span class='line'>1690</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dirty</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1691</span> </span><span class="WHIT"> </span><span class="COMM">// Putting the drawing operation before the callback because it resets</span><span class="WHIT">
-<span class='line'>1692</span> </span><span class="WHIT"> </span><span class="COMM">// yAxisRange.</span><span class="WHIT">
-<span class='line'>1693</span> </span><span class="WHIT"> </span><span class="NAME">this.zoomed_x_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1694</span> </span><span class="WHIT"> </span><span class="NAME">this.zoomed_y_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1695</span> </span><span class="WHIT"> </span><span class="NAME">this.drawGraph_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1696</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"zoomCallback"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1697</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">minDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.rawData_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1698</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">maxDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.rawData_</span><span class="PUNC">[</span><span class="NAME">this.rawData_.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1699</span> </span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"zoomCallback"</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">minDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">maxDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.yAxisRanges</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1700</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1701</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1702</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1703</span>
-<span class='line'>1704</span> </span><span class="COMM">/**
-<span class='line'>1705</span> * When the mouse moves in the canvas, display information about a nearby data
-<span class='line'>1706</span> * point and draw dots over those points in the data series. This function
-<span class='line'>1707</span> * takes care of cleanup of previously-drawn dots.
-<span class='line'>1708</span> * @param {Object} event The mousemove event from the browser.
-<span class='line'>1709</span> * @private
-<span class='line'>1710</span> */</span><span class="WHIT">
-<span class='line'>1711</span> </span><span class="NAME">Dygraph.prototype.mouseMove_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1712</span> </span><span class="WHIT"> </span><span class="COMM">// This prevents JS errors when mousing over the canvas before data loads.</span><span class="WHIT">
-<span class='line'>1713</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">points</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.layout_.points</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1714</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">points</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1715</span>
-<span class='line'>1716</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">canvasx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.pageX</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">Dygraph.findPosX</span><span class="PUNC">(</span><span class="NAME">this.mouseEventElement_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1717</span>
-<span class='line'>1718</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">lastx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1719</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">lasty</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1720</span>
-<span class='line'>1721</span> </span><span class="WHIT"> </span><span class="COMM">// Loop through all the points and find the date nearest to our current</span><span class="WHIT">
-<span class='line'>1722</span> </span><span class="WHIT"> </span><span class="COMM">// location.</span><span class="WHIT">
-<span class='line'>1723</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">minDist</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="NAME">e</span><span class="PUNC">+</span><span class="NUMB">100</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1724</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1725</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">points.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1726</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">point</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">points</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1727</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">point</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1728</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dist</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.abs</span><span class="PUNC">(</span><span class="NAME">point.canvasx</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">canvasx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1729</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dist</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">minDist</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1730</span> </span><span class="WHIT"> </span><span class="NAME">minDist</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dist</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1731</span> </span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1732</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1733</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">lastx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">points</span><span class="PUNC">[</span><span class="NAME">idx</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">xval</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1734</span>
-<span class='line'>1735</span> </span><span class="WHIT"> </span><span class="COMM">// Extract the points we've selected</span><span class="WHIT">
-<span class='line'>1736</span> </span><span class="WHIT"> </span><span class="NAME">this.selPoints_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1737</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">l</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">points.length</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1738</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"stackedGraph"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1739</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">l</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1740</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">points</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">xval</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">lastx</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1741</span> </span><span class="WHIT"> </span><span class="NAME">this.selPoints_.push</span><span class="PUNC">(</span><span class="NAME">points</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1742</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1743</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1744</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1745</span> </span><span class="WHIT"> </span><span class="COMM">// Need to 'unstack' points starting from the bottom</span><span class="WHIT">
-<span class='line'>1746</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">cumulative_sum</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1747</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">l</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">--</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1748</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">points</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">xval</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">lastx</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1749</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// Clone the point since we modify it</span><span class="WHIT">
-<span class='line'>1750</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">k</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">points</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1751</span> </span><span class="WHIT"> </span><span class="NAME">p</span><span class="PUNC">[</span><span class="NAME">k</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">points</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">k</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1752</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1753</span> </span><span class="WHIT"> </span><span class="NAME">p.yval</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">cumulative_sum</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1754</span> </span><span class="WHIT"> </span><span class="NAME">cumulative_sum</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">p.yval</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1755</span> </span><span class="WHIT"> </span><span class="NAME">this.selPoints_.push</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1756</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1757</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1758</span> </span><span class="WHIT"> </span><span class="NAME">this.selPoints_.reverse</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1759</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1760</span>
-<span class='line'>1761</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"highlightCallback"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1762</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">px</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.lastx_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1763</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">px</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">lastx</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">px</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1764</span> </span><span class="WHIT"> </span><span class="COMM">// only fire if the selected point has changed.</span><span class="WHIT">
-<span class='line'>1765</span> </span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"highlightCallback"</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">lastx</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.selPoints_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.idxToRow_</span><span class="PUNC">(</span><span class="NAME">idx</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1766</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1767</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1768</span>
-<span class='line'>1769</span> </span><span class="WHIT"> </span><span class="COMM">// Save last x position for callbacks.</span><span class="WHIT">
-<span class='line'>1770</span> </span><span class="WHIT"> </span><span class="NAME">this.lastx_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">lastx</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1771</span>
-<span class='line'>1772</span> </span><span class="WHIT"> </span><span class="NAME">this.updateSelection_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1773</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1774</span>
-<span class='line'>1775</span> </span><span class="COMM">/**
-<span class='line'>1776</span> * Transforms layout_.points index into data row number.
-<span class='line'>1777</span> * @param int layout_.points index
-<span class='line'>1778</span> * @return int row number, or -1 if none could be found.
-<span class='line'>1779</span> * @private
-<span class='line'>1780</span> */</span><span class="WHIT">
-<span class='line'>1781</span> </span><span class="NAME">Dygraph.prototype.idxToRow_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">idx</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1782</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1783</span>
-<span class='line'>1784</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">this.layout_.datasets</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1785</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.layout_.datasets</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1786</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.boundaryIds_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">+</span><span class="NAME">idx</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1787</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1788</span> </span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.layout_.datasets</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1789</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1790</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1791</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1792</span>
-<span class='line'>1793</span> </span><span class="COMM">/**
-<span class='line'>1794</span> * @private
-<span class='line'>1795</span> * @param { Number } x The number to consider.
-<span class='line'>1796</span> * @return { Boolean } Whether the number is zero or NaN.
-<span class='line'>1797</span> */</span><span class="WHIT">
-<span class='line'>1798</span> </span><span class="COMM">// TODO(danvk): rename this function to something like 'isNonZeroNan'.</span><span class="WHIT">
-<span class='line'>1799</span> </span><span class="NAME">Dygraph.isOK</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1800</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">isNaN</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1801</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1802</span>
-<span class='line'>1803</span> </span><span class="COMM">/**
-<span class='line'>1804</span> * @private
-<span class='line'>1805</span> * Generates HTML for the legend which is displayed when hovering over the
-<span class='line'>1806</span> * chart. If no selected points are specified, a default legend is returned
-<span class='line'>1807</span> * (this may just be the empty string).
-<span class='line'>1808</span> * @param { Number } [x] The x-value of the selected points.
-<span class='line'>1809</span> * @param { [Object] } [sel_points] List of selected points for the given
-<span class='line'>1810</span> * x-value. Should have properties like 'name', 'yval' and 'canvasy'.
-<span class='line'>1811</span> */</span><span class="WHIT">
-<span class='line'>1812</span> </span><span class="NAME">Dygraph.prototype.generateLegendHTML_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sel_points</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1813</span> </span><span class="WHIT"> </span><span class="COMM">// If no points are selected, we display a default legend. Traditionally,</span><span class="WHIT">
-<span class='line'>1814</span> </span><span class="WHIT"> </span><span class="COMM">// this has been blank. But a better default would be a conventional legend,</span><span class="WHIT">
-<span class='line'>1815</span> </span><span class="WHIT"> </span><span class="COMM">// which provides essential information for a non-interactive chart.</span><span class="WHIT">
-<span class='line'>1816</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1817</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'legend'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'always'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1818</span>
-<span class='line'>1819</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sepLines</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'labelsSeparateLines'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1820</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">labels</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'labels'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1821</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">html</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1822</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">labels.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1823</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.visibility</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">[</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1824</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">c</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.plotter_.colors</span><span class="PUNC">[</span><span class="NAME">labels</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1825</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">html</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">html</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">sepLines</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'<br/>'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">' '</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1826</span> </span><span class="WHIT"> </span><span class="NAME">html</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"<b><span style='color: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">c</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">";'>—"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">labels</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>1827</span> </span><span class="WHIT"> </span><span class="STRN">"</span></b>"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1828</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1829</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">html</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1830</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1831</span>
-<span class='line'>1832</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">html</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'xValueFormatter'</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">":"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1833</span>
-<span class='line'>1834</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">fmtFunc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'yValueFormatter'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1835</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">showZeros</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"labelsShowZeroValues"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1836</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sepLines</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"labelsSeparateLines"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1837</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.selPoints_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1838</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.selPoints_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1839</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pt.yval</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">showZeros</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1840</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">Dygraph.isOK</span><span class="PUNC">(</span><span class="NAME">pt.canvasy</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1841</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">sepLines</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">html</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"<br/>"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1842</span>
-<span class='line'>1843</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">c</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.plotter_.colors</span><span class="PUNC">[</span><span class="NAME">pt.name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1844</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">yval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">fmtFunc</span><span class="PUNC">(</span><span class="NAME">pt.yval</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1845</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): use a template string here and make it an attribute.</span><span class="WHIT">
-<span class='line'>1846</span> </span><span class="WHIT"> </span><span class="NAME">html</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">" <b><span style='color: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">c</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">";'>"</span><span class="WHIT">
-<span class='line'>1847</span> </span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">pt.name</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"</span></b>:"</span><span class="WHIT">
-<span class='line'>1848</span> </span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">yval</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1849</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1850</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">html</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1851</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1852</span>
-<span class='line'>1853</span> </span><span class="COMM">/**
-<span class='line'>1854</span> * @private
-<span class='line'>1855</span> * Displays information about the selected points in the legend. If there is no
-<span class='line'>1856</span> * selection, the legend will be cleared.
-<span class='line'>1857</span> * @param { Number } [x] The x-value of the selected points.
-<span class='line'>1858</span> * @param { [Object] } [sel_points] List of selected points for the given
-<span class='line'>1859</span> * x-value. Should have properties like 'name', 'yval' and 'canvasy'.
-<span class='line'>1860</span> */</span><span class="WHIT">
-<span class='line'>1861</span> </span><span class="NAME">Dygraph.prototype.setLegendHTML_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sel_points</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1862</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">html</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.generateLegendHTML_</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sel_points</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1863</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">labelsDiv</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"labelsDiv"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1864</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">labelsDiv</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1865</span> </span><span class="WHIT"> </span><span class="NAME">labelsDiv.innerHTML</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">html</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1866</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1867</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">this.shown_legend_error_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1868</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">'labelsDiv is set to something nonexistent; legend will not be shown.'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1869</span> </span><span class="WHIT"> </span><span class="NAME">this.shown_legend_error_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1870</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1871</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1872</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1873</span>
-<span class='line'>1874</span> </span><span class="COMM">/**
-<span class='line'>1875</span> * Draw dots over the selectied points in the data series. This function
-<span class='line'>1876</span> * takes care of cleanup of previously-drawn dots.
-<span class='line'>1877</span> * @private
-<span class='line'>1878</span> */</span><span class="WHIT">
-<span class='line'>1879</span> </span><span class="NAME">Dygraph.prototype.updateSelection_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1880</span> </span><span class="WHIT"> </span><span class="COMM">// Clear the previously drawn vertical, if there is one</span><span class="WHIT">
-<span class='line'>1881</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ctx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.canvas_ctx_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1882</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.previousVerticalX_</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1883</span> </span><span class="WHIT"> </span><span class="COMM">// Determine the maximum highlight circle size.</span><span class="WHIT">
-<span class='line'>1884</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">maxCircleSize</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1885</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">labels</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'labels'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1886</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">labels.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1887</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">r</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'highlightCircleSize'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">labels</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1888</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">r</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">maxCircleSize</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">maxCircleSize</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">r</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1889</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1890</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">px</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.previousVerticalX_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1891</span> </span><span class="WHIT"> </span><span class="NAME">ctx.clearRect</span><span class="PUNC">(</span><span class="NAME">px</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">maxCircleSize</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>1892</span> </span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">maxCircleSize</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.height_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1893</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1894</span>
-<span class='line'>1895</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.selPoints_.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1896</span> </span><span class="WHIT"> </span><span class="COMM">// Set the status message to indicate the selected point(s)</span><span class="WHIT">
-<span class='line'>1897</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'showLabelsOnHighlight'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1898</span> </span><span class="WHIT"> </span><span class="NAME">this.setLegendHTML_</span><span class="PUNC">(</span><span class="NAME">this.lastx_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.selPoints_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1899</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1900</span>
-<span class='line'>1901</span> </span><span class="WHIT"> </span><span class="COMM">// Draw colored circles over the center of each selected point</span><span class="WHIT">
-<span class='line'>1902</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">canvasx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.selPoints_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">canvasx</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1903</span> </span><span class="WHIT"> </span><span class="NAME">ctx.save</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1904</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.selPoints_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1905</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.selPoints_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1906</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">Dygraph.isOK</span><span class="PUNC">(</span><span class="NAME">pt.canvasy</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1907</span>
-<span class='line'>1908</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">circleSize</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'highlightCircleSize'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">pt.name</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1909</span> </span><span class="WHIT"> </span><span class="NAME">ctx.beginPath</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1910</span> </span><span class="WHIT"> </span><span class="NAME">ctx.fillStyle</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.plotter_.colors</span><span class="PUNC">[</span><span class="NAME">pt.name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1911</span> </span><span class="WHIT"> </span><span class="NAME">ctx.arc</span><span class="PUNC">(</span><span class="NAME">canvasx</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">pt.canvasy</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">circleSize</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">Math.PI</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1912</span> </span><span class="WHIT"> </span><span class="NAME">ctx.fill</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1913</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1914</span> </span><span class="WHIT"> </span><span class="NAME">ctx.restore</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1915</span>
-<span class='line'>1916</span> </span><span class="WHIT"> </span><span class="NAME">this.previousVerticalX_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">canvasx</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1917</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1918</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1919</span>
-<span class='line'>1920</span> </span><span class="COMM">/**
-<span class='line'>1921</span> * Manually set the selected points and display information about them in the
-<span class='line'>1922</span> * legend. The selection can be cleared using clearSelection() and queried
-<span class='line'>1923</span> * using getSelection().
-<span class='line'>1924</span> * @param { Integer } row number that should be highlighted (i.e. appear with
-<span class='line'>1925</span> * hover dots on the chart). Set to false to clear any selection.
-<span class='line'>1926</span> */</span><span class="WHIT">
-<span class='line'>1927</span> </span><span class="NAME">Dygraph.prototype.setSelection</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">row</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1928</span> </span><span class="WHIT"> </span><span class="COMM">// Extract the points we've selected</span><span class="WHIT">
-<span class='line'>1929</span> </span><span class="WHIT"> </span><span class="NAME">this.selPoints_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1930</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pos</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1931</span>
-<span class='line'>1932</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">row</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1933</span> </span><span class="WHIT"> </span><span class="NAME">row</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">row</span><span class="PUNC">-</span><span class="NAME">this.boundaryIds_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1934</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1935</span>
-<span class='line'>1936</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">row</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">row</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1937</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">this.layout_.datasets</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1938</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">row</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.layout_.datasets</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1939</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">point</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.layout_.points</span><span class="PUNC">[</span><span class="NAME">pos</span><span class="PUNC">+</span><span class="NAME">row</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1940</span> </span><span class="WHIT">
-<span class='line'>1941</span> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"stackedGraph"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1942</span> </span><span class="WHIT"> </span><span class="NAME">point</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.layout_.unstackPointAtIndex</span><span class="PUNC">(</span><span class="NAME">pos</span><span class="PUNC">+</span><span class="NAME">row</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1943</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1944</span> </span><span class="WHIT">
-<span class='line'>1945</span> </span><span class="NAME">this.selPoints_.push</span><span class="PUNC">(</span><span class="NAME">point</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1946</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1947</span> </span><span class="WHIT"> </span><span class="NAME">pos</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.layout_.datasets</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1948</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1949</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1950</span>
-<span class='line'>1951</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.selPoints_.length</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1952</span> </span><span class="WHIT"> </span><span class="NAME">this.lastx_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.selPoints_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">xval</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1953</span> </span><span class="WHIT"> </span><span class="NAME">this.updateSelection_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1954</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1955</span> </span><span class="WHIT"> </span><span class="NAME">this.clearSelection</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1956</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1957</span>
-<span class='line'>1958</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1959</span>
-<span class='line'>1960</span> </span><span class="COMM">/**
-<span class='line'>1961</span> * The mouse has left the canvas. Clear out whatever artifacts remain
-<span class='line'>1962</span> * @param {Object} event the mouseout event from the browser.
-<span class='line'>1963</span> * @private
-<span class='line'>1964</span> */</span><span class="WHIT">
-<span class='line'>1965</span> </span><span class="NAME">Dygraph.prototype.mouseOut_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1966</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"unhighlightCallback"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1967</span> </span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"unhighlightCallback"</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1968</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1969</span>
-<span class='line'>1970</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"hideOverlayOnMouseOut"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1971</span> </span><span class="WHIT"> </span><span class="NAME">this.clearSelection</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1972</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1973</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1974</span>
-<span class='line'>1975</span> </span><span class="COMM">/**
-<span class='line'>1976</span> * Clears the current selection (i.e. points that were highlighted by moving
-<span class='line'>1977</span> * the mouse over the chart).
-<span class='line'>1978</span> */</span><span class="WHIT">
-<span class='line'>1979</span> </span><span class="NAME">Dygraph.prototype.clearSelection</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1980</span> </span><span class="WHIT"> </span><span class="COMM">// Get rid of the overlay data</span><span class="WHIT">
-<span class='line'>1981</span> </span><span class="WHIT"> </span><span class="NAME">this.canvas_ctx_.clearRect</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.width_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.height_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1982</span> </span><span class="WHIT"> </span><span class="NAME">this.setLegendHTML_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1983</span> </span><span class="WHIT"> </span><span class="NAME">this.selPoints_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1984</span> </span><span class="WHIT"> </span><span class="NAME">this.lastx_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1985</span> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1986</span>
-<span class='line'>1987</span> </span><span class="COMM">/**
-<span class='line'>1988</span> * Returns the number of the currently selected row. To get data for this row,
-<span class='line'>1989</span> * you can use the getValue method.
-<span class='line'>1990</span> * @return { Integer } row number, or -1 if nothing is selected
-<span class='line'>1991</span> */</span><span class="WHIT">
-<span class='line'>1992</span> </span><span class="NAME">Dygraph.prototype.getSelection</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1993</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.selPoints_</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.selPoints_.length</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1994</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>1995</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>1996</span>
-<span class='line'>1997</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">row</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">row</span><span class="PUNC"><</span><span class="NAME">this.layout_.points.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">row</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1998</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.layout_.points</span><span class="PUNC">[</span><span class="NAME">row</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">this.selPoints_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>1999</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">row</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.boundaryIds_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2000</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2001</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2002</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2003</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2004</span>
-<span class='line'>2005</span> </span><span class="COMM">/**
-<span class='line'>2006</span> * Number formatting function which mimicks the behavior of %g in printf, i.e.
-<span class='line'>2007</span> * either exponential or fixed format (without trailing 0s) is used depending on
-<span class='line'>2008</span> * the length of the generated string. The advantage of this format is that
-<span class='line'>2009</span> * there is a predictable upper bound on the resulting string length,
-<span class='line'>2010</span> * significant figures are not dropped, and normal numbers are not displayed in
-<span class='line'>2011</span> * exponential notation.
-<span class='line'>2012</span> *
-<span class='line'>2013</span> * NOTE: JavaScript's native toPrecision() is NOT a drop-in replacement for %g.
-<span class='line'>2014</span> * It creates strings which are too long for absolute values between 10^-4 and
-<span class='line'>2015</span> * 10^-6, e.g. '0.00001' instead of '1e-5'. See tests/number-format.html for
-<span class='line'>2016</span> * output examples.
-<span class='line'>2017</span> *
-<span class='line'>2018</span> * @param {Number} x The number to format
-<span class='line'>2019</span> * @param {Number} opt_precision The precision to use, default 2.
-<span class='line'>2020</span> * @return {String} A string formatted like %g in printf. The max generated
-<span class='line'>2021</span> * string length should be precision + 6 (e.g 1.123e+300).
-<span class='line'>2022</span> */</span><span class="WHIT">
-<span class='line'>2023</span> </span><span class="NAME">Dygraph.floatFormat</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">opt_precision</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2024</span> </span><span class="WHIT"> </span><span class="COMM">// Avoid invalid precision values; [1, 21] is the valid range.</span><span class="WHIT">
-<span class='line'>2025</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">opt_precision</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">21</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2026</span>
-<span class='line'>2027</span> </span><span class="WHIT"> </span><span class="COMM">// This is deceptively simple. The actual algorithm comes from:</span><span class="WHIT">
-<span class='line'>2028</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
-<span class='line'>2029</span> </span><span class="WHIT"> </span><span class="COMM">// Max allowed length = p + 4</span><span class="WHIT">
-<span class='line'>2030</span> </span><span class="WHIT"> </span><span class="COMM">// where 4 comes from 'e+n' and '.'.</span><span class="WHIT">
-<span class='line'>2031</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
-<span class='line'>2032</span> </span><span class="WHIT"> </span><span class="COMM">// Length of fixed format = 2 + y + p</span><span class="WHIT">
-<span class='line'>2033</span> </span><span class="WHIT"> </span><span class="COMM">// where 2 comes from '0.' and y = # of leading zeroes.</span><span class="WHIT">
-<span class='line'>2034</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
-<span class='line'>2035</span> </span><span class="WHIT"> </span><span class="COMM">// Equating the two and solving for y yields y = 2, or 0.00xxxx which is</span><span class="WHIT">
-<span class='line'>2036</span> </span><span class="WHIT"> </span><span class="COMM">// 1.0e-3.</span><span class="WHIT">
-<span class='line'>2037</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
-<span class='line'>2038</span> </span><span class="WHIT"> </span><span class="COMM">// Since the behavior of toPrecision() is identical for larger numbers, we</span><span class="WHIT">
-<span class='line'>2039</span> </span><span class="WHIT"> </span><span class="COMM">// don't have to worry about the other bound.</span><span class="WHIT">
-<span class='line'>2040</span> </span><span class="WHIT"> </span><span class="COMM">//</span><span class="WHIT">
-<span class='line'>2041</span> </span><span class="WHIT"> </span><span class="COMM">// Finally, the argument for toExponential() is the number of trailing digits,</span><span class="WHIT">
-<span class='line'>2042</span> </span><span class="WHIT"> </span><span class="COMM">// so we take off 1 for the value before the '.'.</span><span class="WHIT">
-<span class='line'>2043</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">Math.abs</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">1.0</span><span class="NAME">e</span><span class="PUNC">-</span><span class="NUMB">3</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NUMB">0.0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">
-<span class='line'>2044</span> </span><span class="WHIT"> </span><span class="NAME">x.toExponential</span><span class="PUNC">(</span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">x.toPrecision</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2045</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2046</span>
-<span class='line'>2047</span> </span><span class="COMM">/**
-<span class='line'>2048</span> * @private
-<span class='line'>2049</span> * Return a string version of a number. This respects the digitsAfterDecimal
-<span class='line'>2050</span> * and maxNumberWidth options.
-<span class='line'>2051</span> * @param {Number} x The number to be formatted
-<span class='line'>2052</span> * @param {Dygraph} g The dygraph object
-<span class='line'>2053</span> */</span><span class="WHIT">
-<span class='line'>2054</span> </span><span class="NAME">Dygraph.numberFormatter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2055</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sigFigs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.attr_</span><span class="PUNC">(</span><span class="STRN">'sigFigs'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2056</span>
-<span class='line'>2057</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">sigFigs</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2058</span> </span><span class="WHIT"> </span><span class="COMM">// User has opted for a fixed number of significant figures.</span><span class="WHIT">
-<span class='line'>2059</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Dygraph.floatFormat</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sigFigs</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2060</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2061</span>
-<span class='line'>2062</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">digits</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.attr_</span><span class="PUNC">(</span><span class="STRN">'digitsAfterDecimal'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2063</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">maxNumberWidth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">g.attr_</span><span class="PUNC">(</span><span class="STRN">'maxNumberWidth'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2064</span>
-<span class='line'>2065</span> </span><span class="WHIT"> </span><span class="COMM">// switch to scientific notation if we underflow or overflow fixed display.</span><span class="WHIT">
-<span class='line'>2066</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NUMB">0.0</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
-<span class='line'>2067</span> </span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">Math.abs</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NAME">Math.pow</span><span class="PUNC">(</span><span class="NUMB">10</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">maxNumberWidth</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
-<span class='line'>2068</span> </span><span class="WHIT"> </span><span class="NAME">Math.abs</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">Math.pow</span><span class="PUNC">(</span><span class="NUMB">10</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NAME">digits</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2069</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">x.toExponential</span><span class="PUNC">(</span><span class="NAME">digits</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2070</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2071</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">''</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">Dygraph.round_</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">digits</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2072</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2073</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2074</span>
-<span class='line'>2075</span> </span><span class="COMM">/**
-<span class='line'>2076</span> * @private
-<span class='line'>2077</span> * Converts '9' to '09' (useful for dates)
-<span class='line'>2078</span> */</span><span class="WHIT">
-<span class='line'>2079</span> </span><span class="NAME">Dygraph.zeropad</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2080</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"0"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">x</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">""</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">x</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2081</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2082</span>
-<span class='line'>2083</span> </span><span class="COMM">/**
-<span class='line'>2084</span> * Return a string version of the hours, minutes and seconds portion of a date.
-<span class='line'>2085</span> * @param {Number} date The JavaScript date (ms since epoch)
-<span class='line'>2086</span> * @return {String} A time of the form "HH:MM:SS"
-<span class='line'>2087</span> * @private
-<span class='line'>2088</span> */</span><span class="WHIT">
-<span class='line'>2089</span> </span><span class="NAME">Dygraph.hmsString_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">date</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2090</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">zeropad</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.zeropad</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2091</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">d</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Date</span><span class="PUNC">(</span><span class="NAME">date</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2092</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">d.getSeconds</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2093</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">zeropad</span><span class="PUNC">(</span><span class="NAME">d.getHours</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">":"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>2094</span> </span><span class="WHIT"> </span><span class="NAME">zeropad</span><span class="PUNC">(</span><span class="NAME">d.getMinutes</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">":"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>2095</span> </span><span class="WHIT"> </span><span class="NAME">zeropad</span><span class="PUNC">(</span><span class="NAME">d.getSeconds</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2096</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2097</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">zeropad</span><span class="PUNC">(</span><span class="NAME">d.getHours</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">":"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">zeropad</span><span class="PUNC">(</span><span class="NAME">d.getMinutes</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2098</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2099</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2100</span>
-<span class='line'>2101</span> </span><span class="COMM">/**
-<span class='line'>2102</span> * Convert a JS date to a string appropriate to display on an axis that
-<span class='line'>2103</span> * is displaying values at the stated granularity.
-<span class='line'>2104</span> * @param {Date} date The date to format
-<span class='line'>2105</span> * @param {Number} granularity One of the Dygraph granularity constants
-<span class='line'>2106</span> * @return {String} The formatted date
-<span class='line'>2107</span> * @private
-<span class='line'>2108</span> */</span><span class="WHIT">
-<span class='line'>2109</span> </span><span class="NAME">Dygraph.dateAxisFormatter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">date</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">granularity</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2110</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NAME">Dygraph.DECADAL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2111</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">date.strftime</span><span class="PUNC">(</span><span class="STRN">'%Y'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2112</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NAME">Dygraph.MONTHLY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2113</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">date.strftime</span><span class="PUNC">(</span><span class="STRN">'%b %y'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2114</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2115</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">frac</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">date.getHours</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">3600</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">date.getMinutes</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">60</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">date.getSeconds</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">date.getMilliseconds</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2116</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">frac</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NAME">Dygraph.DAILY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2117</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Date</span><span class="PUNC">(</span><span class="NAME">date.getTime</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">3600</span><span class="PUNC">*</span><span class="NUMB">1000</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">strftime</span><span class="PUNC">(</span><span class="STRN">'%d%b'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2118</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2119</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Dygraph.hmsString_</span><span class="PUNC">(</span><span class="NAME">date.getTime</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2120</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2121</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2122</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2123</span>
-<span class='line'>2124</span> </span><span class="COMM">/**
-<span class='line'>2125</span> * Convert a JS date (millis since epoch) to YYYY/MM/DD
-<span class='line'>2126</span> * @param {Number} date The JavaScript date (ms since epoch)
-<span class='line'>2127</span> * @return {String} A date of the form "YYYY/MM/DD"
-<span class='line'>2128</span> * @private
-<span class='line'>2129</span> */</span><span class="WHIT">
-<span class='line'>2130</span> </span><span class="NAME">Dygraph.dateString_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">date</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2131</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">zeropad</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.zeropad</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2132</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">d</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Date</span><span class="PUNC">(</span><span class="NAME">date</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2133</span>
-<span class='line'>2134</span> </span><span class="WHIT"> </span><span class="COMM">// Get the year:</span><span class="WHIT">
-<span class='line'>2135</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">year</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">d.getFullYear</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2136</span> </span><span class="WHIT"> </span><span class="COMM">// Get a 0 padded month string</span><span class="WHIT">
-<span class='line'>2137</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">month</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">zeropad</span><span class="PUNC">(</span><span class="NAME">d.getMonth</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">//months are 0-offset, sigh</span><span class="WHIT">
-<span class='line'>2138</span> </span><span class="WHIT"> </span><span class="COMM">// Get a 0 padded day string</span><span class="WHIT">
-<span class='line'>2139</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">day</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">zeropad</span><span class="PUNC">(</span><span class="NAME">d.getDate</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2140</span>
-<span class='line'>2141</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ret</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2142</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">frac</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">d.getHours</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">3600</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">d.getMinutes</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">60</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">d.getSeconds</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2143</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">frac</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">ret</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">" "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">Dygraph.hmsString_</span><span class="PUNC">(</span><span class="NAME">date</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2144</span>
-<span class='line'>2145</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">year</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">month</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">day</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">ret</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2146</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2147</span>
-<span class='line'>2148</span> </span><span class="COMM">/**
-<span class='line'>2149</span> * Round a number to the specified number of digits past the decimal point.
-<span class='line'>2150</span> * @param {Number} num The number to round
-<span class='line'>2151</span> * @param {Number} places The number of decimals to which to round
-<span class='line'>2152</span> * @return {Number} The rounded number
-<span class='line'>2153</span> * @private
-<span class='line'>2154</span> */</span><span class="WHIT">
-<span class='line'>2155</span> </span><span class="NAME">Dygraph.round_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">num</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">places</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2156</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">shift</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.pow</span><span class="PUNC">(</span><span class="NUMB">10</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">places</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2157</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Math.round</span><span class="PUNC">(</span><span class="NAME">num</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">shift</span><span class="PUNC">)</span><span class="PUNC">/</span><span class="NAME">shift</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2158</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2159</span>
-<span class='line'>2160</span> </span><span class="COMM">/**
-<span class='line'>2161</span> * Fires when there's data available to be graphed.
-<span class='line'>2162</span> * @param {String} data Raw CSV data to be plotted
-<span class='line'>2163</span> * @private
-<span class='line'>2164</span> */</span><span class="WHIT">
-<span class='line'>2165</span> </span><span class="NAME">Dygraph.prototype.loadedEvent_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">data</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2166</span> </span><span class="WHIT"> </span><span class="NAME">this.rawData_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.parseCSV_</span><span class="PUNC">(</span><span class="NAME">data</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2167</span> </span><span class="WHIT"> </span><span class="NAME">this.predraw_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2168</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2169</span>
-<span class='line'>2170</span> </span><span class="NAME">Dygraph.prototype.months</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Jan"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Feb"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Mar"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Apr"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"May"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Jun"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2171</span> </span><span class="WHIT"> </span><span class="STRN">"Jul"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Aug"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Sep"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Oct"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Nov"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Dec"</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2172</span> </span><span class="NAME">Dygraph.prototype.quarters</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Jan"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Apr"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Jul"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Oct"</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2173</span>
-<span class='line'>2174</span> </span><span class="COMM">/**
-<span class='line'>2175</span> * Add ticks on the x-axis representing years, months, quarters, weeks, or days
-<span class='line'>2176</span> * @private
-<span class='line'>2177</span> */</span><span class="WHIT">
-<span class='line'>2178</span> </span><span class="NAME">Dygraph.prototype.addXTicks_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2179</span> </span><span class="WHIT"> </span><span class="COMM">// Determine the correct ticks scale on the x-axis: quarterly, monthly, ...</span><span class="WHIT">
-<span class='line'>2180</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">range</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2181</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.dateWindow_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2182</span> </span><span class="WHIT"> </span><span class="NAME">range</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">this.dateWindow_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.dateWindow_</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2183</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2184</span> </span><span class="WHIT"> </span><span class="NAME">range</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">this.rawData_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.rawData_</span><span class="PUNC">[</span><span class="NAME">this.rawData_.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2185</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2186</span>
-<span class='line'>2187</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xTicks</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'xTicker'</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">range</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">range</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2188</span> </span><span class="WHIT"> </span><span class="NAME">this.layout_.updateOptions</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">xTicks</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">xTicks</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2189</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2190</span>
-<span class='line'>2191</span> </span><span class="COMM">// Time granularity enumeration</span><span class="WHIT">
-<span class='line'>2192</span> </span><span class="NAME">Dygraph.SECONDLY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2193</span> </span><span class="NAME">Dygraph.TWO_SECONDLY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2194</span> </span><span class="NAME">Dygraph.FIVE_SECONDLY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2195</span> </span><span class="NAME">Dygraph.TEN_SECONDLY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2196</span> </span><span class="NAME">Dygraph.THIRTY_SECONDLY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">4</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2197</span> </span><span class="NAME">Dygraph.MINUTELY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">5</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2198</span> </span><span class="NAME">Dygraph.TWO_MINUTELY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">6</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2199</span> </span><span class="NAME">Dygraph.FIVE_MINUTELY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">7</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2200</span> </span><span class="NAME">Dygraph.TEN_MINUTELY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">8</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2201</span> </span><span class="NAME">Dygraph.THIRTY_MINUTELY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">9</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2202</span> </span><span class="NAME">Dygraph.HOURLY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2203</span> </span><span class="NAME">Dygraph.TWO_HOURLY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">11</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2204</span> </span><span class="NAME">Dygraph.SIX_HOURLY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">12</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2205</span> </span><span class="NAME">Dygraph.DAILY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">13</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2206</span> </span><span class="NAME">Dygraph.WEEKLY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">14</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2207</span> </span><span class="NAME">Dygraph.MONTHLY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">15</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2208</span> </span><span class="NAME">Dygraph.QUARTERLY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">16</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2209</span> </span><span class="NAME">Dygraph.BIANNUAL</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">17</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2210</span> </span><span class="NAME">Dygraph.ANNUAL</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">18</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2211</span> </span><span class="NAME">Dygraph.DECADAL</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">19</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2212</span> </span><span class="NAME">Dygraph.CENTENNIAL</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">20</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2213</span> </span><span class="NAME">Dygraph.NUM_GRANULARITIES</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">21</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2214</span>
-<span class='line'>2215</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2216</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">Dygraph.SECONDLY</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2217</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">Dygraph.TWO_SECONDLY</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2218</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">Dygraph.FIVE_SECONDLY</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">5</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2219</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">Dygraph.TEN_SECONDLY</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2220</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">Dygraph.THIRTY_SECONDLY</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">30</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2221</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">Dygraph.MINUTELY</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">60</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2222</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">Dygraph.TWO_MINUTELY</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">60</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2223</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">Dygraph.FIVE_MINUTELY</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">60</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">5</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2224</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">Dygraph.TEN_MINUTELY</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">60</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2225</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">Dygraph.THIRTY_MINUTELY</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">60</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">30</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2226</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">Dygraph.HOURLY</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">3600</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2227</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">Dygraph.TWO_HOURLY</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">3600</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2228</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">Dygraph.SIX_HOURLY</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">3600</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">6</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2229</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">Dygraph.DAILY</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">86400</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2230</span> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">Dygraph.WEEKLY</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">604800</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2231</span>
-<span class='line'>2232</span> </span><span class="COMM">/**
-<span class='line'>2233</span> * @private
-<span class='line'>2234</span> * If we used this time granularity, how many ticks would there be?
-<span class='line'>2235</span> * This is only an approximation, but it's generally good enough.
-<span class='line'>2236</span> */</span><span class="WHIT">
-<span class='line'>2237</span> </span><span class="NAME">Dygraph.prototype.NumXTicks</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">start_time</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">end_time</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">granularity</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2238</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">Dygraph.MONTHLY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2239</span> </span><span class="WHIT"> </span><span class="COMM">// Generate one tick mark for every fixed interval of time.</span><span class="WHIT">
-<span class='line'>2240</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spacing</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">granularity</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2241</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="NUMB">0.5</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1.0</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">end_time</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">start_time</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">spacing</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2242</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2243</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">year_mod</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// e.g. to only print one point every 10 years.</span><span class="WHIT">
-<span class='line'>2244</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">num_months</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">12</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2245</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.QUARTERLY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">num_months</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2246</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.BIANNUAL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">num_months</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2247</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.ANNUAL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">num_months</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2248</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.DECADAL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">num_months</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">year_mod</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2249</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.CENTENNIAL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">num_months</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">year_mod</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">100</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2250</span>
-<span class='line'>2251</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">msInYear</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">365.2524</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">24</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">3600</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2252</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">num_years</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1.0</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">end_time</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">start_time</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">msInYear</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2253</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="NUMB">0.5</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1.0</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">num_years</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">num_months</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">year_mod</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2254</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2255</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2256</span>
-<span class='line'>2257</span> </span><span class="COMM">/**
-<span class='line'>2258</span> * @private
-<span class='line'>2259</span> *
-<span class='line'>2260</span> * Construct an x-axis of nicely-formatted times on meaningful boundaries
-<span class='line'>2261</span> * (e.g. 'Jan 09' rather than 'Jan 22, 2009').
-<span class='line'>2262</span> *
-<span class='line'>2263</span> * Returns an array containing {v: millis, label: label} dictionaries.
-<span class='line'>2264</span> */</span><span class="WHIT">
-<span class='line'>2265</span> </span><span class="NAME">Dygraph.prototype.GetXAxis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">start_time</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">end_time</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">granularity</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2266</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">formatter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"xAxisLabelFormatter"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2267</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ticks</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2268</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">Dygraph.MONTHLY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2269</span> </span><span class="WHIT"> </span><span class="COMM">// Generate one tick mark for every fixed interval of time.</span><span class="WHIT">
-<span class='line'>2270</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spacing</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.SHORT_SPACINGS</span><span class="PUNC">[</span><span class="NAME">granularity</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2271</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">format</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'%d%b'</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// e.g. "1Jan"</span><span class="WHIT">
-<span class='line'>2272</span>
-<span class='line'>2273</span> </span><span class="WHIT"> </span><span class="COMM">// Find a time less than start_time which occurs on a "nice" time boundary</span><span class="WHIT">
-<span class='line'>2274</span> </span><span class="WHIT"> </span><span class="COMM">// for this granularity.</span><span class="WHIT">
-<span class='line'>2275</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">g</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">spacing</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2276</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">d</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Date</span><span class="PUNC">(</span><span class="NAME">start_time</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2277</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">g</span><span class="WHIT"> </span><span class="PUNC"><=</span><span class="WHIT"> </span><span class="NUMB">60</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// seconds</span><span class="WHIT">
-<span class='line'>2278</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">d.getSeconds</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">d.setSeconds</span><span class="PUNC">(</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">%</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2279</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2280</span> </span><span class="WHIT"> </span><span class="NAME">d.setSeconds</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2281</span> </span><span class="WHIT"> </span><span class="NAME">g</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">60</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2282</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">g</span><span class="WHIT"> </span><span class="PUNC"><=</span><span class="WHIT"> </span><span class="NUMB">60</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// minutes</span><span class="WHIT">
-<span class='line'>2283</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">d.getMinutes</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">d.setMinutes</span><span class="PUNC">(</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">%</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2284</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2285</span> </span><span class="WHIT"> </span><span class="NAME">d.setMinutes</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2286</span> </span><span class="WHIT"> </span><span class="NAME">g</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">60</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2287</span>
-<span class='line'>2288</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">g</span><span class="WHIT"> </span><span class="PUNC"><=</span><span class="WHIT"> </span><span class="NUMB">24</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// days</span><span class="WHIT">
-<span class='line'>2289</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">d.getHours</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">d.setHours</span><span class="PUNC">(</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">%</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2290</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2291</span> </span><span class="WHIT"> </span><span class="NAME">d.setHours</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2292</span> </span><span class="WHIT"> </span><span class="NAME">g</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">24</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2293</span>
-<span class='line'>2294</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">g</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">7</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// one week</span><span class="WHIT">
-<span class='line'>2295</span> </span><span class="WHIT"> </span><span class="NAME">d.setDate</span><span class="PUNC">(</span><span class="NAME">d.getDate</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">d.getDay</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2296</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2297</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2298</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2299</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2300</span> </span><span class="WHIT"> </span><span class="NAME">start_time</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">d.getTime</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2301</span>
-<span class='line'>2302</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">t</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">start_time</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">t</span><span class="WHIT"> </span><span class="PUNC"><=</span><span class="WHIT"> </span><span class="NAME">end_time</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">t</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">spacing</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2303</span> </span><span class="WHIT"> </span><span class="NAME">ticks.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">v</span><span class="PUNC">:</span><span class="NAME">t</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">label</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">formatter</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Date</span><span class="PUNC">(</span><span class="NAME">t</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">granularity</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2304</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2305</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2306</span> </span><span class="WHIT"> </span><span class="COMM">// Display a tick mark on the first of a set of months of each year.</span><span class="WHIT">
-<span class='line'>2307</span> </span><span class="WHIT"> </span><span class="COMM">// Years get a tick mark iff y % year_mod == 0. This is useful for</span><span class="WHIT">
-<span class='line'>2308</span> </span><span class="WHIT"> </span><span class="COMM">// displaying a tick mark once every 10 years, say, on long time scales.</span><span class="WHIT">
-<span class='line'>2309</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">months</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2310</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">year_mod</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// e.g. to only print one point every 10 years.</span><span class="WHIT">
-<span class='line'>2311</span>
-<span class='line'>2312</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.MONTHLY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2313</span> </span><span class="WHIT"> </span><span class="NAME">months</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">4</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">5</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">6</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">7</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">8</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">9</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">11</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">12</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2314</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.QUARTERLY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2315</span> </span><span class="WHIT"> </span><span class="NAME">months</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">6</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">9</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2316</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.BIANNUAL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2317</span> </span><span class="WHIT"> </span><span class="NAME">months</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">6</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2318</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.ANNUAL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2319</span> </span><span class="WHIT"> </span><span class="NAME">months</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2320</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.DECADAL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2321</span> </span><span class="WHIT"> </span><span class="NAME">months</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2322</span> </span><span class="WHIT"> </span><span class="NAME">year_mod</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2323</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">granularity</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Dygraph.CENTENNIAL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2324</span> </span><span class="WHIT"> </span><span class="NAME">months</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2325</span> </span><span class="WHIT"> </span><span class="NAME">year_mod</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">100</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2326</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2327</span> </span><span class="WHIT"> </span><span class="NAME">this.warn</span><span class="PUNC">(</span><span class="STRN">"Span of dates is too long"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2328</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2329</span>
-<span class='line'>2330</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">start_year</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Date</span><span class="PUNC">(</span><span class="NAME">start_time</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getFullYear</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2331</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">end_year</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Date</span><span class="PUNC">(</span><span class="NAME">end_time</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getFullYear</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2332</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">zeropad</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.zeropad</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2333</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">start_year</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><=</span><span class="WHIT"> </span><span class="NAME">end_year</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2334</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">%</span><span class="WHIT"> </span><span class="NAME">year_mod</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2335</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">months.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2336</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">date_str</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">zeropad</span><span class="PUNC">(</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">months</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/01"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2337</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">t</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateStrToMillis</span><span class="PUNC">(</span><span class="NAME">date_str</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2338</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">t</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">start_time</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">t</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">end_time</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2339</span> </span><span class="WHIT"> </span><span class="NAME">ticks.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">v</span><span class="PUNC">:</span><span class="NAME">t</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">label</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">formatter</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Date</span><span class="PUNC">(</span><span class="NAME">t</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">granularity</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2340</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2341</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2342</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2343</span>
-<span class='line'>2344</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">ticks</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2345</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2346</span>
-<span class='line'>2347</span>
-<span class='line'>2348</span> </span><span class="COMM">/**
-<span class='line'>2349</span> * Add ticks to the x-axis based on a date range.
-<span class='line'>2350</span> * @param {Number} startDate Start of the date window (millis since epoch)
-<span class='line'>2351</span> * @param {Number} endDate End of the date window (millis since epoch)
-<span class='line'>2352</span> * @param {Dygraph} self The dygraph object
-<span class='line'>2353</span> * @return { [Object] } Array of {label, value} tuples.
-<span class='line'>2354</span> * @public
-<span class='line'>2355</span> */</span><span class="WHIT">
-<span class='line'>2356</span> </span><span class="NAME">Dygraph.dateTicker</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">startDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">endDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">self</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2357</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): why does this take 'self' as a param?</span><span class="WHIT">
-<span class='line'>2358</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">chosen</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2359</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">Dygraph.NUM_GRANULARITIES</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2360</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">num_ticks</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.NumXTicks</span><span class="PUNC">(</span><span class="NAME">startDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">endDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2361</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">self.width_</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">num_ticks</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NAME">self.attr_</span><span class="PUNC">(</span><span class="STRN">'pixelsPerXLabel'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2362</span> </span><span class="WHIT"> </span><span class="NAME">chosen</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2363</span> </span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2364</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2365</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2366</span>
-<span class='line'>2367</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">chosen</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2368</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">self.GetXAxis</span><span class="PUNC">(</span><span class="NAME">startDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">endDate</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">chosen</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2369</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2370</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): signal error.</span><span class="WHIT">
-<span class='line'>2371</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2372</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2373</span>
-<span class='line'>2374</span> </span><span class="COMM">/**
-<span class='line'>2375</span> * @private
-<span class='line'>2376</span> * This is a list of human-friendly values at which to show tick marks on a log
-<span class='line'>2377</span> * scale. It is k * 10^n, where k=1..9 and n=-39..+39, so:
-<span class='line'>2378</span> * ..., 1, 2, 3, 4, 5, ..., 9, 10, 20, 30, ..., 90, 100, 200, 300, ...
-<span class='line'>2379</span> * NOTE: this assumes that Dygraph.LOG_SCALE = 10.
-<span class='line'>2380</span> */</span><span class="WHIT">
-<span class='line'>2381</span> </span><span class="NAME">Dygraph.PREFERRED_LOG_TICK_VALUES</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2382</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">vals</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2383</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">power</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">39</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">power</span><span class="WHIT"> </span><span class="PUNC"><=</span><span class="WHIT"> </span><span class="NUMB">39</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">power</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2384</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">range</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.pow</span><span class="PUNC">(</span><span class="NUMB">10</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">power</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2385</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mult</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">mult</span><span class="WHIT"> </span><span class="PUNC"><=</span><span class="WHIT"> </span><span class="NUMB">9</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">mult</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2386</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">range</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">mult</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2387</span> </span><span class="WHIT"> </span><span class="NAME">vals.push</span><span class="PUNC">(</span><span class="NAME">val</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2388</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2389</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2390</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">vals</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2391</span> </span><span class="PUNC">}</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2392</span>
-<span class='line'>2393</span> </span><span class="COMM">/**
-<span class='line'>2394</span> * @private
-<span class='line'>2395</span> * Implementation of binary search over an array.
-<span class='line'>2396</span> * Currently does not work when val is outside the range of arry's values.
-<span class='line'>2397</span> * @param { Integer } val the value to search for
-<span class='line'>2398</span> * @param { Integer[] } arry is the value over which to search
-<span class='line'>2399</span> * @param { Integer } abs If abs > 0, find the lowest entry greater than val
-<span class='line'>2400</span> * If abs < 0, find the highest entry less than val.
-<span class='line'>2401</span> * if abs == 0, find the entry that equals val.
-<span class='line'>2402</span> * @param { Integer } [low] The first index in arry to consider (optional)
-<span class='line'>2403</span> * @param { Integer } [high] The last index in arry to consider (optional)
-<span class='line'>2404</span> */</span><span class="WHIT">
-<span class='line'>2405</span> </span><span class="NAME">Dygraph.binarySearch</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">val</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arry</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">abs</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">low</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">high</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2406</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">low</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">high</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2407</span> </span><span class="WHIT"> </span><span class="NAME">low</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2408</span> </span><span class="WHIT"> </span><span class="NAME">high</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">arry.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2409</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2410</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">low</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">high</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2411</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2412</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2413</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">abs</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2414</span> </span><span class="WHIT"> </span><span class="NAME">abs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2415</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2416</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">validIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">idx</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2417</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">arry.length</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2418</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2419</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">low</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">high</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2420</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">arry</span><span class="PUNC">[</span><span class="NAME">mid</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2421</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">val</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2422</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">mid</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2423</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2424</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">val</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2425</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">abs</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2426</span> </span><span class="WHIT"> </span><span class="COMM">// Accept if element > val, but also if prior element < val.</span><span class="WHIT">
-<span class='line'>2427</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">mid</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2428</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">validIndex</span><span class="PUNC">(</span><span class="NAME">idx</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">arry</span><span class="PUNC">[</span><span class="NAME">idx</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">val</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2429</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">mid</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2430</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2431</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2432</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Dygraph.binarySearch</span><span class="PUNC">(</span><span class="NAME">val</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arry</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">abs</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">low</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mid</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2433</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2434</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">element</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">val</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2435</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">abs</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2436</span> </span><span class="WHIT"> </span><span class="COMM">// Accept if element < val, but also if prior element > val.</span><span class="WHIT">
-<span class='line'>2437</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">mid</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2438</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">validIndex</span><span class="PUNC">(</span><span class="NAME">idx</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">arry</span><span class="PUNC">[</span><span class="NAME">idx</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">val</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2439</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">mid</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2440</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2441</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2442</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Dygraph.binarySearch</span><span class="PUNC">(</span><span class="NAME">val</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arry</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">abs</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mid</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">high</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2443</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2444</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2445</span>
-<span class='line'>2446</span> </span><span class="COMM">// TODO(konigsberg): Update comment.</span><span class="WHIT">
-<span class='line'>2447</span> </span><span class="COMM">/**
-<span class='line'>2448</span> * Add ticks when the x axis has numbers on it (instead of dates)
-<span class='line'>2449</span> *
-<span class='line'>2450</span> * @param {Number} minV minimum value
-<span class='line'>2451</span> * @param {Number} maxV maximum value
-<span class='line'>2452</span> * @param self
-<span class='line'>2453</span> * @param {function} attribute accessor function.
-<span class='line'>2454</span> * @return {[Object]} Array of {label, value} tuples.
-<span class='line'>2455</span> */</span><span class="WHIT">
-<span class='line'>2456</span> </span><span class="NAME">Dygraph.numericTicks</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">minV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">maxV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">self</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">axis_props</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">vals</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2457</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">attr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">k</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2458</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">axis_props</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">axis_props.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">k</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">axis_props</span><span class="PUNC">[</span><span class="NAME">k</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2459</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">self.attr_</span><span class="PUNC">(</span><span class="NAME">k</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2460</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2461</span>
-<span class='line'>2462</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ticks</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2463</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">vals</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2464</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">vals.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2465</span> </span><span class="WHIT"> </span><span class="NAME">ticks.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">v</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">vals</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2466</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2467</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2468</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">axis_props</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">"logscale"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2469</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pixelsPerTick</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'pixelsPerYLabel'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2470</span> </span><span class="WHIT"> </span><span class="COMM">// NOTE(konigsberg): Dan, should self.height_ be self.plotter_.area.h?</span><span class="WHIT">
-<span class='line'>2471</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nTicks</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="NAME">self.height_</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">pixelsPerTick</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2472</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">minIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.binarySearch</span><span class="PUNC">(</span><span class="NAME">minV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Dygraph.PREFERRED_LOG_TICK_VALUES</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2473</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">maxIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.binarySearch</span><span class="PUNC">(</span><span class="NAME">maxV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Dygraph.PREFERRED_LOG_TICK_VALUES</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2474</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">minIdx</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2475</span> </span><span class="WHIT"> </span><span class="NAME">minIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2476</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2477</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">maxIdx</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2478</span> </span><span class="WHIT"> </span><span class="NAME">maxIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.PREFERRED_LOG_TICK_VALUES.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2479</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2480</span> </span><span class="WHIT"> </span><span class="COMM">// Count the number of tick values would appear, if we can get at least</span><span class="WHIT">
-<span class='line'>2481</span> </span><span class="WHIT"> </span><span class="COMM">// nTicks / 4 accept them.</span><span class="WHIT">
-<span class='line'>2482</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">lastDisplayed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2483</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">maxIdx</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">minIdx</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NAME">nTicks</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NUMB">4</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2484</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">axisId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">axis_props.yAxisId</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2485</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">maxIdx</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NAME">minIdx</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">--</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2486</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tickValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.PREFERRED_LOG_TICK_VALUES</span><span class="PUNC">[</span><span class="NAME">idx</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2487</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">domCoord</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">axis_props.g.toDomYCoord</span><span class="PUNC">(</span><span class="NAME">tickValue</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">axisId</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2488</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tick</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">v</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">tickValue</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2489</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">lastDisplayed</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2490</span> </span><span class="WHIT"> </span><span class="NAME">lastDisplayed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2491</span> </span><span class="WHIT"> </span><span class="NAME">tickValue</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">tickValue</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2492</span> </span><span class="WHIT"> </span><span class="NAME">domCoord</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">domCoord</span><span class="WHIT">
-<span class='line'>2493</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2494</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2495</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">domCoord</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">lastDisplayed.domCoord</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NAME">pixelsPerTick</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2496</span> </span><span class="WHIT"> </span><span class="NAME">lastDisplayed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2497</span> </span><span class="WHIT"> </span><span class="NAME">tickValue</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">tickValue</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2498</span> </span><span class="WHIT"> </span><span class="NAME">domCoord</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">domCoord</span><span class="WHIT">
-<span class='line'>2499</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2500</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2501</span> </span><span class="WHIT"> </span><span class="NAME">tick.label</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2502</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2503</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2504</span> </span><span class="WHIT"> </span><span class="NAME">ticks.push</span><span class="PUNC">(</span><span class="NAME">tick</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2505</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2506</span> </span><span class="WHIT"> </span><span class="COMM">// Since we went in backwards order.</span><span class="WHIT">
-<span class='line'>2507</span> </span><span class="WHIT"> </span><span class="NAME">ticks.reverse</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2508</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2509</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2510</span>
-<span class='line'>2511</span> </span><span class="WHIT"> </span><span class="COMM">// ticks.length won't be 0 if the log scale function finds values to insert.</span><span class="WHIT">
-<span class='line'>2512</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">ticks.length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2513</span> </span><span class="WHIT"> </span><span class="COMM">// Basic idea:</span><span class="WHIT">
-<span class='line'>2514</span> </span><span class="WHIT"> </span><span class="COMM">// Try labels every 1, 2, 5, 10, 20, 50, 100, etc.</span><span class="WHIT">
-<span class='line'>2515</span> </span><span class="WHIT"> </span><span class="COMM">// Calculate the resulting tick spacing (i.e. this.height_ / nTicks).</span><span class="WHIT">
-<span class='line'>2516</span> </span><span class="WHIT"> </span><span class="COMM">// The first spacing greater than pixelsPerYLabel is what we use.</span><span class="WHIT">
-<span class='line'>2517</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): version that works on a log scale.</span><span class="WHIT">
-<span class='line'>2518</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">"labelsKMG2"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2519</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mults</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">4</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">8</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2520</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2521</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mults</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">5</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2522</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2523</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">scale</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">low_val</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">high_val</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nTicks</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2524</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): make it possible to set this for x- and y-axes independently.</span><span class="WHIT">
-<span class='line'>2525</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pixelsPerTick</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'pixelsPerYLabel'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2526</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">10</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">50</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2527</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">"labelsKMG2"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2528</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">base_scale</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.pow</span><span class="PUNC">(</span><span class="NUMB">16</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2529</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2530</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">base_scale</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.pow</span><span class="PUNC">(</span><span class="NUMB">10</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2531</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2532</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">mults.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2533</span> </span><span class="WHIT"> </span><span class="NAME">scale</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">base_scale</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">mults</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2534</span> </span><span class="WHIT"> </span><span class="NAME">low_val</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="NAME">minV</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">scale</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">scale</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2535</span> </span><span class="WHIT"> </span><span class="NAME">high_val</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.ceil</span><span class="PUNC">(</span><span class="NAME">maxV</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">scale</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">scale</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2536</span> </span><span class="WHIT"> </span><span class="NAME">nTicks</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.abs</span><span class="PUNC">(</span><span class="NAME">high_val</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">low_val</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">scale</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2537</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spacing</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.height_</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">nTicks</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2538</span> </span><span class="WHIT"> </span><span class="COMM">// wish I could break out of both loops at once...</span><span class="WHIT">
-<span class='line'>2539</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">spacing</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">pixelsPerTick</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2540</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2541</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">spacing</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">pixelsPerTick</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2542</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2543</span>
-<span class='line'>2544</span> </span><span class="WHIT"> </span><span class="COMM">// Construct the set of ticks.</span><span class="WHIT">
-<span class='line'>2545</span> </span><span class="WHIT"> </span><span class="COMM">// Allow reverse y-axis if it's explicitly requested.</span><span class="WHIT">
-<span class='line'>2546</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">low_val</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">high_val</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">scale</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2547</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">nTicks</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2548</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tickV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">low_val</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">scale</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2549</span> </span><span class="WHIT"> </span><span class="NAME">ticks.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">v</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">tickV</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2550</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2551</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2552</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2553</span>
-<span class='line'>2554</span> </span><span class="WHIT"> </span><span class="COMM">// Add formatted labels to the ticks.</span><span class="WHIT">
-<span class='line'>2555</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">k</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2556</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">k_labels</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2557</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">"labelsKMB"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2558</span> </span><span class="WHIT"> </span><span class="NAME">k</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1000</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2559</span> </span><span class="WHIT"> </span><span class="NAME">k_labels</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="STRN">"K"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"M"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"B"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"T"</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2560</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2561</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">"labelsKMG2"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2562</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">k</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">self.warn</span><span class="PUNC">(</span><span class="STRN">"Setting both labelsKMB and labelsKMG2. Pick one!"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2563</span> </span><span class="WHIT"> </span><span class="NAME">k</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1024</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2564</span> </span><span class="WHIT"> </span><span class="NAME">k_labels</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="STRN">"k"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"M"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"G"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"T"</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2565</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2566</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">formatter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'yAxisLabelFormatter'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">
-<span class='line'>2567</span> </span><span class="WHIT"> </span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'yAxisLabelFormatter'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'yValueFormatter'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2568</span>
-<span class='line'>2569</span> </span><span class="WHIT"> </span><span class="COMM">// Add labels to the ticks.</span><span class="WHIT">
-<span class='line'>2570</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">ticks.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2571</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">ticks</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">label</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// Use current label.</span><span class="WHIT">
-<span class='line'>2572</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tickV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ticks</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">v</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2573</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">absTickV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.abs</span><span class="PUNC">(</span><span class="NAME">tickV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2574</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">label</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">formatter</span><span class="PUNC">(</span><span class="NAME">tickV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">self</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2575</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">k_labels.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2576</span> </span><span class="WHIT"> </span><span class="COMM">// Round up to an appropriate unit.</span><span class="WHIT">
-<span class='line'>2577</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">k</span><span class="PUNC">*</span><span class="NAME">k</span><span class="PUNC">*</span><span class="NAME">k</span><span class="PUNC">*</span><span class="NAME">k</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2578</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">--</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">k</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2579</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">absTickV</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NAME">n</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2580</span> </span><span class="WHIT"> </span><span class="NAME">label</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.round_</span><span class="PUNC">(</span><span class="NAME">tickV</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">n</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'digitsAfterDecimal'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">k_labels</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2581</span> </span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2582</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2583</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2584</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2585</span> </span><span class="WHIT"> </span><span class="NAME">ticks</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">label</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">label</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2586</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2587</span>
-<span class='line'>2588</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">ticks</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2589</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2590</span>
-<span class='line'>2591</span> </span><span class="COMM">/**
-<span class='line'>2592</span> * @private
-<span class='line'>2593</span> * Computes the range of the data series (including confidence intervals).
-<span class='line'>2594</span> * @param { [Array] } series either [ [x1, y1], [x2, y2], ... ] or
-<span class='line'>2595</span> * [ [x1, [y1, dev_low, dev_high]], [x2, [y2, dev_low, dev_high]], ...
-<span class='line'>2596</span> * @return [low, high]
-<span class='line'>2597</span> */</span><span class="WHIT">
-<span class='line'>2598</span> </span><span class="NAME">Dygraph.prototype.extremeValues_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">series</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2599</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">minY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2600</span>
-<span class='line'>2601</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">bars</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"errorBars"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"customBars"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2602</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">bars</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2603</span> </span><span class="WHIT"> </span><span class="COMM">// With custom bars, maxY is the max of the high values.</span><span class="WHIT">
-<span class='line'>2604</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">series.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2605</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2606</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">y</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2607</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">low</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2608</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">high</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2609</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">low</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">y</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">low</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">y</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// this can happen with custom bars,</span><span class="WHIT">
-<span class='line'>2610</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">high</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">y</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">high</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">y</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// e.g. in tests/custom-bars.html</span><span class="WHIT">
-<span class='line'>2611</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">maxY</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">high</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2612</span> </span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">high</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2613</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2614</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">minY</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">low</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">minY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2615</span> </span><span class="WHIT"> </span><span class="NAME">minY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">low</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2616</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2617</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2618</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2619</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">series.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2620</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2621</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">isNaN</span><span class="PUNC">(</span><span class="NAME">y</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2622</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">maxY</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2623</span> </span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">y</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2624</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2625</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">minY</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">minY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2626</span> </span><span class="WHIT"> </span><span class="NAME">minY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">y</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2627</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2628</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2629</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2630</span>
-<span class='line'>2631</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">minY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2632</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2633</span>
-<span class='line'>2634</span> </span><span class="COMM">/**
-<span class='line'>2635</span> * @private
-<span class='line'>2636</span> * This function is called once when the chart's data is changed or the options
-<span class='line'>2637</span> * dictionary is updated. It is _not_ called when the user pans or zooms. The
-<span class='line'>2638</span> * idea is that values derived from the chart's data can be computed here,
-<span class='line'>2639</span> * rather than every time the chart is drawn. This includes things like the
-<span class='line'>2640</span> * number of axes, rolling averages, etc.
-<span class='line'>2641</span> */</span><span class="WHIT">
-<span class='line'>2642</span> </span><span class="NAME">Dygraph.prototype.predraw_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2643</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): move more computations out of drawGraph_ and into here.</span><span class="WHIT">
-<span class='line'>2644</span> </span><span class="WHIT"> </span><span class="NAME">this.computeYAxes_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2645</span>
-<span class='line'>2646</span> </span><span class="WHIT"> </span><span class="COMM">// Create a new plotter.</span><span class="WHIT">
-<span class='line'>2647</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.plotter_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.plotter_.clear</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2648</span> </span><span class="WHIT"> </span><span class="NAME">this.plotter_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">DygraphCanvasRenderer</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2649</span> </span><span class="WHIT"> </span><span class="NAME">this.hidden_</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2650</span> </span><span class="WHIT"> </span><span class="NAME">this.hidden_ctx_</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2651</span> </span><span class="WHIT"> </span><span class="NAME">this.layout_</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2652</span> </span><span class="WHIT"> </span><span class="NAME">this.renderOptions_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2653</span>
-<span class='line'>2654</span> </span><span class="WHIT"> </span><span class="COMM">// The roller sits in the bottom left corner of the chart. We don't know where</span><span class="WHIT">
-<span class='line'>2655</span> </span><span class="WHIT"> </span><span class="COMM">// this will be until the options are available, so it's positioned here.</span><span class="WHIT">
-<span class='line'>2656</span> </span><span class="WHIT"> </span><span class="NAME">this.createRollInterface_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2657</span>
-<span class='line'>2658</span> </span><span class="WHIT"> </span><span class="COMM">// Same thing applies for the labelsDiv. It's right edge should be flush with</span><span class="WHIT">
-<span class='line'>2659</span> </span><span class="WHIT"> </span><span class="COMM">// the right edge of the charting area (which may not be the same as the right</span><span class="WHIT">
-<span class='line'>2660</span> </span><span class="WHIT"> </span><span class="COMM">// edge of the div, if we have two y-axes.</span><span class="WHIT">
-<span class='line'>2661</span> </span><span class="WHIT"> </span><span class="NAME">this.positionLabelsDiv_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2662</span>
-<span class='line'>2663</span> </span><span class="WHIT"> </span><span class="COMM">// If the data or options have changed, then we'd better redraw.</span><span class="WHIT">
-<span class='line'>2664</span> </span><span class="WHIT"> </span><span class="NAME">this.drawGraph_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2665</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2666</span>
-<span class='line'>2667</span> </span><span class="COMM">/**
-<span class='line'>2668</span> * Update the graph with new data. This method is called when the viewing area
-<span class='line'>2669</span> * has changed. If the underlying data or options have changed, predraw_ will
-<span class='line'>2670</span> * be called before drawGraph_ is called.
-<span class='line'>2671</span> * @private
-<span class='line'>2672</span> */</span><span class="WHIT">
-<span class='line'>2673</span> </span><span class="NAME">Dygraph.prototype.drawGraph_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2674</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">data</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.rawData_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2675</span>
-<span class='line'>2676</span> </span><span class="WHIT"> </span><span class="COMM">// This is used to set the second parameter to drawCallback, below.</span><span class="WHIT">
-<span class='line'>2677</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">is_initial_draw</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.is_initial_draw_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2678</span> </span><span class="WHIT"> </span><span class="NAME">this.is_initial_draw_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2679</span>
-<span class='line'>2680</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">minY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2681</span> </span><span class="WHIT"> </span><span class="NAME">this.layout_.removeAllDatasets</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2682</span> </span><span class="WHIT"> </span><span class="NAME">this.setColors_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2683</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_</span><span class="PUNC">[</span><span class="STRN">'pointSize'</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0.5</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'highlightCircleSize'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2684</span>
-<span class='line'>2685</span> </span><span class="WHIT"> </span><span class="COMM">// Loop over the fields (series). Go from the last to the first,</span><span class="WHIT">
-<span class='line'>2686</span> </span><span class="WHIT"> </span><span class="COMM">// because if they're stacked that's how we accumulate the values.</span><span class="WHIT">
-<span class='line'>2687</span>
-<span class='line'>2688</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">cumulative_y</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// For stacked series.</span><span class="WHIT">
-<span class='line'>2689</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">datasets</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2690</span>
-<span class='line'>2691</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">extremes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// series name -> [low, high]</span><span class="WHIT">
-<span class='line'>2692</span>
-<span class='line'>2693</span> </span><span class="WHIT"> </span><span class="COMM">// Loop over all fields and create datasets</span><span class="WHIT">
-<span class='line'>2694</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">--</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2695</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.visibility</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">[</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2696</span>
-<span class='line'>2697</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seriesName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"labels"</span><span class="PUNC">)</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2698</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">connectSeparatedPoints</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'connectSeparatedPoints'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2699</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">logScale</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'logscale'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2700</span>
-<span class='line'>2701</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">series</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2702</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">data.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2703</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">date</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2704</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">point</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2705</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">logScale</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2706</span> </span><span class="WHIT"> </span><span class="COMM">// On the log scale, points less than zero do not exist.</span><span class="WHIT">
-<span class='line'>2707</span> </span><span class="WHIT"> </span><span class="COMM">// This will create a gap in the chart. Note that this ignores</span><span class="WHIT">
-<span class='line'>2708</span> </span><span class="WHIT"> </span><span class="COMM">// connectSeparatedPoints.</span><span class="WHIT">
-<span class='line'>2709</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">point</span><span class="WHIT"> </span><span class="PUNC"><=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2710</span> </span><span class="WHIT"> </span><span class="NAME">point</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2711</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2712</span> </span><span class="WHIT"> </span><span class="NAME">series.push</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="NAME">date</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">point</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2713</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2714</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">point</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">connectSeparatedPoints</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2715</span> </span><span class="WHIT"> </span><span class="NAME">series.push</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="NAME">date</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">point</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2716</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2717</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2718</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2719</span>
-<span class='line'>2720</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): move this into predraw_. It's insane to do it here.</span><span class="WHIT">
-<span class='line'>2721</span> </span><span class="WHIT"> </span><span class="NAME">series</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.rollingAverage</span><span class="PUNC">(</span><span class="NAME">series</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.rollPeriod_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2722</span>
-<span class='line'>2723</span> </span><span class="WHIT"> </span><span class="COMM">// Prune down to the desired range, if necessary (for zooming)</span><span class="WHIT">
-<span class='line'>2724</span> </span><span class="WHIT"> </span><span class="COMM">// Because there can be lines going to points outside of the visible area,</span><span class="WHIT">
-<span class='line'>2725</span> </span><span class="WHIT"> </span><span class="COMM">// we actually prune to visible points, plus one on either side.</span><span class="WHIT">
-<span class='line'>2726</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">bars</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"errorBars"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"customBars"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2727</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.dateWindow_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2728</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">low</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.dateWindow_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2729</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">high</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.dateWindow_</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2730</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pruned</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2731</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): do binary search instead of linear search.</span><span class="WHIT">
-<span class='line'>2732</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): pass firstIdx and lastIdx directly to the renderer.</span><span class="WHIT">
-<span class='line'>2733</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">firstIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">lastIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2734</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">k</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">k</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">series.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">k</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2735</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">k</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NAME">low</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">firstIdx</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2736</span> </span><span class="WHIT"> </span><span class="NAME">firstIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">k</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2737</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2738</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">k</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC"><=</span><span class="WHIT"> </span><span class="NAME">high</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2739</span> </span><span class="WHIT"> </span><span class="NAME">lastIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">k</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2740</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2741</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2742</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">firstIdx</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">firstIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2743</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">firstIdx</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">firstIdx</span><span class="PUNC">--</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2744</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">lastIdx</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">lastIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">series.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2745</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">lastIdx</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">series.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">lastIdx</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2746</span> </span><span class="WHIT"> </span><span class="NAME">this.boundaryIds_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">firstIdx</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">lastIdx</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2747</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">k</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">firstIdx</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">k</span><span class="WHIT"> </span><span class="PUNC"><=</span><span class="WHIT"> </span><span class="NAME">lastIdx</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">k</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2748</span> </span><span class="WHIT"> </span><span class="NAME">pruned.push</span><span class="PUNC">(</span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">k</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2749</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2750</span> </span><span class="WHIT"> </span><span class="NAME">series</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pruned</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2751</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2752</span> </span><span class="WHIT"> </span><span class="NAME">this.boundaryIds_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">series.length</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2753</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2754</span>
-<span class='line'>2755</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seriesExtremes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.extremeValues_</span><span class="PUNC">(</span><span class="NAME">series</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2756</span>
-<span class='line'>2757</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">bars</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2758</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC"><</span><span class="NAME">series.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2759</span> </span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2760</span> </span><span class="WHIT"> </span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">val</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2761</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2762</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"stackedGraph"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2763</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">l</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">series.length</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2764</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">actual_y</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2765</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">l</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2766</span> </span><span class="WHIT"> </span><span class="COMM">// If one data set has a NaN, let all subsequent stacked</span><span class="WHIT">
-<span class='line'>2767</span> </span><span class="WHIT"> </span><span class="COMM">// sets inherit the NaN -- only start at 0 for the first set.</span><span class="WHIT">
-<span class='line'>2768</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2769</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">cumulative_y</span><span class="PUNC">[</span><span class="NAME">x</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2770</span> </span><span class="WHIT"> </span><span class="NAME">cumulative_y</span><span class="PUNC">[</span><span class="NAME">x</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2771</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2772</span>
-<span class='line'>2773</span> </span><span class="WHIT"> </span><span class="NAME">actual_y</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2774</span> </span><span class="WHIT"> </span><span class="NAME">cumulative_y</span><span class="PUNC">[</span><span class="NAME">x</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">actual_y</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2775</span>
-<span class='line'>2776</span> </span><span class="WHIT"> </span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">cumulative_y</span><span class="PUNC">[</span><span class="NAME">x</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="WHIT">
-<span class='line'>2777</span>
-<span class='line'>2778</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">cumulative_y</span><span class="PUNC">[</span><span class="NAME">x</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">seriesExtremes</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2779</span> </span><span class="WHIT"> </span><span class="NAME">seriesExtremes</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">cumulative_y</span><span class="PUNC">[</span><span class="NAME">x</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2780</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2781</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">cumulative_y</span><span class="PUNC">[</span><span class="NAME">x</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">seriesExtremes</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2782</span> </span><span class="WHIT"> </span><span class="NAME">seriesExtremes</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">cumulative_y</span><span class="PUNC">[</span><span class="NAME">x</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2783</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2784</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2785</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2786</span> </span><span class="WHIT"> </span><span class="NAME">extremes</span><span class="PUNC">[</span><span class="NAME">seriesName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">seriesExtremes</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2787</span>
-<span class='line'>2788</span> </span><span class="WHIT"> </span><span class="NAME">datasets</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">series</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2789</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2790</span>
-<span class='line'>2791</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">datasets.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2792</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.visibility</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">[</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2793</span> </span><span class="WHIT"> </span><span class="NAME">this.layout_.addDataset</span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"labels"</span><span class="PUNC">)</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">datasets</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2794</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2795</span>
-<span class='line'>2796</span> </span><span class="WHIT"> </span><span class="NAME">this.computeYAxisRanges_</span><span class="PUNC">(</span><span class="NAME">extremes</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2797</span> </span><span class="WHIT"> </span><span class="NAME">this.layout_.updateOptions</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">yAxes</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.axes_</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2798</span> </span><span class="WHIT"> </span><span class="NAME">seriesToAxisMap</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.seriesToAxisMap_</span><span class="WHIT">
-<span class='line'>2799</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2800</span> </span><span class="WHIT"> </span><span class="NAME">this.addXTicks_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2801</span>
-<span class='line'>2802</span> </span><span class="WHIT"> </span><span class="COMM">// Save the X axis zoomed status as the updateOptions call will tend to set it errorneously</span><span class="WHIT">
-<span class='line'>2803</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tmp_zoomed_x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.zoomed_x_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2804</span> </span><span class="WHIT"> </span><span class="COMM">// Tell PlotKit to use this new data and render itself</span><span class="WHIT">
-<span class='line'>2805</span> </span><span class="WHIT"> </span><span class="NAME">this.layout_.updateOptions</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">dateWindow</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.dateWindow_</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2806</span> </span><span class="WHIT"> </span><span class="NAME">this.zoomed_x_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">tmp_zoomed_x</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2807</span> </span><span class="WHIT"> </span><span class="NAME">this.layout_.evaluateWithError</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2808</span> </span><span class="WHIT"> </span><span class="NAME">this.plotter_.clear</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2809</span> </span><span class="WHIT"> </span><span class="NAME">this.plotter_.render</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2810</span> </span><span class="WHIT"> </span><span class="NAME">this.canvas_.getContext</span><span class="PUNC">(</span><span class="STRN">'2d'</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">clearRect</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.canvas_.width</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2811</span> </span><span class="WHIT"> </span><span class="NAME">this.canvas_.height</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2812</span>
-<span class='line'>2813</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">is_initial_draw</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2814</span> </span><span class="WHIT"> </span><span class="COMM">// Generate a static legend before any particular point is selected.</span><span class="WHIT">
-<span class='line'>2815</span> </span><span class="WHIT"> </span><span class="NAME">this.setLegendHTML_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2816</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2817</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">this.selPoints_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this.selPoints_.length</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2818</span> </span><span class="WHIT"> </span><span class="NAME">this.lastx_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.selPoints_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">xval</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2819</span> </span><span class="WHIT"> </span><span class="NAME">this.updateSelection_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2820</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2821</span> </span><span class="WHIT"> </span><span class="NAME">this.clearSelection</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2822</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2823</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2824</span>
-<span class='line'>2825</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"drawCallback"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2826</span> </span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"drawCallback"</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">is_initial_draw</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2827</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2828</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2829</span>
-<span class='line'>2830</span> </span><span class="COMM">/**
-<span class='line'>2831</span> * @private
-<span class='line'>2832</span> * Determine properties of the y-axes which are independent of the data
-<span class='line'>2833</span> * currently being displayed. This includes things like the number of axes and
-<span class='line'>2834</span> * the style of the axes. It does not include the range of each axis and its
-<span class='line'>2835</span> * tick marks.
-<span class='line'>2836</span> * This fills in this.axes_ and this.seriesToAxisMap_.
-<span class='line'>2837</span> * axes_ = [ { options } ]
-<span class='line'>2838</span> * seriesToAxisMap_ = { seriesName: 0, seriesName2: 1, ... }
-<span class='line'>2839</span> * indices are into the axes_ array.
-<span class='line'>2840</span> */</span><span class="WHIT">
-<span class='line'>2841</span> </span><span class="NAME">Dygraph.prototype.computeYAxes_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2842</span> </span><span class="WHIT"> </span><span class="NAME">this.axes_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">yAxisId</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">g</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// always have at least one y-axis.</span><span class="WHIT">
-<span class='line'>2843</span> </span><span class="WHIT"> </span><span class="NAME">this.seriesToAxisMap_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2844</span>
-<span class='line'>2845</span> </span><span class="WHIT"> </span><span class="COMM">// Get a list of series names.</span><span class="WHIT">
-<span class='line'>2846</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">labels</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"labels"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2847</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">series</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2848</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">labels.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">labels</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2849</span>
-<span class='line'>2850</span> </span><span class="WHIT"> </span><span class="COMM">// all options which could be applied per-axis:</span><span class="WHIT">
-<span class='line'>2851</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">axisOptions</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT">
-<span class='line'>2852</span> </span><span class="WHIT"> </span><span class="STRN">'includeZero'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2853</span> </span><span class="WHIT"> </span><span class="STRN">'valueRange'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2854</span> </span><span class="WHIT"> </span><span class="STRN">'labelsKMB'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2855</span> </span><span class="WHIT"> </span><span class="STRN">'labelsKMG2'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2856</span> </span><span class="WHIT"> </span><span class="STRN">'pixelsPerYLabel'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2857</span> </span><span class="WHIT"> </span><span class="STRN">'yAxisLabelWidth'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2858</span> </span><span class="WHIT"> </span><span class="STRN">'axisLabelFontSize'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2859</span> </span><span class="WHIT"> </span><span class="STRN">'axisTickSize'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>2860</span> </span><span class="WHIT"> </span><span class="STRN">'logscale'</span><span class="WHIT">
-<span class='line'>2861</span> </span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2862</span>
-<span class='line'>2863</span> </span><span class="WHIT"> </span><span class="COMM">// Copy global axis options over to the first axis.</span><span class="WHIT">
-<span class='line'>2864</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">axisOptions.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2865</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">k</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">axisOptions</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2866</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">v</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="NAME">k</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2867</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">v</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.axes_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">k</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">v</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2868</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2869</span>
-<span class='line'>2870</span> </span><span class="WHIT"> </span><span class="COMM">// Go through once and add all the axes.</span><span class="WHIT">
-<span class='line'>2871</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seriesName</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">series</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2872</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">series.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">seriesName</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2873</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"axis"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">seriesName</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2874</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">axis</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2875</span> </span><span class="WHIT"> </span><span class="NAME">this.seriesToAxisMap_</span><span class="PUNC">[</span><span class="NAME">seriesName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2876</span> </span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2877</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2878</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">axis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'object'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2879</span> </span><span class="WHIT"> </span><span class="COMM">// Add a new axis, making a copy of its per-axis options.</span><span class="WHIT">
-<span class='line'>2880</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">opts</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2881</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">opts</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.axes_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2882</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">opts</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">valueRange</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// shouldn't inherit this.</span><span class="WHIT">
-<span class='line'>2883</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">yAxisId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.axes_.length</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2884</span> </span><span class="WHIT"> </span><span class="NAME">opts.yAxisId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">yAxisId</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2885</span> </span><span class="WHIT"> </span><span class="NAME">opts.g</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2886</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">opts</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2887</span> </span><span class="WHIT"> </span><span class="NAME">this.axes_.push</span><span class="PUNC">(</span><span class="NAME">opts</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2888</span> </span><span class="WHIT"> </span><span class="NAME">this.seriesToAxisMap_</span><span class="PUNC">[</span><span class="NAME">seriesName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">yAxisId</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2889</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2890</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2891</span>
-<span class='line'>2892</span> </span><span class="WHIT"> </span><span class="COMM">// Go through one more time and assign series to an axis defined by another</span><span class="WHIT">
-<span class='line'>2893</span> </span><span class="WHIT"> </span><span class="COMM">// series, e.g. { 'Y1: { axis: {} }, 'Y2': { axis: 'Y1' } }</span><span class="WHIT">
-<span class='line'>2894</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seriesName</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">series</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2895</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">series.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">seriesName</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2896</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"axis"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">seriesName</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2897</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">axis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'string'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2898</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.seriesToAxisMap_.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">axis</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2899</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">"Series "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">seriesName</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" wants to share a y-axis with "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>2900</span> </span><span class="WHIT"> </span><span class="STRN">"series "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">", which does not define its own axis."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2901</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2902</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2903</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.seriesToAxisMap_</span><span class="PUNC">[</span><span class="NAME">axis</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2904</span> </span><span class="WHIT"> </span><span class="NAME">this.seriesToAxisMap_</span><span class="PUNC">[</span><span class="NAME">seriesName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2905</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2906</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2907</span>
-<span class='line'>2908</span> </span><span class="WHIT"> </span><span class="COMM">// Now we remove series from seriesToAxisMap_ which are not visible. We do</span><span class="WHIT">
-<span class='line'>2909</span> </span><span class="WHIT"> </span><span class="COMM">// this last so that hiding the first series doesn't destroy the axis</span><span class="WHIT">
-<span class='line'>2910</span> </span><span class="WHIT"> </span><span class="COMM">// properties of the primary axis.</span><span class="WHIT">
-<span class='line'>2911</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seriesToAxisFiltered</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2912</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">vis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.visibility</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2913</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">labels.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2914</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">labels</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2915</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">vis</span><span class="PUNC">[</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">seriesToAxisFiltered</span><span class="PUNC">[</span><span class="NAME">s</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.seriesToAxisMap_</span><span class="PUNC">[</span><span class="NAME">s</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2916</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2917</span> </span><span class="WHIT"> </span><span class="NAME">this.seriesToAxisMap_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">seriesToAxisFiltered</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2918</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2919</span>
-<span class='line'>2920</span> </span><span class="COMM">/**
-<span class='line'>2921</span> * Returns the number of y-axes on the chart.
-<span class='line'>2922</span> * @return {Number} the number of axes.
-<span class='line'>2923</span> */</span><span class="WHIT">
-<span class='line'>2924</span> </span><span class="NAME">Dygraph.prototype.numAxes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2925</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">last_axis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2926</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">series</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">this.seriesToAxisMap_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2927</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.seriesToAxisMap_.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">series</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2928</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.seriesToAxisMap_</span><span class="PUNC">[</span><span class="NAME">series</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2929</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">last_axis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">last_axis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2930</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2931</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">last_axis</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2932</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2933</span>
-<span class='line'>2934</span> </span><span class="COMM">/**
-<span class='line'>2935</span> * @private
-<span class='line'>2936</span> * Determine the value range and tick marks for each axis.
-<span class='line'>2937</span> * @param {Object} extremes A mapping from seriesName -> [low, high]
-<span class='line'>2938</span> * This fills in the valueRange and ticks fields in each entry of this.axes_.
-<span class='line'>2939</span> */</span><span class="WHIT">
-<span class='line'>2940</span> </span><span class="NAME">Dygraph.prototype.computeYAxisRanges_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">extremes</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2941</span> </span><span class="WHIT"> </span><span class="COMM">// Build a map from axis number -> [list of series names]</span><span class="WHIT">
-<span class='line'>2942</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">seriesForAxis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2943</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">series</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">this.seriesToAxisMap_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2944</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.seriesToAxisMap_.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">series</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2945</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.seriesToAxisMap_</span><span class="PUNC">[</span><span class="NAME">series</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2946</span> </span><span class="WHIT"> </span><span class="KEYW">while</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">seriesForAxis.length</span><span class="WHIT"> </span><span class="PUNC"><=</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">seriesForAxis.push</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2947</span> </span><span class="WHIT"> </span><span class="NAME">seriesForAxis</span><span class="PUNC">[</span><span class="NAME">idx</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">push</span><span class="PUNC">(</span><span class="NAME">series</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2948</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2949</span>
-<span class='line'>2950</span> </span><span class="WHIT"> </span><span class="COMM">// Compute extreme values, a span and tick marks for each axis.</span><span class="WHIT">
-<span class='line'>2951</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.axes_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2952</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.axes_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2953</span> </span><span class="WHIT">
-<span class='line'>2954</span> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">seriesForAxis</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2955</span> </span><span class="WHIT"> </span><span class="COMM">// If no series are defined or visible then use a reasonable default</span><span class="WHIT">
-<span class='line'>2956</span> </span><span class="WHIT"> </span><span class="NAME">axis.extremeRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2957</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2958</span> </span><span class="WHIT"> </span><span class="COMM">// Calculate the extremes of extremes.</span><span class="WHIT">
-<span class='line'>2959</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">series</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">seriesForAxis</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2960</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">minY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Infinity</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// extremes[series[0]][0];</span><span class="WHIT">
-<span class='line'>2961</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NAME">Infinity</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// extremes[series[0]][1];</span><span class="WHIT">
-<span class='line'>2962</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">extremeMinY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">extremeMaxY</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2963</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">series.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2964</span> </span><span class="WHIT"> </span><span class="COMM">// Only use valid extremes to stop null data series' from corrupting the scale.</span><span class="WHIT">
-<span class='line'>2965</span> </span><span class="WHIT"> </span><span class="NAME">extremeMinY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">extremes</span><span class="PUNC">[</span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2966</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extremeMinY</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2967</span> </span><span class="WHIT"> </span><span class="NAME">minY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">extremeMinY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">minY</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2968</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2969</span> </span><span class="WHIT"> </span><span class="NAME">extremeMaxY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">extremes</span><span class="PUNC">[</span><span class="NAME">series</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2970</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extremeMaxY</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2971</span> </span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NAME">extremeMaxY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2972</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2973</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2974</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">axis.includeZero</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">minY</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">minY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2975</span>
-<span class='line'>2976</span> </span><span class="WHIT"> </span><span class="COMM">// Ensure we have a valid scale, otherwise defualt to zero for safety.</span><span class="WHIT">
-<span class='line'>2977</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">minY</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Infinity</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">minY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2978</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">maxY</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NAME">Infinity</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2979</span>
-<span class='line'>2980</span> </span><span class="WHIT"> </span><span class="COMM">// Add some padding and round up to an integer to be human-friendly.</span><span class="WHIT">
-<span class='line'>2981</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">span</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">minY</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2982</span> </span><span class="WHIT"> </span><span class="COMM">// special case: if we have no sense of scale, use +/-10% of the sole value.</span><span class="WHIT">
-<span class='line'>2983</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">span</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">span</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2984</span>
-<span class='line'>2985</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">maxAxisY</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2986</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">minAxisY</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2987</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">axis.logscale</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2988</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">maxAxisY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">0.1</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">span</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2989</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">minAxisY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">minY</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2990</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2991</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">maxAxisY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">0.1</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">span</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2992</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">minAxisY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">minY</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">0.1</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">span</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2993</span>
-<span class='line'>2994</span> </span><span class="WHIT"> </span><span class="COMM">// Try to include zero and make it minAxisY (or maxAxisY) if it makes sense.</span><span class="WHIT">
-<span class='line'>2995</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"avoidMinZero"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>2996</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">minAxisY</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">minY</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">minAxisY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2997</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">maxAxisY</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">maxY</span><span class="WHIT"> </span><span class="PUNC"><=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">maxAxisY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>2998</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>2999</span>
-<span class='line'>3000</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"includeZero"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3001</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">maxY</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">maxAxisY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3002</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">minY</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">minAxisY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3003</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3004</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3005</span> </span><span class="WHIT"> </span><span class="NAME">axis.extremeRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">minAxisY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">maxAxisY</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3006</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3007</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">axis.valueWindow</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3008</span> </span><span class="WHIT"> </span><span class="COMM">// This is only set if the user has zoomed on the y-axis. It is never set</span><span class="WHIT">
-<span class='line'>3009</span> </span><span class="WHIT"> </span><span class="COMM">// by a user. It takes precedence over axis.valueRange because, if you set</span><span class="WHIT">
-<span class='line'>3010</span> </span><span class="WHIT"> </span><span class="COMM">// valueRange, you'd still expect to be able to pan.</span><span class="WHIT">
-<span class='line'>3011</span> </span><span class="WHIT"> </span><span class="NAME">axis.computedValueRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">axis.valueWindow</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">axis.valueWindow</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3012</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">axis.valueRange</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3013</span> </span><span class="WHIT"> </span><span class="COMM">// This is a user-set value range for this axis.</span><span class="WHIT">
-<span class='line'>3014</span> </span><span class="WHIT"> </span><span class="NAME">axis.computedValueRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">axis.valueRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">axis.valueRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3015</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3016</span> </span><span class="WHIT"> </span><span class="NAME">axis.computedValueRange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">axis.extremeRange</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3017</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3018</span>
-<span class='line'>3019</span> </span><span class="WHIT"> </span><span class="COMM">// Add ticks. By default, all axes inherit the tick positions of the</span><span class="WHIT">
-<span class='line'>3020</span> </span><span class="WHIT"> </span><span class="COMM">// primary axis. However, if an axis is specifically marked as having</span><span class="WHIT">
-<span class='line'>3021</span> </span><span class="WHIT"> </span><span class="COMM">// independent ticks, then that is permissible as well.</span><span class="WHIT">
-<span class='line'>3022</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">axis.independentTicks</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3023</span> </span><span class="WHIT"> </span><span class="NAME">axis.ticks</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
-<span class='line'>3024</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.numericTicks</span><span class="PUNC">(</span><span class="NAME">axis.computedValueRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>3025</span> </span><span class="WHIT"> </span><span class="NAME">axis.computedValueRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>3026</span> </span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>3027</span> </span><span class="WHIT"> </span><span class="NAME">axis</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3028</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3029</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p_axis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.axes_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3030</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p_ticks</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">p_axis.ticks</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3031</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p_scale</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">p_axis.computedValueRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">p_axis.computedValueRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3032</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">scale</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">axis.computedValueRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">axis.computedValueRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3033</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tick_values</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3034</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">p_ticks.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3035</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">y_frac</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">p_ticks</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">v</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">p_axis.computedValueRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">p_scale</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3036</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">y_val</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">axis.computedValueRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">y_frac</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">scale</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3037</span> </span><span class="WHIT"> </span><span class="NAME">tick_values.push</span><span class="PUNC">(</span><span class="NAME">y_val</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3038</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3039</span>
-<span class='line'>3040</span> </span><span class="WHIT"> </span><span class="NAME">axis.ticks</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
-<span class='line'>3041</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.numericTicks</span><span class="PUNC">(</span><span class="NAME">axis.computedValueRange</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>3042</span> </span><span class="WHIT"> </span><span class="NAME">axis.computedValueRange</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>3043</span> </span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">axis</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">tick_values</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3044</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3045</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3046</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3047</span> </span><span class="WHIT">
-<span class='line'>3048</span> </span><span class="COMM">/**
-<span class='line'>3049</span> * @private
-<span class='line'>3050</span> * Calculates the rolling average of a data set.
-<span class='line'>3051</span> * If originalData is [label, val], rolls the average of those.
-<span class='line'>3052</span> * If originalData is [label, [, it's interpreted as [value, stddev]
-<span class='line'>3053</span> * and the roll is returned in the same form, with appropriately reduced
-<span class='line'>3054</span> * stddev for each value.
-<span class='line'>3055</span> * Note that this is where fractional input (i.e. '5/10') is converted into
-<span class='line'>3056</span> * decimal values.
-<span class='line'>3057</span> * @param {Array} originalData The data in the appropriate format (see above)
-<span class='line'>3058</span> * @param {Number} rollPeriod The number of points over which to average the
-<span class='line'>3059</span> * data
-<span class='line'>3060</span> */</span><span class="WHIT">
-<span class='line'>3061</span> </span><span class="NAME">Dygraph.prototype.rollingAverage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">originalData</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">rollPeriod</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3062</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">originalData.length</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT">
-<span class='line'>3063</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">originalData</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3064</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">rollPeriod</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">rollPeriod</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">originalData.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3065</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">rollingData</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3066</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sigma</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"sigma"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3067</span>
-<span class='line'>3068</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.fractions_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3069</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">num</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3070</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">den</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// numerator/denominator</span><span class="WHIT">
-<span class='line'>3071</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mult</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">100.0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3072</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">originalData.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3073</span> </span><span class="WHIT"> </span><span class="NAME">num</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3074</span> </span><span class="WHIT"> </span><span class="NAME">den</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3075</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">rollPeriod</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3076</span> </span><span class="WHIT"> </span><span class="NAME">num</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">rollPeriod</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3077</span> </span><span class="WHIT"> </span><span class="NAME">den</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">rollPeriod</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3078</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3079</span>
-<span class='line'>3080</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">date</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3081</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">den</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">num</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">den</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0.0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3082</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"errorBars"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3083</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.wilsonInterval_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3084</span> </span><span class="WHIT"> </span><span class="COMM">// For more details on this confidence interval, see:</span><span class="WHIT">
-<span class='line'>3085</span> </span><span class="WHIT"> </span><span class="COMM">// http://en.wikipedia.org/wiki/Binomial_confidence_interval</span><span class="WHIT">
-<span class='line'>3086</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">den</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3087</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">den</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3088</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pm</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sigma</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">Math.sqrt</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">*</span><span class="PUNC">(</span><span class="NUMB">1</span><span class="PUNC">-</span><span class="NAME">p</span><span class="PUNC">)</span><span class="PUNC">/</span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">sigma</span><span class="PUNC">*</span><span class="NAME">sigma</span><span class="PUNC">/</span><span class="PUNC">(</span><span class="NUMB">4</span><span class="PUNC">*</span><span class="NAME">n</span><span class="PUNC">*</span><span class="NAME">n</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3089</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">denom</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">sigma</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">sigma</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">den</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3090</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">low</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">sigma</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">sigma</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">den</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">pm</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">denom</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3091</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">high</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">sigma</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">sigma</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">den</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">pm</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">denom</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3092</span> </span><span class="WHIT"> </span><span class="NAME">rollingData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">date</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>3093</span> </span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">mult</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">low</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">mult</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">high</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">p</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">mult</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3094</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3095</span> </span><span class="WHIT"> </span><span class="NAME">rollingData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">date</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3096</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3097</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3098</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">stddev</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">den</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">sigma</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">Math.sqrt</span><span class="PUNC">(</span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">den</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">1.0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3099</span> </span><span class="WHIT"> </span><span class="NAME">rollingData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">date</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">mult</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mult</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">stddev</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mult</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">stddev</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3100</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3101</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3102</span> </span><span class="WHIT"> </span><span class="NAME">rollingData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">date</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mult</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3103</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3104</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3105</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"customBars"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3106</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">low</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3107</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3108</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">high</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3109</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">count</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3110</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">originalData.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3111</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">data</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3112</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3113</span> </span><span class="WHIT"> </span><span class="NAME">rollingData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">y</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">y</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3114</span>
-<span class='line'>3115</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">isNaN</span><span class="PUNC">(</span><span class="NAME">y</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3116</span> </span><span class="WHIT"> </span><span class="NAME">low</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3117</span> </span><span class="WHIT"> </span><span class="NAME">mid</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">y</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3118</span> </span><span class="WHIT"> </span><span class="NAME">high</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3119</span> </span><span class="WHIT"> </span><span class="NAME">count</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3120</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3121</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">rollPeriod</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3122</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">prev</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">rollPeriod</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3123</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">prev</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">isNaN</span><span class="PUNC">(</span><span class="NAME">prev</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3124</span> </span><span class="WHIT"> </span><span class="NAME">low</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">prev</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3125</span> </span><span class="WHIT"> </span><span class="NAME">mid</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">prev</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3126</span> </span><span class="WHIT"> </span><span class="NAME">high</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">prev</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3127</span> </span><span class="WHIT"> </span><span class="NAME">count</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3128</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3129</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3130</span> </span><span class="WHIT"> </span><span class="NAME">rollingData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NUMB">1.0</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">mid</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">count</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>3131</span> </span><span class="WHIT"> </span><span class="NUMB">1.0</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">mid</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">low</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">count</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>3132</span> </span><span class="WHIT"> </span><span class="NUMB">1.0</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">high</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">mid</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">count</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3133</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3134</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3135</span> </span><span class="WHIT"> </span><span class="COMM">// Calculate the rolling average for the first rollPeriod - 1 points where</span><span class="WHIT">
-<span class='line'>3136</span> </span><span class="WHIT"> </span><span class="COMM">// there is not enough data to roll over the full number of points</span><span class="WHIT">
-<span class='line'>3137</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">num_init_points</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">rollPeriod</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">originalData.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3138</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"errorBars"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3139</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">rollPeriod</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3140</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">originalData</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3141</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3142</span>
-<span class='line'>3143</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">originalData.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3144</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sum</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3145</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">num_ok</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3146</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">rollPeriod</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3147</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3148</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">isNaN</span><span class="PUNC">(</span><span class="NAME">y</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3149</span> </span><span class="WHIT"> </span><span class="NAME">num_ok</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3150</span> </span><span class="WHIT"> </span><span class="NAME">sum</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3151</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3152</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">num_ok</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3153</span> </span><span class="WHIT"> </span><span class="NAME">rollingData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sum</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">num_ok</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3154</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3155</span> </span><span class="WHIT"> </span><span class="NAME">rollingData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3156</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3157</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3158</span>
-<span class='line'>3159</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3160</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">originalData.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3161</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sum</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3162</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">variance</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3163</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">num_ok</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3164</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">rollPeriod</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3165</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3166</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">isNaN</span><span class="PUNC">(</span><span class="NAME">y</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3167</span> </span><span class="WHIT"> </span><span class="NAME">num_ok</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3168</span> </span><span class="WHIT"> </span><span class="NAME">sum</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3169</span> </span><span class="WHIT"> </span><span class="NAME">variance</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.pow</span><span class="PUNC">(</span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3170</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3171</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">num_ok</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3172</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">stddev</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.sqrt</span><span class="PUNC">(</span><span class="NAME">variance</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">num_ok</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3173</span> </span><span class="WHIT"> </span><span class="NAME">rollingData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>3174</span> </span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">sum</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NAME">num_ok</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sigma</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">stddev</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sigma</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">stddev</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3175</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3176</span> </span><span class="WHIT"> </span><span class="NAME">rollingData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">originalData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3177</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3178</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3179</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3180</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3181</span>
-<span class='line'>3182</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">rollingData</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3183</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3184</span>
-<span class='line'>3185</span> </span><span class="COMM">/**
-<span class='line'>3186</span> * @private
-<span class='line'>3187</span> * Parses a date, returning the number of milliseconds since epoch. This can be
-<span class='line'>3188</span> * passed in as an xValueParser in the Dygraph constructor.
-<span class='line'>3189</span> * TODO(danvk): enumerate formats that this understands.
-<span class='line'>3190</span> * @param {String} A date in YYYYMMDD format.
-<span class='line'>3191</span> * @return {Number} Milliseconds since epoch.
-<span class='line'>3192</span> */</span><span class="WHIT">
-<span class='line'>3193</span> </span><span class="NAME">Dygraph.dateParser</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">dateStr</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">self</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3194</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dateStrSlashed</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3195</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">d</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3196</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dateStr.search</span><span class="PUNC">(</span><span class="STRN">"-"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// e.g. '2009-7-12' or '2009-07-12'</span><span class="WHIT">
-<span class='line'>3197</span> </span><span class="WHIT"> </span><span class="NAME">dateStrSlashed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dateStr.replace</span><span class="PUNC">(</span><span class="STRN">"-"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"g"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3198</span> </span><span class="WHIT"> </span><span class="KEYW">while</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dateStrSlashed.search</span><span class="PUNC">(</span><span class="STRN">"-"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3199</span> </span><span class="WHIT"> </span><span class="NAME">dateStrSlashed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dateStrSlashed.replace</span><span class="PUNC">(</span><span class="STRN">"-"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3200</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3201</span> </span><span class="WHIT"> </span><span class="NAME">d</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateStrToMillis</span><span class="PUNC">(</span><span class="NAME">dateStrSlashed</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3202</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dateStr.length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">8</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// e.g. '20090712'</span><span class="WHIT">
-<span class='line'>3203</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): remove support for this format. It's confusing.</span><span class="WHIT">
-<span class='line'>3204</span> </span><span class="WHIT"> </span><span class="NAME">dateStrSlashed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dateStr.substr</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">4</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">dateStr.substr</span><span class="PUNC">(</span><span class="NUMB">4</span><span class="PUNC">,</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT">
-<span class='line'>3205</span> </span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">dateStr.substr</span><span class="PUNC">(</span><span class="NUMB">6</span><span class="PUNC">,</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3206</span> </span><span class="WHIT"> </span><span class="NAME">d</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateStrToMillis</span><span class="PUNC">(</span><span class="NAME">dateStrSlashed</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3207</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3208</span> </span><span class="WHIT"> </span><span class="COMM">// Any format that Date.parse will accept, e.g. "2009/07/12" or</span><span class="WHIT">
-<span class='line'>3209</span> </span><span class="WHIT"> </span><span class="COMM">// "2009/07/12 12:34:56"</span><span class="WHIT">
-<span class='line'>3210</span> </span><span class="WHIT"> </span><span class="NAME">d</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateStrToMillis</span><span class="PUNC">(</span><span class="NAME">dateStr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3211</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3212</span>
-<span class='line'>3213</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">d</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">isNaN</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3214</span> </span><span class="WHIT"> </span><span class="NAME">self.error</span><span class="PUNC">(</span><span class="STRN">"Couldn't parse "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">dateStr</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" as a date"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3215</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3216</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">d</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3217</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3218</span>
-<span class='line'>3219</span> </span><span class="COMM">/**
-<span class='line'>3220</span> * Detects the type of the str (date or numeric) and sets the various
-<span class='line'>3221</span> * formatting attributes in this.attrs_ based on this type.
-<span class='line'>3222</span> * @param {String} str An x value.
-<span class='line'>3223</span> * @private
-<span class='line'>3224</span> */</span><span class="WHIT">
-<span class='line'>3225</span> </span><span class="NAME">Dygraph.prototype.detectTypeFromString_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">str</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3226</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">isDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3227</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">str.indexOf</span><span class="PUNC">(</span><span class="STRN">'-'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
-<span class='line'>3228</span> </span><span class="WHIT"> </span><span class="NAME">str.indexOf</span><span class="PUNC">(</span><span class="STRN">'/'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
-<span class='line'>3229</span> </span><span class="WHIT"> </span><span class="NAME">isNaN</span><span class="PUNC">(</span><span class="NAME">parseFloat</span><span class="PUNC">(</span><span class="NAME">str</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3230</span> </span><span class="WHIT"> </span><span class="NAME">isDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3231</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">str.length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">8</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">str</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="STRN">'19700101'</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">str</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="STRN">'20371231'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3232</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): remove support for this format.</span><span class="WHIT">
-<span class='line'>3233</span> </span><span class="WHIT"> </span><span class="NAME">isDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3234</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3235</span>
-<span class='line'>3236</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">isDate</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3237</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xValueFormatter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateString_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3238</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xValueParser</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateParser</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3239</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xTicker</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateTicker</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3240</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xAxisLabelFormatter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateAxisFormatter</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3241</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3242</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): use Dygraph.numberFormatter here?</span><span class="WHIT">
-<span class='line'>3243</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xValueFormatter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">x</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3244</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xValueParser</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">parseFloat</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3245</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xTicker</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.numericTicks</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3246</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xAxisLabelFormatter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attrs_.xValueFormatter</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3247</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3248</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3249</span>
-<span class='line'>3250</span> </span><span class="COMM">/**
-<span class='line'>3251</span> * Parses the value as a floating point number. This is like the parseFloat()
-<span class='line'>3252</span> * built-in, but with a few differences:
-<span class='line'>3253</span> * - the empty string is parsed as null, rather than NaN.
-<span class='line'>3254</span> * - if the string cannot be parsed at all, an error is logged.
-<span class='line'>3255</span> * If the string can't be parsed, this method returns null.
-<span class='line'>3256</span> * @param {String} x The string to be parsed
-<span class='line'>3257</span> * @param {Number} opt_line_no The line number from which the string comes.
-<span class='line'>3258</span> * @param {String} opt_line The text of the line from which the string comes.
-<span class='line'>3259</span> * @private
-<span class='line'>3260</span> */</span><span class="WHIT">
-<span class='line'>3261</span>
-<span class='line'>3262</span> </span><span class="COMM">// Parse the x as a float or return null if it's not a number.</span><span class="WHIT">
-<span class='line'>3263</span> </span><span class="NAME">Dygraph.prototype.parseFloat_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">opt_line_no</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">opt_line</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3264</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parseFloat</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3265</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">isNaN</span><span class="PUNC">(</span><span class="NAME">val</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">val</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3266</span>
-<span class='line'>3267</span> </span><span class="WHIT"> </span><span class="COMM">// Try to figure out what happeend.</span><span class="WHIT">
-<span class='line'>3268</span> </span><span class="WHIT"> </span><span class="COMM">// If the value is the empty string, parse it as null.</span><span class="WHIT">
-<span class='line'>3269</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="REGX">/^ *$/</span><span class="PUNC">.</span><span class="NAME">test</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3270</span>
-<span class='line'>3271</span> </span><span class="WHIT"> </span><span class="COMM">// If it was actually "NaN", return it as NaN.</span><span class="WHIT">
-<span class='line'>3272</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="REGX">/^ *nan *$/i</span><span class="PUNC">.</span><span class="NAME">test</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">NaN</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3273</span>
-<span class='line'>3274</span> </span><span class="WHIT"> </span><span class="COMM">// Looks like a parsing error.</span><span class="WHIT">
-<span class='line'>3275</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"Unable to parse '"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"' as a number"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3276</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">opt_line</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">opt_line_no</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3277</span> </span><span class="WHIT"> </span><span class="NAME">msg</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">" on line "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NUMB">1</span><span class="PUNC">+</span><span class="NAME">opt_line_no</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" ('"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">opt_line</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"') of CSV."</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3278</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3279</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="NAME">msg</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3280</span>
-<span class='line'>3281</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3282</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3283</span>
-<span class='line'>3284</span> </span><span class="COMM">/**
-<span class='line'>3285</span> * @private
-<span class='line'>3286</span> * Parses a string in a special csv format. We expect a csv file where each
-<span class='line'>3287</span> * line is a date point, and the first field in each line is the date string.
-<span class='line'>3288</span> * We also expect that all remaining fields represent series.
-<span class='line'>3289</span> * if the errorBars attribute is set, then interpret the fields as:
-<span class='line'>3290</span> * date, series1, stddev1, series2, stddev2, ...
-<span class='line'>3291</span> * @param {[Object]} data See above.
-<span class='line'>3292</span> *
-<span class='line'>3293</span> * @return [Object] An array with one entry for each row. These entries
-<span class='line'>3294</span> * are an array of cells in that row. The first entry is the parsed x-value for
-<span class='line'>3295</span> * the row. The second, third, etc. are the y-values. These can take on one of
-<span class='line'>3296</span> * three forms, depending on the CSV and constructor parameters:
-<span class='line'>3297</span> * 1. numeric value
-<span class='line'>3298</span> * 2. [ value, stddev ]
-<span class='line'>3299</span> * 3. [ low value, center value, high value ]
-<span class='line'>3300</span> */</span><span class="WHIT">
-<span class='line'>3301</span> </span><span class="NAME">Dygraph.prototype.parseCSV_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">data</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3302</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ret</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3303</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">lines</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">data.split</span><span class="PUNC">(</span><span class="STRN">"\n"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3304</span>
-<span class='line'>3305</span> </span><span class="WHIT"> </span><span class="COMM">// Use the default delimiter or fall back to a tab if that makes sense.</span><span class="WHIT">
-<span class='line'>3306</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">delim</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'delimiter'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3307</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">lines</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">indexOf</span><span class="PUNC">(</span><span class="NAME">delim</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">lines</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">indexOf</span><span class="PUNC">(</span><span class="STRN">'\t'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3308</span> </span><span class="WHIT"> </span><span class="NAME">delim</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'\t'</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3309</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3310</span>
-<span class='line'>3311</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">start</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3312</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.labelsFromCSV_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3313</span> </span><span class="WHIT"> </span><span class="NAME">start</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3314</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.labels</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">lines</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">split</span><span class="PUNC">(</span><span class="NAME">delim</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3315</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3316</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">line_no</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3317</span>
-<span class='line'>3318</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xParser</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3319</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">defaultParserSet</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// attempt to auto-detect x value type</span><span class="WHIT">
-<span class='line'>3320</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">expectedCols</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"labels"</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">length</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3321</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">outOfOrder</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3322</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">start</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">lines.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3323</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">line</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">lines</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3324</span> </span><span class="WHIT"> </span><span class="NAME">line_no</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3325</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">line.length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// skip blank lines</span><span class="WHIT">
-<span class='line'>3326</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">line</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'#'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// skip comment lines</span><span class="WHIT">
-<span class='line'>3327</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">inFields</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">line.split</span><span class="PUNC">(</span><span class="NAME">delim</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3328</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">inFields.length</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3329</span>
-<span class='line'>3330</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">fields</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3331</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">defaultParserSet</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3332</span> </span><span class="WHIT"> </span><span class="NAME">this.detectTypeFromString_</span><span class="PUNC">(</span><span class="NAME">inFields</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3333</span> </span><span class="WHIT"> </span><span class="NAME">xParser</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"xValueParser"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3334</span> </span><span class="WHIT"> </span><span class="NAME">defaultParserSet</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3335</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3336</span> </span><span class="WHIT"> </span><span class="NAME">fields</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">xParser</span><span class="PUNC">(</span><span class="NAME">inFields</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3337</span>
-<span class='line'>3338</span> </span><span class="WHIT"> </span><span class="COMM">// If fractions are expected, parse the numbers as "A/B"</span><span class="WHIT">
-<span class='line'>3339</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.fractions_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3340</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">inFields.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3341</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): figure out an appropriate way to flag parse errors.</span><span class="WHIT">
-<span class='line'>3342</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">vals</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">inFields</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">split</span><span class="PUNC">(</span><span class="STRN">"/"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3343</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">vals.length</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3344</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">'Expected fractional "num/den" values in CSV data '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3345</span> </span><span class="WHIT"> </span><span class="STRN">"but found a value '"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">inFields</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"' on line "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3346</span> </span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" ('"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">line</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"') which is not of this form."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3347</span> </span><span class="WHIT"> </span><span class="NAME">fields</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3348</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3349</span> </span><span class="WHIT"> </span><span class="NAME">fields</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">this.parseFloat_</span><span class="PUNC">(</span><span class="NAME">vals</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">line</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>3350</span> </span><span class="WHIT"> </span><span class="NAME">this.parseFloat_</span><span class="PUNC">(</span><span class="NAME">vals</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">line</span><span class="PUNC">)</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3351</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3352</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3353</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"errorBars"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3354</span> </span><span class="WHIT"> </span><span class="COMM">// If there are error bars, values are (value, stddev) pairs</span><span class="WHIT">
-<span class='line'>3355</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">inFields.length</span><span class="WHIT"> </span><span class="PUNC">%</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3356</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">'Expected alternating (value, stdev.) pairs in CSV data '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3357</span> </span><span class="WHIT"> </span><span class="STRN">'but line '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' has an odd number of values ('</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3358</span> </span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">inFields.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"): '"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">line</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"'"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3359</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3360</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">inFields.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3361</span> </span><span class="WHIT"> </span><span class="NAME">fields</span><span class="PUNC">[</span><span class="PUNC">(</span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">this.parseFloat_</span><span class="PUNC">(</span><span class="NAME">inFields</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">line</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>3362</span> </span><span class="WHIT"> </span><span class="NAME">this.parseFloat_</span><span class="PUNC">(</span><span class="NAME">inFields</span><span class="PUNC">[</span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">line</span><span class="PUNC">)</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3363</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3364</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"customBars"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3365</span> </span><span class="WHIT"> </span><span class="COMM">// Bars are a low;center;high tuple</span><span class="WHIT">
-<span class='line'>3366</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">inFields.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3367</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">inFields</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3368</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="REGX">/^ *$/</span><span class="PUNC">.</span><span class="NAME">test</span><span class="PUNC">(</span><span class="NAME">val</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3369</span> </span><span class="WHIT"> </span><span class="NAME">fields</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3370</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3371</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">vals</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">val.split</span><span class="PUNC">(</span><span class="STRN">";"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3372</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">vals.length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3373</span> </span><span class="WHIT"> </span><span class="NAME">fields</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">this.parseFloat_</span><span class="PUNC">(</span><span class="NAME">vals</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">line</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>3374</span> </span><span class="WHIT"> </span><span class="NAME">this.parseFloat_</span><span class="PUNC">(</span><span class="NAME">vals</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">line</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>3375</span> </span><span class="WHIT"> </span><span class="NAME">this.parseFloat_</span><span class="PUNC">(</span><span class="NAME">vals</span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">line</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3376</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3377</span> </span><span class="WHIT"> </span><span class="NAME">this.warning</span><span class="PUNC">(</span><span class="STRN">'When using customBars, values must be either blank '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3378</span> </span><span class="WHIT"> </span><span class="STRN">'or "low;center;high" tuples (got "'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3379</span> </span><span class="WHIT"> </span><span class="STRN">'" on line '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NUMB">1</span><span class="PUNC">+</span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3380</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3381</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3382</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3383</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3384</span> </span><span class="WHIT"> </span><span class="COMM">// Values are just numbers</span><span class="WHIT">
-<span class='line'>3385</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">inFields.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3386</span> </span><span class="WHIT"> </span><span class="NAME">fields</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.parseFloat_</span><span class="PUNC">(</span><span class="NAME">inFields</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">line</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3387</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3388</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3389</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">ret.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">fields</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">ret</span><span class="PUNC">[</span><span class="NAME">ret.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3390</span> </span><span class="WHIT"> </span><span class="NAME">outOfOrder</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3391</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3392</span>
-<span class='line'>3393</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">fields.length</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">expectedCols</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3394</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">"Number of columns in line "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" ("</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">fields.length</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3395</span> </span><span class="WHIT"> </span><span class="STRN">") does not agree with number of labels ("</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">expectedCols</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3396</span> </span><span class="WHIT"> </span><span class="STRN">") "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">line</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3397</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3398</span>
-<span class='line'>3399</span> </span><span class="WHIT"> </span><span class="COMM">// If the user specified the 'labels' option and none of the cells of the</span><span class="WHIT">
-<span class='line'>3400</span> </span><span class="WHIT"> </span><span class="COMM">// first row parsed correctly, then they probably double-specified the</span><span class="WHIT">
-<span class='line'>3401</span> </span><span class="WHIT"> </span><span class="COMM">// labels. We go with the values set in the option, discard this row and</span><span class="WHIT">
-<span class='line'>3402</span> </span><span class="WHIT"> </span><span class="COMM">// log a warning to the JS console.</span><span class="WHIT">
-<span class='line'>3403</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'labels'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3404</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">all_null</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3405</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">all_null</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">fields.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3406</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">fields</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">all_null</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3407</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3408</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">all_null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3409</span> </span><span class="WHIT"> </span><span class="NAME">this.warn</span><span class="PUNC">(</span><span class="STRN">"The dygraphs 'labels' option is set, but the first row of "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3410</span> </span><span class="WHIT"> </span><span class="STRN">"CSV data ('"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">line</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"') appears to also contain labels. "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3411</span> </span><span class="WHIT"> </span><span class="STRN">"Will drop the CSV labels and use the option labels."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3412</span> </span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3413</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3414</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3415</span> </span><span class="WHIT"> </span><span class="NAME">ret.push</span><span class="PUNC">(</span><span class="NAME">fields</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3416</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3417</span>
-<span class='line'>3418</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">outOfOrder</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3419</span> </span><span class="WHIT"> </span><span class="NAME">this.warn</span><span class="PUNC">(</span><span class="STRN">"CSV is out of order; order it correctly to speed loading."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3420</span> </span><span class="WHIT"> </span><span class="NAME">ret.sort</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">b</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3421</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3422</span>
-<span class='line'>3423</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">ret</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3424</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3425</span>
-<span class='line'>3426</span> </span><span class="COMM">/**
-<span class='line'>3427</span> * @private
-<span class='line'>3428</span> * The user has provided their data as a pre-packaged JS array. If the x values
-<span class='line'>3429</span> * are numeric, this is the same as dygraphs' internal format. If the x values
-<span class='line'>3430</span> * are dates, we need to convert them from Date objects to ms since epoch.
-<span class='line'>3431</span> * @param {[Object]} data
-<span class='line'>3432</span> * @return {[Object]} data with numeric x values.
-<span class='line'>3433</span> */</span><span class="WHIT">
-<span class='line'>3434</span> </span><span class="NAME">Dygraph.prototype.parseArray_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">data</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3435</span> </span><span class="WHIT"> </span><span class="COMM">// Peek at the first x value to see if it's numeric.</span><span class="WHIT">
-<span class='line'>3436</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">data.length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3437</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">"Can't plot empty data set"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3438</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3439</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3440</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">data</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3441</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">"Data set cannot contain an empty row"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3442</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3443</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3444</span>
-<span class='line'>3445</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"labels"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3446</span> </span><span class="WHIT"> </span><span class="NAME">this.warn</span><span class="PUNC">(</span><span class="STRN">"Using default labels. Set labels explicitly via 'labels' "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3447</span> </span><span class="WHIT"> </span><span class="STRN">"in the options parameter"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3448</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.labels</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="STRN">"X"</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3449</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3450</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.labels.push</span><span class="PUNC">(</span><span class="STRN">"Y"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3451</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3452</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3453</span>
-<span class='line'>3454</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">Dygraph.isDateLike</span><span class="PUNC">(</span><span class="NAME">data</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3455</span> </span><span class="WHIT"> </span><span class="COMM">// Some intelligent defaults for a date x-axis.</span><span class="WHIT">
-<span class='line'>3456</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xValueFormatter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateString_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3457</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xAxisLabelFormatter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateAxisFormatter</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3458</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xTicker</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateTicker</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3459</span>
-<span class='line'>3460</span> </span><span class="WHIT"> </span><span class="COMM">// Assume they're all dates.</span><span class="WHIT">
-<span class='line'>3461</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">parsedData</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.clone</span><span class="PUNC">(</span><span class="NAME">data</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3462</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">data.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3463</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">parsedData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3464</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">"Row "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" of data is empty"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3465</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3466</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3467</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">parsedData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT">
-<span class='line'>3468</span> </span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">parsedData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">getTime</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'function'</span><span class="WHIT">
-<span class='line'>3469</span> </span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">isNaN</span><span class="PUNC">(</span><span class="NAME">parsedData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">getTime</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3470</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">"x value in row "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" is not a Date"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3471</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3472</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3473</span> </span><span class="WHIT"> </span><span class="NAME">parsedData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parsedData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">getTime</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3474</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3475</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">parsedData</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3476</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3477</span> </span><span class="WHIT"> </span><span class="COMM">// Some intelligent defaults for a numeric x-axis.</span><span class="WHIT">
-<span class='line'>3478</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xValueFormatter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">x</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3479</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xTicker</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.numericTicks</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3480</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3481</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3482</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3483</span>
-<span class='line'>3484</span> </span><span class="COMM">/**
-<span class='line'>3485</span> * Parses a DataTable object from gviz.
-<span class='line'>3486</span> * The data is expected to have a first column that is either a date or a
-<span class='line'>3487</span> * number. All subsequent columns must be numbers. If there is a clear mismatch
-<span class='line'>3488</span> * between this.xValueParser_ and the type of the first column, it will be
-<span class='line'>3489</span> * fixed. Fills out rawData_.
-<span class='line'>3490</span> * @param {[Object]} data See above.
-<span class='line'>3491</span> * @private
-<span class='line'>3492</span> */</span><span class="WHIT">
-<span class='line'>3493</span> </span><span class="NAME">Dygraph.prototype.parseDataTable_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">data</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3494</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">cols</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">data.getNumberOfColumns</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3495</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">rows</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">data.getNumberOfRows</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3496</span>
-<span class='line'>3497</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">indepType</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">data.getColumnType</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3498</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">indepType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'date'</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">indepType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'datetime'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3499</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xValueFormatter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateString_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3500</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xValueParser</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateParser</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3501</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xTicker</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateTicker</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3502</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xAxisLabelFormatter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.dateAxisFormatter</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3503</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">indepType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'number'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3504</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xValueFormatter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">x</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3505</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xValueParser</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">parseFloat</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3506</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xTicker</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.numericTicks</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3507</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.xAxisLabelFormatter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attrs_.xValueFormatter</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3508</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3509</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">"only 'date', 'datetime' and 'number' types are supported for "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3510</span> </span><span class="WHIT"> </span><span class="STRN">"column 1 of DataTable input (Got '"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">indepType</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"')"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3511</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3512</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3513</span>
-<span class='line'>3514</span> </span><span class="WHIT"> </span><span class="COMM">// Array of the column indices which contain data (and not annotations).</span><span class="WHIT">
-<span class='line'>3515</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">colIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3516</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">annotationCols</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// data index -> [annotation cols]</span><span class="WHIT">
-<span class='line'>3517</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hasAnnotations</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3518</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">cols</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3519</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">data.getColumnType</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3520</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'number'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3521</span> </span><span class="WHIT"> </span><span class="NAME">colIdx.push</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3522</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'string'</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">'displayAnnotations'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3523</span> </span><span class="WHIT"> </span><span class="COMM">// This is OK -- it's an annotation column.</span><span class="WHIT">
-<span class='line'>3524</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dataIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">colIdx</span><span class="PUNC">[</span><span class="NAME">colIdx.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3525</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">annotationCols.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">dataIdx</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3526</span> </span><span class="WHIT"> </span><span class="NAME">annotationCols</span><span class="PUNC">[</span><span class="NAME">dataIdx</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3527</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3528</span> </span><span class="WHIT"> </span><span class="NAME">annotationCols</span><span class="PUNC">[</span><span class="NAME">dataIdx</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">push</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3529</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3530</span> </span><span class="WHIT"> </span><span class="NAME">hasAnnotations</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3531</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3532</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">"Only 'number' is supported as a dependent type with Gviz."</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3533</span> </span><span class="WHIT"> </span><span class="STRN">" 'string' is only supported if displayAnnotations is true"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3534</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3535</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3536</span>
-<span class='line'>3537</span> </span><span class="WHIT"> </span><span class="COMM">// Read column labels</span><span class="WHIT">
-<span class='line'>3538</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): add support back for errorBars</span><span class="WHIT">
-<span class='line'>3539</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">labels</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">data.getColumnLabel</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3540</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">colIdx.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3541</span> </span><span class="WHIT"> </span><span class="NAME">labels.push</span><span class="PUNC">(</span><span class="NAME">data.getColumnLabel</span><span class="PUNC">(</span><span class="NAME">colIdx</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3542</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"errorBars"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3543</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3544</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.labels</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">labels</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3545</span> </span><span class="WHIT"> </span><span class="NAME">cols</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">labels.length</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3546</span>
-<span class='line'>3547</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ret</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3548</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">outOfOrder</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3549</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">annotations</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3550</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">rows</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3551</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">row</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3552</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">data.getValue</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
-<span class='line'>3553</span> </span><span class="WHIT"> </span><span class="NAME">data.getValue</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3554</span> </span><span class="WHIT"> </span><span class="NAME">this.warn</span><span class="PUNC">(</span><span class="STRN">"Ignoring row "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3555</span> </span><span class="WHIT"> </span><span class="STRN">" of DataTable because of undefined or null first column."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3556</span> </span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3557</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3558</span>
-<span class='line'>3559</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">indepType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'date'</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">indepType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'datetime'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3560</span> </span><span class="WHIT"> </span><span class="NAME">row.push</span><span class="PUNC">(</span><span class="NAME">data.getValue</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getTime</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3561</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3562</span> </span><span class="WHIT"> </span><span class="NAME">row.push</span><span class="PUNC">(</span><span class="NAME">data.getValue</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3563</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3564</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"errorBars"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3565</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">colIdx.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3566</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">col</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">colIdx</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3567</span> </span><span class="WHIT"> </span><span class="NAME">row.push</span><span class="PUNC">(</span><span class="NAME">data.getValue</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">col</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3568</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hasAnnotations</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
-<span class='line'>3569</span> </span><span class="WHIT"> </span><span class="NAME">annotationCols.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">col</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
-<span class='line'>3570</span> </span><span class="WHIT"> </span><span class="NAME">data.getValue</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">annotationCols</span><span class="PUNC">[</span><span class="NAME">col</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3571</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ann</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3572</span> </span><span class="WHIT"> </span><span class="NAME">ann.series</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">data.getColumnLabel</span><span class="PUNC">(</span><span class="NAME">col</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3573</span> </span><span class="WHIT"> </span><span class="NAME">ann.xval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">row</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3574</span> </span><span class="WHIT"> </span><span class="NAME">ann.shortText</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">String.fromCharCode</span><span class="PUNC">(</span><span class="NUMB">65</span><span class="WHIT"> </span><span class="COMM">/* A */</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">annotations.length</span><span class="PUNC">)</span><span class="WHIT">
-<span class='line'>3575</span> </span><span class="WHIT"> </span><span class="NAME">ann.text</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3576</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">k</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">k</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">annotationCols</span><span class="PUNC">[</span><span class="NAME">col</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">k</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3577</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">k</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">ann.text</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3578</span> </span><span class="WHIT"> </span><span class="NAME">ann.text</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">data.getValue</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">annotationCols</span><span class="PUNC">[</span><span class="NAME">col</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">k</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3579</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3580</span> </span><span class="WHIT"> </span><span class="NAME">annotations.push</span><span class="PUNC">(</span><span class="NAME">ann</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3581</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3582</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3583</span>
-<span class='line'>3584</span> </span><span class="WHIT"> </span><span class="COMM">// Strip out infinities, which give dygraphs problems later on.</span><span class="WHIT">
-<span class='line'>3585</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">row.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3586</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">isFinite</span><span class="PUNC">(</span><span class="NAME">row</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">row</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3587</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3588</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3589</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">cols</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3590</span> </span><span class="WHIT"> </span><span class="NAME">row.push</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">data.getValue</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">data.getValue</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3591</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3592</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3593</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">ret.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">row</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">ret</span><span class="PUNC">[</span><span class="NAME">ret.length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3594</span> </span><span class="WHIT"> </span><span class="NAME">outOfOrder</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3595</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3596</span> </span><span class="WHIT"> </span><span class="NAME">ret.push</span><span class="PUNC">(</span><span class="NAME">row</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3597</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3598</span>
-<span class='line'>3599</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">outOfOrder</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3600</span> </span><span class="WHIT"> </span><span class="NAME">this.warn</span><span class="PUNC">(</span><span class="STRN">"DataTable is out of order; order it correctly to speed loading."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3601</span> </span><span class="WHIT"> </span><span class="NAME">ret.sort</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">b</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3602</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3603</span> </span><span class="WHIT"> </span><span class="NAME">this.rawData_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ret</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3604</span>
-<span class='line'>3605</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">annotations.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3606</span> </span><span class="WHIT"> </span><span class="NAME">this.setAnnotations</span><span class="PUNC">(</span><span class="NAME">annotations</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3607</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3608</span> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3609</span>
-<span class='line'>3610</span> </span><span class="COMM">/**
-<span class='line'>3611</span> * @private
-<span class='line'>3612</span> * This is identical to JavaScript's built-in Date.parse() method, except that
-<span class='line'>3613</span> * it doesn't get replaced with an incompatible method by aggressive JS
-<span class='line'>3614</span> * libraries like MooTools or Joomla.
-<span class='line'>3615</span> * @param { String } str The date string, e.g. "2011/05/06"
-<span class='line'>3616</span> * @return { Integer } millis since epoch
-<span class='line'>3617</span> */</span><span class="WHIT">
-<span class='line'>3618</span> </span><span class="NAME">Dygraph.dateStrToMillis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">str</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3619</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Date</span><span class="PUNC">(</span><span class="NAME">str</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getTime</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3620</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3621</span>
-<span class='line'>3622</span> </span><span class="COMM">// These functions are all based on MochiKit.</span><span class="WHIT">
-<span class='line'>3623</span> </span><span class="COMM">/**
-<span class='line'>3624</span> * @private
-<span class='line'>3625</span> */</span><span class="WHIT">
-<span class='line'>3626</span> </span><span class="NAME">Dygraph.update</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">self</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">o</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3627</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">o</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3628</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">k</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">o</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3629</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">o.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">k</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3630</span> </span><span class="WHIT"> </span><span class="NAME">self</span><span class="PUNC">[</span><span class="NAME">k</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">o</span><span class="PUNC">[</span><span class="NAME">k</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3631</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3632</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3633</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3634</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">self</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3635</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3636</span>
-<span class='line'>3637</span> </span><span class="COMM">/**
-<span class='line'>3638</span> * @private
-<span class='line'>3639</span> */</span><span class="WHIT">
-<span class='line'>3640</span> </span><span class="NAME">Dygraph.isArrayLike</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">o</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3641</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">typ</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">o</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3642</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT">
-<span class='line'>3643</span> </span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">typ</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'object'</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="PUNC">(</span><span class="NAME">typ</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'function'</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
-<span class='line'>3644</span> </span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">o.item</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'function'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
-<span class='line'>3645</span> </span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
-<span class='line'>3646</span> </span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">o.length</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'number'</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
-<span class='line'>3647</span> </span><span class="WHIT"> </span><span class="NAME">o.nodeType</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="WHIT">
-<span class='line'>3648</span> </span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3649</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3650</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3651</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3652</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3653</span>
-<span class='line'>3654</span> </span><span class="COMM">/**
-<span class='line'>3655</span> * @private
-<span class='line'>3656</span> */</span><span class="WHIT">
-<span class='line'>3657</span> </span><span class="NAME">Dygraph.isDateLike</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">o</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3658</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">o</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"object"</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
-<span class='line'>3659</span> </span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">o.getTime</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'function'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3660</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3661</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3662</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3663</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3664</span>
-<span class='line'>3665</span> </span><span class="COMM">/**
-<span class='line'>3666</span> * @private
-<span class='line'>3667</span> */</span><span class="WHIT">
-<span class='line'>3668</span> </span><span class="NAME">Dygraph.clone</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">o</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3669</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): figure out how MochiKit's version works</span><span class="WHIT">
-<span class='line'>3670</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">r</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3671</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">o.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3672</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">Dygraph.isArrayLike</span><span class="PUNC">(</span><span class="NAME">o</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3673</span> </span><span class="WHIT"> </span><span class="NAME">r.push</span><span class="PUNC">(</span><span class="NAME">Dygraph.clone</span><span class="PUNC">(</span><span class="NAME">o</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3674</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3675</span> </span><span class="WHIT"> </span><span class="NAME">r.push</span><span class="PUNC">(</span><span class="NAME">o</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3676</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3677</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3678</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">r</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3679</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3680</span>
-<span class='line'>3681</span>
-<span class='line'>3682</span> </span><span class="COMM">/**
-<span class='line'>3683</span> * Get the CSV data. If it's in a function, call that function. If it's in a
-<span class='line'>3684</span> * file, do an XMLHttpRequest to get it.
-<span class='line'>3685</span> * @private
-<span class='line'>3686</span> */</span><span class="WHIT">
-<span class='line'>3687</span> </span><span class="NAME">Dygraph.prototype.start_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3688</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">this.file_</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'function'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3689</span> </span><span class="WHIT"> </span><span class="COMM">// CSV string. Pretend we got it via XHR.</span><span class="WHIT">
-<span class='line'>3690</span> </span><span class="WHIT"> </span><span class="NAME">this.loadedEvent_</span><span class="PUNC">(</span><span class="NAME">this.file_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3691</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">Dygraph.isArrayLike</span><span class="PUNC">(</span><span class="NAME">this.file_</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3692</span> </span><span class="WHIT"> </span><span class="NAME">this.rawData_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.parseArray_</span><span class="PUNC">(</span><span class="NAME">this.file_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3693</span> </span><span class="WHIT"> </span><span class="NAME">this.predraw_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3694</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">this.file_</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'object'</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
-<span class='line'>3695</span> </span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">this.file_.getColumnRange</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'function'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3696</span> </span><span class="WHIT"> </span><span class="COMM">// must be a DataTable from gviz.</span><span class="WHIT">
-<span class='line'>3697</span> </span><span class="WHIT"> </span><span class="NAME">this.parseDataTable_</span><span class="PUNC">(</span><span class="NAME">this.file_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3698</span> </span><span class="WHIT"> </span><span class="NAME">this.predraw_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3699</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">this.file_</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'string'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3700</span> </span><span class="WHIT"> </span><span class="COMM">// Heuristic: a newline means it's CSV data. Otherwise it's an URL.</span><span class="WHIT">
-<span class='line'>3701</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.file_.indexOf</span><span class="PUNC">(</span><span class="STRN">'\n'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3702</span> </span><span class="WHIT"> </span><span class="NAME">this.loadedEvent_</span><span class="PUNC">(</span><span class="NAME">this.file_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3703</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3704</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">req</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">XMLHttpRequest</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3705</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">caller</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3706</span> </span><span class="WHIT"> </span><span class="NAME">req.onreadystatechange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3707</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">req.readyState</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">4</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3708</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">req.status</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">200</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3709</span> </span><span class="WHIT"> </span><span class="NAME">caller.loadedEvent_</span><span class="PUNC">(</span><span class="NAME">req.responseText</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3710</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3711</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3712</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3713</span>
-<span class='line'>3714</span> </span><span class="WHIT"> </span><span class="NAME">req.open</span><span class="PUNC">(</span><span class="STRN">"GET"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.file_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3715</span> </span><span class="WHIT"> </span><span class="NAME">req.send</span><span class="PUNC">(</span><span class="KEYW">null</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3716</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3717</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3718</span> </span><span class="WHIT"> </span><span class="NAME">this.error</span><span class="PUNC">(</span><span class="STRN">"Unknown data format: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">this.file_</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3719</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3720</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3721</span>
-<span class='line'>3722</span> </span><span class="COMM">/**
-<span class='line'>3723</span> * Changes various properties of the graph. These can include:
-<span class='line'>3724</span> * <ul>
-<span class='line'>3725</span> * <li>file: changes the source data for the graph</li>
-<span class='line'>3726</span> * <li>errorBars: changes whether the data contains stddev</li>
-<span class='line'>3727</span> * </ul>
-<span class='line'>3728</span> *
-<span class='line'>3729</span> * @param {Object} attrs The new properties and values
-<span class='line'>3730</span> */</span><span class="WHIT">
-<span class='line'>3731</span> </span><span class="NAME">Dygraph.prototype.updateOptions</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">attrs</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3732</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): this is a mess. Rethink this function.</span><span class="WHIT">
-<span class='line'>3733</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="STRN">'rollPeriod'</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3734</span> </span><span class="WHIT"> </span><span class="NAME">this.rollPeriod_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">attrs.rollPeriod</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3735</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3736</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="STRN">'dateWindow'</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3737</span> </span><span class="WHIT"> </span><span class="NAME">this.dateWindow_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">attrs.dateWindow</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3738</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="PUNC">(</span><span class="STRN">'isZoomedIgnoreProgrammaticZoom'</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3739</span> </span><span class="WHIT"> </span><span class="NAME">this.zoomed_x_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">attrs.dateWindow</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3740</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3741</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3742</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="STRN">'valueRange'</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="PUNC">(</span><span class="STRN">'isZoomedIgnoreProgrammaticZoom'</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3743</span> </span><span class="WHIT"> </span><span class="NAME">this.zoomed_y_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">attrs.valueRange</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3744</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3745</span>
-<span class='line'>3746</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): validate per-series options.</span><span class="WHIT">
-<span class='line'>3747</span> </span><span class="WHIT"> </span><span class="COMM">// Supported:</span><span class="WHIT">
-<span class='line'>3748</span> </span><span class="WHIT"> </span><span class="COMM">// strokeWidth</span><span class="WHIT">
-<span class='line'>3749</span> </span><span class="WHIT"> </span><span class="COMM">// pointSize</span><span class="WHIT">
-<span class='line'>3750</span> </span><span class="WHIT"> </span><span class="COMM">// drawPoints</span><span class="WHIT">
-<span class='line'>3751</span> </span><span class="WHIT"> </span><span class="COMM">// highlightCircleSize</span><span class="WHIT">
-<span class='line'>3752</span>
-<span class='line'>3753</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">this.user_attrs_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3754</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.update</span><span class="PUNC">(</span><span class="NAME">this.renderOptions_</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3755</span>
-<span class='line'>3756</span> </span><span class="WHIT"> </span><span class="NAME">this.labelsFromCSV_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"labels"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3757</span>
-<span class='line'>3758</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): this doesn't match the constructor logic</span><span class="WHIT">
-<span class='line'>3759</span> </span><span class="WHIT"> </span><span class="NAME">this.layout_.updateOptions</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="STRN">'errorBars'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"errorBars"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3760</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">attrs</span><span class="PUNC">[</span><span class="STRN">'file'</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3761</span> </span><span class="WHIT"> </span><span class="NAME">this.file_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">[</span><span class="STRN">'file'</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3762</span> </span><span class="WHIT"> </span><span class="NAME">this.start_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3763</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3764</span> </span><span class="WHIT"> </span><span class="NAME">this.predraw_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3765</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3766</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3767</span>
-<span class='line'>3768</span> </span><span class="COMM">/**
-<span class='line'>3769</span> * Resizes the dygraph. If no parameters are specified, resizes to fill the
-<span class='line'>3770</span> * containing div (which has presumably changed size since the dygraph was
-<span class='line'>3771</span> * instantiated. If the width/height are specified, the div will be resized.
-<span class='line'>3772</span> *
-<span class='line'>3773</span> * This is far more efficient than destroying and re-instantiating a
-<span class='line'>3774</span> * Dygraph, since it doesn't have to reparse the underlying data.
-<span class='line'>3775</span> *
-<span class='line'>3776</span> * @param {Number} [width] Width (in pixels)
-<span class='line'>3777</span> * @param {Number} [height] Height (in pixels)
-<span class='line'>3778</span> */</span><span class="WHIT">
-<span class='line'>3779</span> </span><span class="NAME">Dygraph.prototype.resize</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">width</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">height</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3780</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.resize_lock</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3781</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3782</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3783</span> </span><span class="WHIT"> </span><span class="NAME">this.resize_lock</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3784</span>
-<span class='line'>3785</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">width</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">height</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3786</span> </span><span class="WHIT"> </span><span class="NAME">this.warn</span><span class="PUNC">(</span><span class="STRN">"Dygraph.resize() should be called with zero parameters or "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3787</span> </span><span class="WHIT"> </span><span class="STRN">"two non-NULL parameters. Pretending it was zero."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3788</span> </span><span class="WHIT"> </span><span class="NAME">width</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">height</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3789</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3790</span>
-<span class='line'>3791</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): there should be a clear() method.</span><span class="WHIT">
-<span class='line'>3792</span> </span><span class="WHIT"> </span><span class="NAME">this.maindiv_.innerHTML</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3793</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_.labelsDiv</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3794</span>
-<span class='line'>3795</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">width</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3796</span> </span><span class="WHIT"> </span><span class="NAME">this.maindiv_.style.width</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">width</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3797</span> </span><span class="WHIT"> </span><span class="NAME">this.maindiv_.style.height</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">height</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3798</span> </span><span class="WHIT"> </span><span class="NAME">this.width_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">width</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3799</span> </span><span class="WHIT"> </span><span class="NAME">this.height_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">height</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3800</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3801</span> </span><span class="WHIT"> </span><span class="NAME">this.width_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.maindiv_.offsetWidth</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3802</span> </span><span class="WHIT"> </span><span class="NAME">this.height_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.maindiv_.offsetHeight</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3803</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3804</span>
-<span class='line'>3805</span> </span><span class="WHIT"> </span><span class="NAME">this.createInterface_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3806</span> </span><span class="WHIT"> </span><span class="NAME">this.predraw_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3807</span>
-<span class='line'>3808</span> </span><span class="WHIT"> </span><span class="NAME">this.resize_lock</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3809</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3810</span>
-<span class='line'>3811</span> </span><span class="COMM">/**
-<span class='line'>3812</span> * Adjusts the number of points in the rolling average. Updates the graph to
-<span class='line'>3813</span> * reflect the new averaging period.
-<span class='line'>3814</span> * @param {Number} length Number of points over which to average the data.
-<span class='line'>3815</span> */</span><span class="WHIT">
-<span class='line'>3816</span> </span><span class="NAME">Dygraph.prototype.adjustRoll</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">length</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3817</span> </span><span class="WHIT"> </span><span class="NAME">this.rollPeriod_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">length</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3818</span> </span><span class="WHIT"> </span><span class="NAME">this.predraw_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3819</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3820</span>
-<span class='line'>3821</span> </span><span class="COMM">/**
-<span class='line'>3822</span> * Returns a boolean array of visibility statuses.
-<span class='line'>3823</span> */</span><span class="WHIT">
-<span class='line'>3824</span> </span><span class="NAME">Dygraph.prototype.visibility</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3825</span> </span><span class="WHIT"> </span><span class="COMM">// Do lazy-initialization, so that this happens after we know the number of</span><span class="WHIT">
-<span class='line'>3826</span> </span><span class="WHIT"> </span><span class="COMM">// data series.</span><span class="WHIT">
-<span class='line'>3827</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"visibility"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3828</span> </span><span class="WHIT"> </span><span class="NAME">this.attrs_</span><span class="PUNC">[</span><span class="STRN">"visibility"</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3829</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3830</span> </span><span class="WHIT"> </span><span class="KEYW">while</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"visibility"</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">length</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.rawData_</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3831</span> </span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"visibility"</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">push</span><span class="PUNC">(</span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3832</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3833</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"visibility"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3834</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3835</span>
-<span class='line'>3836</span> </span><span class="COMM">/**
-<span class='line'>3837</span> * Changes the visiblity of a series.
-<span class='line'>3838</span> */</span><span class="WHIT">
-<span class='line'>3839</span> </span><span class="NAME">Dygraph.prototype.setVisibility</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">num</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3840</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.visibility</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3841</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">num</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">num</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NAME">x.length</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3842</span> </span><span class="WHIT"> </span><span class="NAME">this.warn</span><span class="PUNC">(</span><span class="STRN">"invalid series number in setVisibility: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">num</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3843</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3844</span> </span><span class="WHIT"> </span><span class="NAME">x</span><span class="PUNC">[</span><span class="NAME">num</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3845</span> </span><span class="WHIT"> </span><span class="NAME">this.predraw_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3846</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3847</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3848</span>
-<span class='line'>3849</span> </span><span class="COMM">/**
-<span class='line'>3850</span> * Update the list of annotations and redraw the chart.
-<span class='line'>3851</span> */</span><span class="WHIT">
-<span class='line'>3852</span> </span><span class="NAME">Dygraph.prototype.setAnnotations</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">ann</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">suppressDraw</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3853</span> </span><span class="WHIT"> </span><span class="COMM">// Only add the annotation CSS rule once we know it will be used.</span><span class="WHIT">
-<span class='line'>3854</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.addAnnotationRule</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3855</span> </span><span class="WHIT"> </span><span class="NAME">this.annotations_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ann</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3856</span> </span><span class="WHIT"> </span><span class="NAME">this.layout_.setAnnotations</span><span class="PUNC">(</span><span class="NAME">this.annotations_</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3857</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">suppressDraw</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3858</span> </span><span class="WHIT"> </span><span class="NAME">this.predraw_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3859</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3860</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3861</span>
-<span class='line'>3862</span> </span><span class="COMM">/**
-<span class='line'>3863</span> * Return the list of annotations.
-<span class='line'>3864</span> */</span><span class="WHIT">
-<span class='line'>3865</span> </span><span class="NAME">Dygraph.prototype.annotations</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3866</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.annotations_</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3867</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3868</span>
-<span class='line'>3869</span> </span><span class="COMM">/**
-<span class='line'>3870</span> * Get the index of a series (column) given its name. The first column is the
-<span class='line'>3871</span> * x-axis, so the data series start with index 1.
-<span class='line'>3872</span> */</span><span class="WHIT">
-<span class='line'>3873</span> </span><span class="NAME">Dygraph.prototype.indexFromSetName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">name</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3874</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">labels</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.attr_</span><span class="PUNC">(</span><span class="STRN">"labels"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3875</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">labels.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3876</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">labels</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3877</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3878</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3879</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3880</span>
-<span class='line'>3881</span> </span><span class="COMM">/**
-<span class='line'>3882</span> * @private
-<span class='line'>3883</span> * Adds a default style for the annotation CSS classes to the document. This is
-<span class='line'>3884</span> * only executed when annotations are actually used. It is designed to only be
-<span class='line'>3885</span> * called once -- all calls after the first will return immediately.
-<span class='line'>3886</span> */</span><span class="WHIT">
-<span class='line'>3887</span> </span><span class="NAME">Dygraph.addAnnotationRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3888</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">Dygraph.addedAnnotationCSS</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3889</span>
-<span class='line'>3890</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">rule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"border: 1px solid black; "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3891</span> </span><span class="WHIT"> </span><span class="STRN">"background-color: white; "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>3892</span> </span><span class="WHIT"> </span><span class="STRN">"text-align: center;"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3893</span>
-<span class='line'>3894</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">styleSheetElement</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElement</span><span class="PUNC">(</span><span class="STRN">"style"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3895</span> </span><span class="WHIT"> </span><span class="NAME">styleSheetElement.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"text/css"</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3896</span> </span><span class="WHIT"> </span><span class="NAME">document.getElementsByTagName</span><span class="PUNC">(</span><span class="STRN">"head"</span><span class="PUNC">)</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">appendChild</span><span class="PUNC">(</span><span class="NAME">styleSheetElement</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3897</span>
-<span class='line'>3898</span> </span><span class="WHIT"> </span><span class="COMM">// Find the first style sheet that we can access.</span><span class="WHIT">
-<span class='line'>3899</span> </span><span class="WHIT"> </span><span class="COMM">// We may not add a rule to a style sheet from another domain for security</span><span class="WHIT">
-<span class='line'>3900</span> </span><span class="WHIT"> </span><span class="COMM">// reasons. This sometimes comes up when using gviz, since the Google gviz JS</span><span class="WHIT">
-<span class='line'>3901</span> </span><span class="WHIT"> </span><span class="COMM">// adds its own style sheets from google.com.</span><span class="WHIT">
-<span class='line'>3902</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">document.styleSheets.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3903</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">document.styleSheets</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">disabled</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3904</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mysheet</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.styleSheets</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3905</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3906</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">mysheet.insertRule</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// Firefox</span><span class="WHIT">
-<span class='line'>3907</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">mysheet.cssRules</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">mysheet.cssRules.length</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3908</span> </span><span class="WHIT"> </span><span class="NAME">mysheet.insertRule</span><span class="PUNC">(</span><span class="STRN">".dygraphDefaultAnnotation { "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">rule</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" }"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3909</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">mysheet.addRule</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// IE</span><span class="WHIT">
-<span class='line'>3910</span> </span><span class="WHIT"> </span><span class="NAME">mysheet.addRule</span><span class="PUNC">(</span><span class="STRN">".dygraphDefaultAnnotation"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">rule</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3911</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3912</span> </span><span class="WHIT"> </span><span class="NAME">Dygraph.addedAnnotationCSS</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3913</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3914</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">err</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3915</span> </span><span class="WHIT"> </span><span class="COMM">// Was likely a security exception.</span><span class="WHIT">
-<span class='line'>3916</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3917</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3918</span>
-<span class='line'>3919</span> </span><span class="WHIT"> </span><span class="NAME">this.warn</span><span class="PUNC">(</span><span class="STRN">"Unable to add default annotation CSS rule; display may be off."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3920</span> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3921</span>
-<span class='line'>3922</span> </span><span class="COMM">/**
-<span class='line'>3923</span> * @private
-<span class='line'>3924</span> * Create a new canvas element. This is more complex than a simple
-<span class='line'>3925</span> * document.createElement("canvas") because of IE and excanvas.
-<span class='line'>3926</span> */</span><span class="WHIT">
-<span class='line'>3927</span> </span><span class="NAME">Dygraph.createCanvas</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3928</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">canvas</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElement</span><span class="PUNC">(</span><span class="STRN">"canvas"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3929</span>
-<span class='line'>3930</span> </span><span class="WHIT"> </span><span class="NAME">isIE</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="REGX">/MSIE/</span><span class="PUNC">.</span><span class="NAME">test</span><span class="PUNC">(</span><span class="NAME">navigator.userAgent</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">window.opera</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3931</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">isIE</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">G_vmlCanvasManager</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3932</span> </span><span class="WHIT"> </span><span class="NAME">canvas</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">G_vmlCanvasManager.initElement</span><span class="PUNC">(</span><span class="NAME">canvas</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3933</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3934</span>
-<span class='line'>3935</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">canvas</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3936</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3937</span>
-<span class='line'>3938</span>
-<span class='line'>3939</span> </span><span class="COMM">/**
-<span class='line'>3940</span> * A wrapper around Dygraph that implements the gviz API.
-<span class='line'>3941</span> * @param {Object} container The DOM object the visualization should live in.
-<span class='line'>3942</span> */</span><span class="WHIT">
-<span class='line'>3943</span> </span><span class="NAME">Dygraph.GVizChart</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">container</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3944</span> </span><span class="WHIT"> </span><span class="NAME">this.container</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">container</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3945</span> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3946</span>
-<span class='line'>3947</span> </span><span class="NAME">Dygraph.GVizChart.prototype.draw</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">data</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">options</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3948</span> </span><span class="WHIT"> </span><span class="COMM">// Clear out any existing dygraph.</span><span class="WHIT">
-<span class='line'>3949</span> </span><span class="WHIT"> </span><span class="COMM">// TODO(danvk): would it make more sense to simply redraw using the current</span><span class="WHIT">
-<span class='line'>3950</span> </span><span class="WHIT"> </span><span class="COMM">// date_graph object?</span><span class="WHIT">
-<span class='line'>3951</span> </span><span class="WHIT"> </span><span class="NAME">this.container.innerHTML</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3952</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">this.date_graph</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3953</span> </span><span class="WHIT"> </span><span class="NAME">this.date_graph.destroy</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3954</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3955</span>
-<span class='line'>3956</span> </span><span class="WHIT"> </span><span class="NAME">this.date_graph</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Dygraph</span><span class="PUNC">(</span><span class="NAME">this.container</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">data</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">options</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3957</span> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3958</span>
-<span class='line'>3959</span> </span><span class="COMM">/**
-<span class='line'>3960</span> * Google charts compatible setSelection
-<span class='line'>3961</span> * Only row selection is supported, all points in the row will be highlighted
-<span class='line'>3962</span> * @param {Array} array of the selected cells
-<span class='line'>3963</span> * @public
-<span class='line'>3964</span> */</span><span class="WHIT">
-<span class='line'>3965</span> </span><span class="NAME">Dygraph.GVizChart.prototype.setSelection</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">selection_array</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3966</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">row</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3967</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">selection_array.length</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3968</span> </span><span class="WHIT"> </span><span class="NAME">row</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">selection_array</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">row</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3969</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3970</span> </span><span class="WHIT"> </span><span class="NAME">this.date_graph.setSelection</span><span class="PUNC">(</span><span class="NAME">row</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3971</span> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3972</span>
-<span class='line'>3973</span> </span><span class="COMM">/**
-<span class='line'>3974</span> * Google charts compatible getSelection implementation
-<span class='line'>3975</span> * @return {Array} array of the selected cells
-<span class='line'>3976</span> * @public
-<span class='line'>3977</span> */</span><span class="WHIT">
-<span class='line'>3978</span> </span><span class="NAME">Dygraph.GVizChart.prototype.getSelection</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3979</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">selection</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3980</span>
-<span class='line'>3981</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">row</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.date_graph.getSelection</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3982</span>
-<span class='line'>3983</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">row</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">selection</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3984</span>
-<span class='line'>3985</span> </span><span class="WHIT"> </span><span class="NAME">col</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3986</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">this.date_graph.layout_.datasets</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>3987</span> </span><span class="WHIT"> </span><span class="NAME">selection.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">row</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">row</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">column</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">col</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3988</span> </span><span class="WHIT"> </span><span class="NAME">col</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3989</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3990</span>
-<span class='line'>3991</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">selection</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3992</span> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>3993</span>
-<span class='line'>3994</span> </span><span class="COMM">// Older pages may still use this name.</span><span class="WHIT">
-<span class='line'>3995</span> </span><span class="NAME">DateGraph</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>3996</span>
-<span class='line'>3997</span> </span><span class="COMM">// <REMOVE_FOR_COMBINED></span><span class="WHIT">
-<span class='line'>3998</span> </span><span class="NAME">Dygraph.OPTIONS_REFERENCE</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="COMM">// <JSON></span><span class="WHIT">
-<span class='line'>3999</span> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4000</span> </span><span class="WHIT"> </span><span class="STRN">"xValueParser"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4001</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"parseFloat() or Date.parse()*"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4002</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"CSV parsing"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4003</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(str) -> number"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4004</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"A function which parses x-values (i.e. the dependent series). Must return a number, even when the values are dates. In this case, millis since epoch are used. This is used primarily for parsing CSV data. *=Dygraphs is slightly more accepting in the dates which it will parse. See code for details."</span><span class="WHIT">
-<span class='line'>4005</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4006</span> </span><span class="WHIT"> </span><span class="STRN">"stackedGraph"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4007</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4008</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Data Line display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4009</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4010</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"If set, stack series on top of one another rather than drawing them independently."</span><span class="WHIT">
-<span class='line'>4011</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4012</span> </span><span class="WHIT"> </span><span class="STRN">"pointSize"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4013</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"1"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4014</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Data Line display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4015</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4016</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"The size of the dot to draw on each point in pixels (see drawPoints). A dot is always drawn when a point is \"isolated\", i.e. there is a missing point on either side of it. This also controls the size of those dots."</span><span class="WHIT">
-<span class='line'>4017</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4018</span> </span><span class="WHIT"> </span><span class="STRN">"labelsDivStyles"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4019</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4020</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Legend"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4021</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"{}"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4022</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Additional styles to apply to the currently-highlighted points div. For example, { 'font-weight': 'bold' } will make the labels bold."</span><span class="WHIT">
-<span class='line'>4023</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4024</span> </span><span class="WHIT"> </span><span class="STRN">"drawPoints"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4025</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4026</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Data Line display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4027</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4028</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Draw a small dot at each point, in addition to a line going through the point. This makes the individual data points easier to see, but can increase visual clutter in the chart."</span><span class="WHIT">
-<span class='line'>4029</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4030</span> </span><span class="WHIT"> </span><span class="STRN">"height"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4031</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"320"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4032</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Overall display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4033</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4034</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Height, in pixels, of the chart. If the container div has been explicitly sized, this will be ignored."</span><span class="WHIT">
-<span class='line'>4035</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4036</span> </span><span class="WHIT"> </span><span class="STRN">"zoomCallback"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4037</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4038</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Callbacks"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4039</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(minDate, maxDate, yRanges)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4040</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"A function to call when the zoom window is changed (either by zooming in or out). minDate and maxDate are milliseconds since epoch. yRanges is an array of [bottom, top] pairs, one for each y-axis."</span><span class="WHIT">
-<span class='line'>4041</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4042</span> </span><span class="WHIT"> </span><span class="STRN">"pointClickCallback"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4043</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4044</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Callbacks"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Interactive Elements"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4045</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4046</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">""</span><span class="WHIT">
-<span class='line'>4047</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4048</span> </span><span class="WHIT"> </span><span class="STRN">"colors"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4049</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"(see description)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4050</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Data Series Colors"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4051</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"array<string>"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4052</span> </span><span class="WHIT"> </span><span class="STRN">"example"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"['red', '#00FF00']"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4053</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"List of colors for the data series. These can be of the form \"#AABBCC\" or \"rgb(255,100,200)\" or \"yellow\", etc. If not specified, equally-spaced points around a color wheel are used."</span><span class="WHIT">
-<span class='line'>4054</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4055</span> </span><span class="WHIT"> </span><span class="STRN">"connectSeparatedPoints"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4056</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4057</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Data Line display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4058</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4059</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Usually, when Dygraphs encounters a missing value in a data series, it interprets this as a gap and draws it as such. If, instead, the missing values represents an x-value for which only a different series has data, then you'll want to connect the dots by setting this to true. To explicitly include a gap with this option set, use a value of NaN."</span><span class="WHIT">
-<span class='line'>4060</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4061</span> </span><span class="WHIT"> </span><span class="STRN">"highlightCallback"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4062</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4063</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Callbacks"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4064</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(event, x, points,row)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4065</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"When set, this callback gets called every time a new point is highlighted. The parameters are the JavaScript mousemove event, the x-coordinate of the highlighted points and an array of highlighted points: <code>[ {name: 'series', yval: y-value}, … ]</code>"</span><span class="WHIT">
-<span class='line'>4066</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4067</span> </span><span class="WHIT"> </span><span class="STRN">"includeZero"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4068</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4069</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4070</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4071</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Usually, dygraphs will use the range of the data plus some padding to set the range of the y-axis. If this option is set, the y-axis will always include zero, typically as the lowest value. This can be used to avoid exaggerating the variance in the data"</span><span class="WHIT">
-<span class='line'>4072</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4073</span> </span><span class="WHIT"> </span><span class="STRN">"rollPeriod"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4074</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"1"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4075</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Error Bars"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Rolling Averages"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4076</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer >= 1"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4077</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Number of days over which to average data. Discussed extensively above."</span><span class="WHIT">
-<span class='line'>4078</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4079</span> </span><span class="WHIT"> </span><span class="STRN">"unhighlightCallback"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4080</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4081</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Callbacks"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4082</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(event)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4083</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"When set, this callback gets called every time the user stops highlighting any point by mousing out of the graph. The parameter is the mouseout event."</span><span class="WHIT">
-<span class='line'>4084</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4085</span> </span><span class="WHIT"> </span><span class="STRN">"axisTickSize"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4086</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"3.0"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4087</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4088</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"number"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4089</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"The size of the line to display next to each tick mark on x- or y-axes."</span><span class="WHIT">
-<span class='line'>4090</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4091</span> </span><span class="WHIT"> </span><span class="STRN">"labelsSeparateLines"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4092</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4093</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Legend"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4094</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4095</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Put <code><br/></code> between lines in the label string. Often used in conjunction with <strong>labelsDiv</strong>."</span><span class="WHIT">
-<span class='line'>4096</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4097</span> </span><span class="WHIT"> </span><span class="STRN">"xValueFormatter"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4098</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"(Round to 2 decimal places)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4099</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4100</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(x)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4101</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Function to provide a custom display format for the X value for mouseover."</span><span class="WHIT">
-<span class='line'>4102</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4103</span> </span><span class="WHIT"> </span><span class="STRN">"pixelsPerYLabel"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4104</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4105</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Grid"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4106</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4107</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Number of pixels to require between each x- and y-label. Larger values will yield a sparser axis with fewer ticks."</span><span class="WHIT">
-<span class='line'>4108</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4109</span> </span><span class="WHIT"> </span><span class="STRN">"annotationMouseOverHandler"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4110</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4111</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Annotations"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4112</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(annotation, point, dygraph, event)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4113</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"If provided, this function is called whenever the user mouses over an annotation."</span><span class="WHIT">
-<span class='line'>4114</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4115</span> </span><span class="WHIT"> </span><span class="STRN">"annotationMouseOutHandler"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4116</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4117</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Annotations"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4118</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(annotation, point, dygraph, event)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4119</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"If provided, this function is called whenever the user mouses out of an annotation."</span><span class="WHIT">
-<span class='line'>4120</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4121</span> </span><span class="WHIT"> </span><span class="STRN">"annotationClickHandler"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4122</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4123</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Annotations"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4124</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(annotation, point, dygraph, event)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4125</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"If provided, this function is called whenever the user clicks on an annotation."</span><span class="WHIT">
-<span class='line'>4126</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4127</span> </span><span class="WHIT"> </span><span class="STRN">"annotationDblClickHandler"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4128</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4129</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Annotations"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4130</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(annotation, point, dygraph, event)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4131</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"If provided, this function is called whenever the user double-clicks on an annotation."</span><span class="WHIT">
-<span class='line'>4132</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4133</span> </span><span class="WHIT"> </span><span class="STRN">"drawCallback"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4134</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4135</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Callbacks"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4136</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(dygraph, is_initial)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4137</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"When set, this callback gets called every time the dygraph is drawn. This includes the initial draw, after zooming and repeatedly while panning. The first parameter is the dygraph being drawn. The second is a boolean value indicating whether this is the initial draw."</span><span class="WHIT">
-<span class='line'>4138</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4139</span> </span><span class="WHIT"> </span><span class="STRN">"labelsKMG2"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4140</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4141</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Value display/formatting"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4142</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4143</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Show k/M/G for kilo/Mega/Giga on y-axis. This is different than <code>labelsKMB</code> in that it uses base 2, not 10."</span><span class="WHIT">
-<span class='line'>4144</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4145</span> </span><span class="WHIT"> </span><span class="STRN">"delimiter"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4146</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">","</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4147</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"CSV parsing"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4148</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4149</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"The delimiter to look for when separating fields of a CSV file. Setting this to a tab is not usually necessary, since tab-delimited data is auto-detected."</span><span class="WHIT">
-<span class='line'>4150</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4151</span> </span><span class="WHIT"> </span><span class="STRN">"axisLabelFontSize"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4152</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"14"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4153</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4154</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4155</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Size of the font (in pixels) to use in the axis labels, both x- and y-axis."</span><span class="WHIT">
-<span class='line'>4156</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4157</span> </span><span class="WHIT"> </span><span class="STRN">"underlayCallback"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4158</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4159</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Callbacks"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4160</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(canvas, area, dygraph)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4161</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"When set, this callback gets called before the chart is drawn. It details on how to use this."</span><span class="WHIT">
-<span class='line'>4162</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4163</span> </span><span class="WHIT"> </span><span class="STRN">"width"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4164</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"480"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4165</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Overall display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4166</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4167</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Width, in pixels, of the chart. If the container div has been explicitly sized, this will be ignored."</span><span class="WHIT">
-<span class='line'>4168</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4169</span> </span><span class="WHIT"> </span><span class="STRN">"interactionModel"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4170</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"..."</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4171</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Interactive Elements"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4172</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Object"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4173</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"TODO(konigsberg): document this"</span><span class="WHIT">
-<span class='line'>4174</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4175</span> </span><span class="WHIT"> </span><span class="STRN">"xTicker"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4176</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Dygraph.dateTicker or Dygraph.numericTicks"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4177</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4178</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(min, max, dygraph) -> [{v: ..., label: ...}, ...]"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4179</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"This lets you specify an arbitrary function to generate tick marks on an axis. The tick marks are an array of (value, label) pairs. The built-in functions go to great lengths to choose good tick marks so, if you set this option, you'll most likely want to call one of them and modify the result."</span><span class="WHIT">
-<span class='line'>4180</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4181</span> </span><span class="WHIT"> </span><span class="STRN">"xAxisLabelWidth"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4182</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"50"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4183</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4184</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4185</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Width, in pixels, of the x-axis labels."</span><span class="WHIT">
-<span class='line'>4186</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4187</span> </span><span class="WHIT"> </span><span class="STRN">"showLabelsOnHighlight"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4188</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"true"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4189</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Interactive Elements"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Legend"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4190</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4191</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Whether to show the legend upon mouseover."</span><span class="WHIT">
-<span class='line'>4192</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4193</span> </span><span class="WHIT"> </span><span class="STRN">"axis"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4194</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"(none)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4195</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4196</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"string or object"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4197</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Set to either an object ({}) filled with options for this axis or to the name of an existing data series with its own axis to re-use that axis. See tests for usage."</span><span class="WHIT">
-<span class='line'>4198</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4199</span> </span><span class="WHIT"> </span><span class="STRN">"pixelsPerXLabel"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4200</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"60"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4201</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Grid"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4202</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4203</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Number of pixels to require between each x- and y-label. Larger values will yield a sparser axis with fewer ticks."</span><span class="WHIT">
-<span class='line'>4204</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4205</span> </span><span class="WHIT"> </span><span class="STRN">"labelsDiv"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4206</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4207</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Legend"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4208</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"DOM element or string"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4209</span> </span><span class="WHIT"> </span><span class="STRN">"example"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"<code style='font-size: small'>document.getElementById('foo')</code>or<code>'foo'"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4210</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Show data labels in an external div, rather than on the graph. This value can either be a div element or a div id."</span><span class="WHIT">
-<span class='line'>4211</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4212</span> </span><span class="WHIT"> </span><span class="STRN">"fractions"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4213</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4214</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"CSV parsing"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Error Bars"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4215</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4216</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"When set, attempt to parse each cell in the CSV file as \"a/b\", where a and b are integers. The ratio will be plotted. This allows computation of Wilson confidence intervals (see below)."</span><span class="WHIT">
-<span class='line'>4217</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4218</span> </span><span class="WHIT"> </span><span class="STRN">"logscale"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4219</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4220</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4221</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4222</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"When set for a y-axis, the graph shows that axis in log scale. Any values less than or equal to zero are not displayed.\n\nNot compatible with showZero, and ignores connectSeparatedPoints. Also, showing log scale with valueRanges that are less than zero will result in an unviewable graph."</span><span class="WHIT">
-<span class='line'>4223</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4224</span> </span><span class="WHIT"> </span><span class="STRN">"strokeWidth"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4225</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"1.0"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4226</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Data Line display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4227</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4228</span> </span><span class="WHIT"> </span><span class="STRN">"example"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"0.5, 2.0"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4229</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"The width of the lines connecting data points. This can be used to increase the contrast or some graphs."</span><span class="WHIT">
-<span class='line'>4230</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4231</span> </span><span class="WHIT"> </span><span class="STRN">"wilsonInterval"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4232</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"true"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4233</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Error Bars"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4234</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4235</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Use in conjunction with the \"fractions\" option. Instead of plotting +/- N standard deviations, dygraphs will compute a Wilson confidence interval and plot that. This has more reasonable behavior for ratios close to 0 or 1."</span><span class="WHIT">
-<span class='line'>4236</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4237</span> </span><span class="WHIT"> </span><span class="STRN">"fillGraph"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4238</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4239</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Data Line display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4240</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4241</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Should the area underneath the graph be filled? This option is not compatible with error bars."</span><span class="WHIT">
-<span class='line'>4242</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4243</span> </span><span class="WHIT"> </span><span class="STRN">"highlightCircleSize"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4244</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"3"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4245</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Interactive Elements"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4246</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4247</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"The size in pixels of the dot drawn over highlighted points."</span><span class="WHIT">
-<span class='line'>4248</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4249</span> </span><span class="WHIT"> </span><span class="STRN">"gridLineColor"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4250</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"rgb(128,128,128)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4251</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Grid"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4252</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"red, blue"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4253</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"The color of the gridlines."</span><span class="WHIT">
-<span class='line'>4254</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4255</span> </span><span class="WHIT"> </span><span class="STRN">"visibility"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4256</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"[true, true, ...]"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4257</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Data Line display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4258</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Array of booleans"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4259</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Which series should initially be visible? Once the Dygraph has been constructed, you can access and modify the visibility of each series using the <code>visibility</code> and <code>setVisibility</code> methods."</span><span class="WHIT">
-<span class='line'>4260</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4261</span> </span><span class="WHIT"> </span><span class="STRN">"valueRange"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4262</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Full range of the input is shown"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4263</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4264</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Array of two numbers"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4265</span> </span><span class="WHIT"> </span><span class="STRN">"example"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"[10, 110]"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4266</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Explicitly set the vertical range of the graph to [low, high]."</span><span class="WHIT">
-<span class='line'>4267</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4268</span> </span><span class="WHIT"> </span><span class="STRN">"labelsDivWidth"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4269</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"250"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4270</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Legend"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4271</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4272</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Width (in pixels) of the div which shows information on the currently-highlighted points."</span><span class="WHIT">
-<span class='line'>4273</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4274</span> </span><span class="WHIT"> </span><span class="STRN">"colorSaturation"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4275</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"1.0"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4276</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Data Series Colors"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4277</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"0.0 - 1.0"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4278</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"If <strong>colors</strong> is not specified, saturation of the automatically-generated data series colors."</span><span class="WHIT">
-<span class='line'>4279</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4280</span> </span><span class="WHIT"> </span><span class="STRN">"yAxisLabelWidth"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4281</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"50"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4282</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4283</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4284</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Width, in pixels, of the y-axis labels."</span><span class="WHIT">
-<span class='line'>4285</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4286</span> </span><span class="WHIT"> </span><span class="STRN">"hideOverlayOnMouseOut"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4287</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"true"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4288</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Interactive Elements"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Legend"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4289</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4290</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Whether to hide the legend when the mouse leaves the chart area."</span><span class="WHIT">
-<span class='line'>4291</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4292</span> </span><span class="WHIT"> </span><span class="STRN">"yValueFormatter"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4293</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"(Round to 2 decimal places)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4294</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4295</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(x)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4296</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Function to provide a custom display format for the Y value for mouseover."</span><span class="WHIT">
-<span class='line'>4297</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4298</span> </span><span class="WHIT"> </span><span class="STRN">"legend"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4299</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"onmouseover"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4300</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Legend"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4301</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4302</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"When to display the legend. By default, it only appears when a user mouses over the chart. Set it to \"always\" to always display a legend of some sort."</span><span class="WHIT">
-<span class='line'>4303</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4304</span> </span><span class="WHIT"> </span><span class="STRN">"labelsShowZeroValues"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4305</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"true"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4306</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Legend"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4307</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4308</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Show zero value labels in the labelsDiv."</span><span class="WHIT">
-<span class='line'>4309</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4310</span> </span><span class="WHIT"> </span><span class="STRN">"stepPlot"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4311</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4312</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Data Line display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4313</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4314</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"When set, display the graph as a step plot instead of a line plot."</span><span class="WHIT">
-<span class='line'>4315</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4316</span> </span><span class="WHIT"> </span><span class="STRN">"labelsKMB"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4317</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4318</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Value display/formatting"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4319</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4320</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Show K/M/B for thousands/millions/billions on y-axis."</span><span class="WHIT">
-<span class='line'>4321</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4322</span> </span><span class="WHIT"> </span><span class="STRN">"rightGap"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4323</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"5"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4324</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Overall display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4325</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4326</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Number of pixels to leave blank at the right edge of the Dygraph. This makes it easier to highlight the right-most data point."</span><span class="WHIT">
-<span class='line'>4327</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4328</span> </span><span class="WHIT"> </span><span class="STRN">"avoidMinZero"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4329</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4330</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4331</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4332</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"When set, the heuristic that fixes the Y axis at zero for a data set with the minimum Y value of zero is disabled. \nThis is particularly useful for data sets that contain many zero values, especially for step plots which may otherwise have lines not visible running along the bottom axis."</span><span class="WHIT">
-<span class='line'>4333</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4334</span> </span><span class="WHIT"> </span><span class="STRN">"xAxisLabelFormatter"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4335</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Dygraph.dateAxisFormatter"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4336</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Value display/formatting"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4337</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(date, granularity)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4338</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Function to call to format values along the x axis."</span><span class="WHIT">
-<span class='line'>4339</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4340</span> </span><span class="WHIT"> </span><span class="STRN">"clickCallback"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4341</span> </span><span class="WHIT"> </span><span class="STRN">"snippet"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(e, date){<br> alert(date);<br>}"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4342</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4343</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Callbacks"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4344</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(e, date)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4345</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"A function to call when a data point is clicked. The function should take two arguments, the event object for the click and the date that was clicked."</span><span class="WHIT">
-<span class='line'>4346</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4347</span> </span><span class="WHIT"> </span><span class="STRN">"yAxisLabelFormatter"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4348</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"yValueFormatter"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4349</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Value display/formatting"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4350</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"function(x)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4351</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Function used to format values along the Y axis. By default it uses the same as the <code>yValueFormatter</code> unless specified."</span><span class="WHIT">
-<span class='line'>4352</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4353</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4354</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"[\"X\", \"Y1\", \"Y2\", ...]*"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4355</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Legend"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4356</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"array<string>"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4357</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"A name for each data series, including the independent (X) series. For CSV files and DataTable objections, this is determined by context. For raw data, this must be specified. If it is not, default values are supplied and a warning is logged."</span><span class="WHIT">
-<span class='line'>4358</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4359</span> </span><span class="WHIT"> </span><span class="STRN">"dateWindow"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4360</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Full range of the input is shown"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4361</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis display"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4362</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Array of two Dates or numbers"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4363</span> </span><span class="WHIT"> </span><span class="STRN">"example"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"[<br> Date.parse('2006-01-01'),<br> (new Date()).valueOf()<br>]"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4364</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Initially zoom in on a section of the graph. Is of the form [earliest, latest], where earliest/latest are milliseconds since epoch. If the data for the x-axis is numeric, the values in dateWindow must also be numbers."</span><span class="WHIT">
-<span class='line'>4365</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4366</span> </span><span class="WHIT"> </span><span class="STRN">"showRoller"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4367</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4368</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Interactive Elements"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Rolling Averages"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4369</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4370</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"If the rolling average period text box should be shown."</span><span class="WHIT">
-<span class='line'>4371</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4372</span> </span><span class="WHIT"> </span><span class="STRN">"sigma"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4373</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"2.0"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4374</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Error Bars"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4375</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"float"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4376</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"When errorBars is set, shade this many standard deviations above/below each point."</span><span class="WHIT">
-<span class='line'>4377</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4378</span> </span><span class="WHIT"> </span><span class="STRN">"customBars"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4379</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4380</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"CSV parsing"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Error Bars"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4381</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4382</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"When set, parse each CSV cell as \"low;middle;high\". Error bars will be drawn for each point between low and high, with the series itself going through middle."</span><span class="WHIT">
-<span class='line'>4383</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4384</span> </span><span class="WHIT"> </span><span class="STRN">"colorValue"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4385</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"1.0"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4386</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Data Series Colors"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4387</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"float (0.0 - 1.0)"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4388</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"If colors is not specified, value of the data series colors, as in hue/saturation/value. (0.0-1.0, default 0.5)"</span><span class="WHIT">
-<span class='line'>4389</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4390</span> </span><span class="WHIT"> </span><span class="STRN">"errorBars"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4391</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4392</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"CSV parsing"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Error Bars"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4393</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4394</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Does the data contain standard deviations? Setting this to true alters the input format (see above)."</span><span class="WHIT">
-<span class='line'>4395</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4396</span> </span><span class="WHIT"> </span><span class="STRN">"displayAnnotations"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4397</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4398</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Annotations"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4399</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4400</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Only applies when Dygraphs is used as a GViz chart. Causes string columns following a data series to be interpreted as annotations on points in that series. This is the same format used by Google's AnnotatedTimeLine chart."</span><span class="WHIT">
-<span class='line'>4401</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4402</span> </span><span class="WHIT"> </span><span class="STRN">"panEdgeFraction"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4403</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4404</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Axis Display"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Interactive Elements"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4405</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"float"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4406</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4407</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"A value representing the farthest a graph may be panned, in percent of the display. For example, a value of 0.1 means that the graph can only be panned 10% pased the edges of the displayed values. null means no bounds."</span><span class="WHIT">
-<span class='line'>4408</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4409</span> </span><span class="WHIT"> </span><span class="STRN">"title"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4410</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Chart labels"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4411</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4412</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4413</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Text to display above the chart. You can supply any HTML for this value, not just text. If you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-title' classes."</span><span class="WHIT">
-<span class='line'>4414</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4415</span> </span><span class="WHIT"> </span><span class="STRN">"titleHeight"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4416</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"18"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4417</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Chart labels"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4418</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4419</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Height of the chart title, in pixels. This also controls the default font size of the title. If you style the title on your own, this controls how much space is set aside above the chart for the title's div."</span><span class="WHIT">
-<span class='line'>4420</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4421</span> </span><span class="WHIT"> </span><span class="STRN">"xlabel"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4422</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Chart labels"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4423</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4424</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4425</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Text to display below the chart's x-axis. You can supply any HTML for this value, not just text. If you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-xlabel' classes."</span><span class="WHIT">
-<span class='line'>4426</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4427</span> </span><span class="WHIT"> </span><span class="STRN">"xLabelHeight"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4428</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Chart labels"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4429</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4430</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"18"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4431</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Height of the x-axis label, in pixels. This also controls the default font size of the x-axis label. If you style the label on your own, this controls how much space is set aside below the chart for the x-axis label's div."</span><span class="WHIT">
-<span class='line'>4432</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4433</span> </span><span class="WHIT"> </span><span class="STRN">"ylabel"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4434</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Chart labels"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4435</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4436</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4437</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Text to display to the left of the chart's y-axis. You can supply any HTML for this value, not just text. If you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-ylabel' classes. The text will be rotated 90 degrees by default, so CSS rules may behave in unintuitive ways. No additional space is set aside for a y-axis label. If you need more space, increase the width of the y-axis tick labels using the yAxisLabelWidth option. If you need a wider div for the y-axis label, either style it that way with CSS (but remember that it's rotated, so width is controlled by the 'height' property) or set the yLabelWidth option."</span><span class="WHIT">
-<span class='line'>4438</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4439</span> </span><span class="WHIT"> </span><span class="STRN">"yLabelWidth"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4440</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Chart labels"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4441</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4442</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"18"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4443</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Width of the div which contains the y-axis label. Since the y-axis label appears rotated 90 degrees, this actually affects the height of its div."</span><span class="WHIT">
-<span class='line'>4444</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4445</span> </span><span class="WHIT"> </span><span class="STRN">"isZoomedIgnoreProgrammaticZoom"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4446</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"false"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4447</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Zooming"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4448</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"boolean"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4449</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"When this option is passed to updateOptions() along with either the <code>dateWindow</code> or <code>valueRange</code> options, the zoom flags are not changed to reflect a zoomed state. This is primarily useful for when the display area of a chart is changed programmatically and also where manual zooming is allowed and use is made of the <code>isZoomed</code> method to determine this."</span><span class="WHIT">
-<span class='line'>4450</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4451</span> </span><span class="WHIT"> </span><span class="STRN">"sigFigs"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4452</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"null"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4453</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Value display/formatting"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4454</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4455</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"By default, dygraphs displays numbers with a fixed number of digits after the decimal point. If you'd prefer to have a fixed number of significant figures, set this option to that number of sig figs. A value of 2, for instance, would cause 1 to be display as 1.0 and 1234 to be displayed as 1.23e+3."</span><span class="WHIT">
-<span class='line'>4456</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4457</span> </span><span class="WHIT"> </span><span class="STRN">"digitsAfterDecimal"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4458</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"2"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4459</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Value display/formatting"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4460</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4461</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"Unless it's run in scientific mode (see the <code>sigFigs</code> option), dygraphs displays numbers with <code>digitsAfterDecimal</code> digits after the decimal point. Trailing zeros are not displayed, so with a value of 2 you'll get '0', '0.1', '0.12', '123.45' but not '123.456' (it will be rounded to '123.46'). Numbers with absolute value less than 0.1^digitsAfterDecimal (i.e. those which would show up as '0.00') will be displayed in scientific notation."</span><span class="WHIT">
-<span class='line'>4462</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4463</span> </span><span class="WHIT"> </span><span class="STRN">"maxNumberWidth"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4464</span> </span><span class="WHIT"> </span><span class="STRN">"default"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"6"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4465</span> </span><span class="WHIT"> </span><span class="STRN">"labels"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Value display/formatting"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4466</span> </span><span class="WHIT"> </span><span class="STRN">"type"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"integer"</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4467</span> </span><span class="WHIT"> </span><span class="STRN">"description"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"When displaying numbers in normal (not scientific) mode, large numbers will be displayed with many trailing zeros (e.g. 100000000 instead of 1e9). This can lead to unwieldy y-axis labels. If there are more than <code>maxNumberWidth</code> digits to the left of the decimal in a number, dygraphs will switch to scientific notation, even when not operating in scientific mode. If you'd like to see all those digits, set this to something large, like 20 or 30."</span><span class="WHIT">
-<span class='line'>4468</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>4469</span> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>4470</span> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// </JSON></span><span class="WHIT">
-<span class='line'>4471</span> </span><span class="COMM">// NOTE: in addition to parsing as JS, this snippet is expected to be valid</span><span class="WHIT">
-<span class='line'>4472</span> </span><span class="COMM">// JSON. This assumption cannot be checked in JS, but it will be checked when</span><span class="WHIT">
-<span class='line'>4473</span> </span><span class="COMM">// documentation is generated by the generate-documentation.py script. For the</span><span class="WHIT">
-<span class='line'>4474</span> </span><span class="COMM">// most part, this just means that you should always use double quotes.</span><span class="WHIT">
-<span class='line'>4475</span>
-<span class='line'>4476</span> </span><span class="COMM">// Do a quick sanity check on the options reference.</span><span class="WHIT">
-<span class='line'>4477</span> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4478</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">warn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">msg</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">console</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">console.warn</span><span class="PUNC">(</span><span class="NAME">msg</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>4479</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">flds</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">'type'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'default'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'description'</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>4480</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">valid_cats</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT">
-<span class='line'>4481</span> </span><span class="STRN">'Annotations'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4482</span> </span><span class="WHIT"> </span><span class="STRN">'Axis display'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4483</span> </span><span class="WHIT"> </span><span class="STRN">'Chart labels'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4484</span> </span><span class="WHIT"> </span><span class="STRN">'CSV parsing'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4485</span> </span><span class="WHIT"> </span><span class="STRN">'Callbacks'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4486</span> </span><span class="WHIT"> </span><span class="STRN">'Data Line display'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4487</span> </span><span class="WHIT"> </span><span class="STRN">'Data Series Colors'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4488</span> </span><span class="WHIT"> </span><span class="STRN">'Error Bars'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4489</span> </span><span class="WHIT"> </span><span class="STRN">'Grid'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4490</span> </span><span class="WHIT"> </span><span class="STRN">'Interactive Elements'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4491</span> </span><span class="WHIT"> </span><span class="STRN">'Legend'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4492</span> </span><span class="WHIT"> </span><span class="STRN">'Overall display'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4493</span> </span><span class="WHIT"> </span><span class="STRN">'Rolling Averages'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4494</span> </span><span class="WHIT"> </span><span class="STRN">'Value display/formatting'</span><span class="PUNC">,</span><span class="WHIT">
-<span class='line'>4495</span> </span><span class="WHIT"> </span><span class="STRN">'Zooming'</span><span class="WHIT">
-<span class='line'>4496</span> </span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>4497</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">cats</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>4498</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">valid_cats.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">cats</span><span class="PUNC">[</span><span class="NAME">valid_cats</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>4499</span>
-<span class='line'>4500</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">k</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">Dygraph.OPTIONS_REFERENCE</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4501</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">Dygraph.OPTIONS_REFERENCE.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">k</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>4502</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">op</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Dygraph.OPTIONS_REFERENCE</span><span class="PUNC">[</span><span class="NAME">k</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>4503</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">flds.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4504</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">op.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">flds</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4505</span> </span><span class="WHIT"> </span><span class="NAME">warn</span><span class="PUNC">(</span><span class="STRN">'Option '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">k</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' missing "'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">flds</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'" property'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>4506</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">op</span><span class="PUNC">[</span><span class="NAME">flds</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'string'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4507</span> </span><span class="WHIT"> </span><span class="NAME">warn</span><span class="PUNC">(</span><span class="NAME">k</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'.'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">flds</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' must be of type string'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>4508</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>4509</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>4510</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">labels</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">op</span><span class="PUNC">[</span><span class="STRN">'labels'</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>4511</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="PUNC">(</span><span class="NAME">labels</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="STRN">'object'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4512</span> </span><span class="WHIT"> </span><span class="NAME">warn</span><span class="PUNC">(</span><span class="STRN">'Option "'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">k</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'" is missing a "labels": [...] option'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>4513</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">labels.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4514</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">cats.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">labels</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
-<span class='line'>4515</span> </span><span class="WHIT"> </span><span class="NAME">warn</span><span class="PUNC">(</span><span class="STRN">'Option "'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">k</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'" has label "'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">labels</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
-<span class='line'>4516</span> </span><span class="WHIT"> </span><span class="STRN">'", which is invalid.'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>4517</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>4518</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>4519</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>4520</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
-<span class='line'>4521</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
-<span class='line'>4522</span> </span><span class="COMM">// </REMOVE_FOR_COMBINED></span><span class="WHIT">
-<span class='line'>4523</span> </span></pre></body></html>
\ No newline at end of file