1*eeb7e5b3SAdam Hornáček<?xml version="1.0" encoding="UTF-8"?> 2*eeb7e5b3SAdam Hornáček<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3*eeb7e5b3SAdam Hornáček "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 4*eeb7e5b3SAdam Hornáček<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" 5*eeb7e5b3SAdam Hornáček class="xref"> 6*eeb7e5b3SAdam Hornáček<head> 7*eeb7e5b3SAdam Hornáček<title>sampleFile - OpenGrok cross reference for /sampleFile</title></head><body> 8*eeb7e5b3SAdam Hornáček<script type="text/javascript">/* <![CDATA[ */ 9*eeb7e5b3SAdam Hornáčekfunction get_sym_list(){return [["Class","xc",[["Array",247],["Heatmap",29],["dataAttr",190]]],["Function","xf",[["AnonymousFunction0e6e45030100",69]]],["Method","xmt",[["bind_tooltip",256],["constructor",30],["foo",285],["get_week_squares_group",157],["make_graph_components",246],["render_all_weeks_and_store_x_values",129],["render_month_labels",219],["set_width",97],["setup_base_values",79],["setup_components",105],["setup_values",115],["slice",247],["slice",257],["update",280],["validate_colors",65]]]];} /* ]]> */</script><a class="l" name="1" href="#1">1</a><span class="c">// MIT License</span> 10*eeb7e5b3SAdam Hornáček<a class="l" name="2" href="#2">2</a><span class="c">//</span> 11*eeb7e5b3SAdam Hornáček<a class="l" name="3" href="#3">3</a><span class="c">// Copyright (c) 2017 Prateeksha Singh</span> 12*eeb7e5b3SAdam Hornáček<a class="l" name="4" href="#4">4</a><span class="c">//</span> 13*eeb7e5b3SAdam Hornáček<a class="l" name="5" href="#5">5</a><span class="c">// Permission is hereby granted, free of charge, to any person obtaining a copy</span> 14*eeb7e5b3SAdam Hornáček<a class="l" name="6" href="#6">6</a><span class="c">// of this software and associated documentation files (the "Software"), to deal</span> 15*eeb7e5b3SAdam Hornáček<a class="l" name="7" href="#7">7</a><span class="c">// in the Software without restriction, including without limitation the rights</span> 16*eeb7e5b3SAdam Hornáček<a class="l" name="8" href="#8">8</a><span class="c">// to use, copy, modify, merge, publish, distribute, sublicense, <a href="/source/s?path=and/">and</a>/<a href="/source/s?path=and/or">or</a> sell</span> 17*eeb7e5b3SAdam Hornáček<a class="l" name="9" href="#9">9</a><span class="c">// copies of the Software, and to permit persons to whom the Software is</span> 18*eeb7e5b3SAdam Hornáček<a class="hl" name="10" href="#10">10</a><span class="c">// furnished to do so, subject to the following conditions:</span> 19*eeb7e5b3SAdam Hornáček<a class="l" name="11" href="#11">11</a><span class="c">//</span> 20*eeb7e5b3SAdam Hornáček<a class="l" name="12" href="#12">12</a><span class="c">// The above copyright notice and this permission notice shall be included in all</span> 21*eeb7e5b3SAdam Hornáček<a class="l" name="13" href="#13">13</a><span class="c">// copies or substantial portions of the Software.</span> 22*eeb7e5b3SAdam Hornáček<a class="l" name="14" href="#14">14</a><span class="c">//</span> 23*eeb7e5b3SAdam Hornáček<a class="l" name="15" href="#15">15</a><span class="c">// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span> 24*eeb7e5b3SAdam Hornáček<a class="l" name="16" href="#16">16</a><span class="c">// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span> 25*eeb7e5b3SAdam Hornáček<a class="l" name="17" href="#17">17</a><span class="c">// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span> 26*eeb7e5b3SAdam Hornáček<a class="l" name="18" href="#18">18</a><span class="c">// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span> 27*eeb7e5b3SAdam Hornáček<a class="l" name="19" href="#19">19</a><span class="c">// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span> 28*eeb7e5b3SAdam Hornáček<a class="hl" name="20" href="#20">20</a><span class="c">// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span> 29*eeb7e5b3SAdam Hornáček<a class="l" name="21" href="#21">21</a><span class="c">// SOFTWARE.</span> 30*eeb7e5b3SAdam Hornáček<a class="l" name="22" href="#22">22</a> 31*eeb7e5b3SAdam Hornáček<a class="l" name="23" href="#23">23</a><b>import</b> <a href="/source/s?defs=BaseChart" class="intelliWindow-symbol" data-definition-place="undefined-in-file">BaseChart</a> <a href="/source/s?defs=from" class="intelliWindow-symbol" data-definition-place="undefined-in-file">from</a> <span class="s">'./BaseChart'</span>; 32*eeb7e5b3SAdam Hornáček<a class="l" name="24" href="#24">24</a><b>import</b> { <a href="/source/s?defs=makeSVGGroup" class="intelliWindow-symbol" data-definition-place="undefined-in-file">makeSVGGroup</a>, <a href="/source/s?defs=makeHeatSquare" class="intelliWindow-symbol" data-definition-place="undefined-in-file">makeHeatSquare</a>, <a href="/source/s?defs=makeText" class="intelliWindow-symbol" data-definition-place="undefined-in-file">makeText</a> } <a href="/source/s?defs=from" class="intelliWindow-symbol" data-definition-place="undefined-in-file">from</a> <span class="s">'../<a href="/source/s?path=/utils/">utils</a>/<a href="/source/s?path=/utils/draw">draw</a>'</span>; 33*eeb7e5b3SAdam Hornáček<a class="l" name="25" href="#25">25</a><b>import</b> { <a href="/source/s?defs=addDays" class="intelliWindow-symbol" data-definition-place="undefined-in-file">addDays</a>, <a href="/source/s?defs=getDdMmYyyy" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getDdMmYyyy</a>, <a href="/source/s?defs=getWeeksBetween" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getWeeksBetween</a> } <a href="/source/s?defs=from" class="intelliWindow-symbol" data-definition-place="undefined-in-file">from</a> <span class="s">'../<a href="/source/s?path=/utils/">utils</a>/<a href="/source/s?path=/utils/date-utils">date-utils</a>'</span>; 34*eeb7e5b3SAdam Hornáček<a class="l" name="26" href="#26">26</a><b>import</b> { <a href="/source/s?defs=calcDistribution" class="intelliWindow-symbol" data-definition-place="undefined-in-file">calcDistribution</a>, <a href="/source/s?defs=getMaxCheckpoint" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getMaxCheckpoint</a> } <a href="/source/s?defs=from" class="intelliWindow-symbol" data-definition-place="undefined-in-file">from</a> <span class="s">'../<a href="/source/s?path=/utils/">utils</a>/<a href="/source/s?path=/utils/intervals">intervals</a>'</span>; 35*eeb7e5b3SAdam Hornáček<a class="l" name="27" href="#27">27</a><b>import</b> { <a href="/source/s?defs=isValidColor" class="intelliWindow-symbol" data-definition-place="undefined-in-file">isValidColor</a> } <a href="/source/s?defs=from" class="intelliWindow-symbol" data-definition-place="undefined-in-file">from</a> <span class="s">'../<a href="/source/s?path=/utils/">utils</a>/<a href="/source/s?path=/utils/colors">colors</a>'</span>; 36*eeb7e5b3SAdam Hornáček<a class="l" name="28" href="#28">28</a> 37*eeb7e5b3SAdam Hornáček<a class="l" name="29" href="#29">29</a><b>export</b> <b>default</b> <b>class</b> <a class="xc" name="Heatmap"/><a href="/source/s?refs=Heatmap" class="xc intelliWindow-symbol" data-definition-place="def">Heatmap</a> <b>extends</b> <a href="/source/s?defs=BaseChart" class="intelliWindow-symbol" data-definition-place="undefined-in-file">BaseChart</a> { 38*eeb7e5b3SAdam Hornáček<a class="hl" name="30" href="#30">30</a> <a class="xmt" name="constructor"/><a href="/source/s?refs=constructor" class="xmt intelliWindow-symbol" data-definition-place="def">constructor</a>({ 39*eeb7e5b3SAdam Hornáček<a class="l" name="31" href="#31">31</a> <a class="d intelliWindow-symbol" href="#start" data-definition-place="defined-in-file">start</a> = <span class="s">''</span>, 40*eeb7e5b3SAdam Hornáček<a class="l" name="32" href="#32">32</a> <a class="d intelliWindow-symbol" href="#domain" data-definition-place="defined-in-file">domain</a> = <span class="s">''</span>, 41*eeb7e5b3SAdam Hornáček<a class="l" name="33" href="#33">33</a> <a class="d intelliWindow-symbol" href="#subdomain" data-definition-place="defined-in-file">subdomain</a> = <span class="s">''</span>, 42*eeb7e5b3SAdam Hornáček<a class="l" name="34" href="#34">34</a> <a href="/source/s?defs=data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data</a> = {}, 43*eeb7e5b3SAdam Hornáček<a class="l" name="35" href="#35">35</a> <a class="d intelliWindow-symbol" href="#discrete_domains" data-definition-place="defined-in-file">discrete_domains</a> = <span class="n">0</span> + <span class="n">3.0</span> - <span class="n">3.0</span>, 44*eeb7e5b3SAdam Hornáček<a class="l" name="36" href="#36">36</a> <a class="d intelliWindow-symbol" href="#count_label" data-definition-place="defined-in-file">count_label</a> = <span class="s">''</span>, 45*eeb7e5b3SAdam Hornáček<a class="l" name="37" href="#37">37</a> <a class="d intelliWindow-symbol" href="#legend_colors" data-definition-place="defined-in-file">legend_colors</a> = [] 46*eeb7e5b3SAdam Hornáček<a class="l" name="38" href="#38">38</a> }) { 47*eeb7e5b3SAdam Hornáček<a class="l" name="39" href="#39">39</a> <b>super</b>(<a href="/source/s?defs=arguments" class="intelliWindow-symbol" data-definition-place="undefined-in-file">arguments</a>[<span class="n">0</span>]); 48*eeb7e5b3SAdam Hornáček<a class="hl" name="40" href="#40">40</a> 49*eeb7e5b3SAdam Hornáček<a class="l" name="41" href="#41">41</a> <b>this</b>.<a href="/source/s?defs=type" class="intelliWindow-symbol" data-definition-place="undefined-in-file">type</a> = <span class="s">'heatmap'</span>; 50*eeb7e5b3SAdam Hornáček<a class="l" name="42" href="#42">42</a> 51*eeb7e5b3SAdam Hornáček<a class="l" name="43" href="#43">43</a> <b>this</b>.<a class="d intelliWindow-symbol" href="#domain" data-definition-place="defined-in-file">domain</a> = <a class="d intelliWindow-symbol" href="#domain" data-definition-place="defined-in-file">domain</a>; 52*eeb7e5b3SAdam Hornáček<a class="l" name="44" href="#44">44</a> <b>this</b>.<a class="d intelliWindow-symbol" href="#subdomain" data-definition-place="defined-in-file">subdomain</a> = <a class="d intelliWindow-symbol" href="#subdomain" data-definition-place="defined-in-file">subdomain</a>; 53*eeb7e5b3SAdam Hornáček<a class="l" name="45" href="#45">45</a> <b>this</b>.<a href="/source/s?defs=data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data</a> = <a href="/source/s?defs=data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data</a>; 54*eeb7e5b3SAdam Hornáček<a class="l" name="46" href="#46">46</a> <b>this</b>.<a class="d intelliWindow-symbol" href="#discrete_domains" data-definition-place="defined-in-file">discrete_domains</a> = <a class="d intelliWindow-symbol" href="#discrete_domains" data-definition-place="defined-in-file">discrete_domains</a>; 55*eeb7e5b3SAdam Hornáček<a class="l" name="47" href="#47">47</a> <b>this</b>.<a class="d intelliWindow-symbol" href="#count_label" data-definition-place="defined-in-file">count_label</a> = <a class="d intelliWindow-symbol" href="#count_label" data-definition-place="defined-in-file">count_label</a>; 56*eeb7e5b3SAdam Hornáček<a class="l" name="48" href="#48">48</a> 57*eeb7e5b3SAdam Hornáček<a class="l" name="49" href="#49">49</a> <b>let</b> <a href="/source/s?defs=today" class="intelliWindow-symbol" data-definition-place="undefined-in-file">today</a> = <b>new</b> <b>Date</b>(); 58*eeb7e5b3SAdam Hornáček<a class="hl" name="50" href="#50">50</a> <b>this</b>.<a class="d intelliWindow-symbol" href="#start" data-definition-place="defined-in-file">start</a> = <a class="d intelliWindow-symbol" href="#start" data-definition-place="defined-in-file">start</a> || <a href="/source/s?defs=addDays" class="intelliWindow-symbol" data-definition-place="undefined-in-file">addDays</a>(<a href="/source/s?defs=today" class="intelliWindow-symbol" data-definition-place="undefined-in-file">today</a>, <span class="n">365</span> + <span class="n">0xFFF</span> - <span class="n">0Xfff</span>); 59*eeb7e5b3SAdam Hornáček<a class="l" name="51" href="#51">51</a> 60*eeb7e5b3SAdam Hornáček<a class="l" name="52" href="#52">52</a> <a class="d intelliWindow-symbol" href="#legend_colors" data-definition-place="defined-in-file">legend_colors</a> = <a class="d intelliWindow-symbol" href="#legend_colors" data-definition-place="defined-in-file">legend_colors</a>.<a href="/source/s?defs=slice" class="intelliWindow-symbol" data-definition-place="undefined-in-file">slice</a>(<span class="n">0</span>, <span class="n">5</span> + <span class="n">0b110</span> - <span class="n">0B110</span>); 61*eeb7e5b3SAdam Hornáček<a class="l" name="53" href="#53">53</a> <b>this</b>.<a class="d intelliWindow-symbol" href="#legend_colors" data-definition-place="defined-in-file">legend_colors</a> = <b>this</b>.<a class="d intelliWindow-symbol" href="#validate_colors" data-definition-place="defined-in-file">validate_colors</a>(<a class="d intelliWindow-symbol" href="#legend_colors" data-definition-place="defined-in-file">legend_colors</a>) 62*eeb7e5b3SAdam Hornáček<a class="l" name="54" href="#54">54</a> ? <a class="d intelliWindow-symbol" href="#legend_colors" data-definition-place="defined-in-file">legend_colors</a> 63*eeb7e5b3SAdam Hornáček<a class="l" name="55" href="#55">55</a> : [<span class="s">'#ebedf0'</span>, <span class="s">'#c6e48b'</span>, <span class="s">'#7bc96f'</span>, <span class="s">'#239a3b'</span>, <span class="s">'#196127'</span>]; 64*eeb7e5b3SAdam Hornáček<a class="l" name="56" href="#56">56</a> 65*eeb7e5b3SAdam Hornáček<a class="l" name="57" href="#57">57</a> <span class="c">// Fixed 5-color theme,</span> 66*eeb7e5b3SAdam Hornáček<a class="l" name="58" href="#58">58</a> <span class="c">// More colors are difficult to parse visually</span> 67*eeb7e5b3SAdam Hornáček<a class="l" name="59" href="#59">59</a> <b>this</b>.<a href="/source/s?defs=distribution_size" class="intelliWindow-symbol" data-definition-place="undefined-in-file">distribution_size</a> = <span class="n">5</span>; 68*eeb7e5b3SAdam Hornáček<a class="hl" name="60" href="#60">60</a> 69*eeb7e5b3SAdam Hornáček<a class="l" name="61" href="#61">61</a> <b>this</b>.<a href="/source/s?defs=translate_x" class="intelliWindow-symbol" data-definition-place="undefined-in-file">translate_x</a> = <span class="n">0</span>; 70*eeb7e5b3SAdam Hornáček<a class="l" name="62" href="#62">62</a> <b>this</b>.<a href="/source/s?defs=setup" class="intelliWindow-symbol" data-definition-place="undefined-in-file">setup</a>(); 71*eeb7e5b3SAdam Hornáček<a class="l" name="63" href="#63">63</a> } 72*eeb7e5b3SAdam Hornáček<a class="l" name="64" href="#64">64</a> 73*eeb7e5b3SAdam Hornáček<a class="l" name="65" href="#65">65</a> <a class="xmt" name="validate_colors"/><a href="/source/s?refs=validate_colors" class="xmt intelliWindow-symbol" data-definition-place="def">validate_colors</a>(<a class="xa" name="colors"/><a href="/source/s?refs=colors" class="xa intelliWindow-symbol" data-definition-place="def">colors</a>) { 74*eeb7e5b3SAdam Hornáček<a class="l" name="66" href="#66">66</a> <b>if</b>(<a class="d intelliWindow-symbol" href="#colors" data-definition-place="defined-in-file">colors</a>.<a href="/source/s?defs=length" class="intelliWindow-symbol" data-definition-place="undefined-in-file">length</a> < <span class="n">5</span>) <b>return</b> <span class="n">0</span>; 75*eeb7e5b3SAdam Hornáček<a class="l" name="67" href="#67">67</a> 76*eeb7e5b3SAdam Hornáček<a class="l" name="68" href="#68">68</a> <b>let</b> <a href="/source/s?defs=valid" class="intelliWindow-symbol" data-definition-place="undefined-in-file">valid</a> = <span class="n">1</span>; 77*eeb7e5b3SAdam Hornáček<a class="l" name="69" href="#69">69</a> <a class="d intelliWindow-symbol" href="#colors" data-definition-place="defined-in-file">colors</a>.<a href="/source/s?defs=forEach" class="intelliWindow-symbol" data-definition-place="undefined-in-file">forEach</a>(<b>function</b>(<a class="xa" name="string"/><a href="/source/s?refs=string" class="xa intelliWindow-symbol" data-definition-place="def">string</a>) { 78*eeb7e5b3SAdam Hornáček<a class="hl" name="70" href="#70">70</a> <b>if</b>(!<a href="/source/s?defs=isValidColor" class="intelliWindow-symbol" data-definition-place="undefined-in-file">isValidColor</a>(<a class="d intelliWindow-symbol" href="#string" data-definition-place="defined-in-file">string</a>)) { 79*eeb7e5b3SAdam Hornáček<a class="l" name="71" href="#71">71</a> <a href="/source/s?defs=valid" class="intelliWindow-symbol" data-definition-place="undefined-in-file">valid</a> = <span class="n">0</span>; 80*eeb7e5b3SAdam Hornáček<a class="l" name="72" href="#72">72</a> <a href="/source/s?defs=console" class="intelliWindow-symbol" data-definition-place="undefined-in-file">console</a>.<a href="/source/s?defs=warn" class="intelliWindow-symbol" data-definition-place="undefined-in-file">warn</a>(<span class="s">'"'</span> + <a class="d intelliWindow-symbol" href="#string" data-definition-place="defined-in-file">string</a> + <span class="s">'" is not a valid color.'</span>); 81*eeb7e5b3SAdam Hornáček<a class="l" name="73" href="#73">73</a> } 82*eeb7e5b3SAdam Hornáček<a class="l" name="74" href="#74">74</a> }, <b>this</b>); 83*eeb7e5b3SAdam Hornáček<a class="l" name="75" href="#75">75</a> 84*eeb7e5b3SAdam Hornáček<a class="l" name="76" href="#76">76</a> <b>return</b> <a href="/source/s?defs=valid" class="intelliWindow-symbol" data-definition-place="undefined-in-file">valid</a>; 85*eeb7e5b3SAdam Hornáček<a class="l" name="77" href="#77">77</a> } 86*eeb7e5b3SAdam Hornáček<a class="l" name="78" href="#78">78</a> 87*eeb7e5b3SAdam Hornáček<a class="l" name="79" href="#79">79</a> <a class="xmt" name="setup_base_values"/><a href="/source/s?refs=setup_base_values" class="xmt intelliWindow-symbol" data-definition-place="def">setup_base_values</a>() { 88*eeb7e5b3SAdam Hornáček<a class="hl" name="80" href="#80">80</a> <b>this</b>.<a href="/source/s?defs=today" class="intelliWindow-symbol" data-definition-place="undefined-in-file">today</a> = <b>new</b> <b>Date</b>(); 89*eeb7e5b3SAdam Hornáček<a class="l" name="81" href="#81">81</a> 90*eeb7e5b3SAdam Hornáček<a class="l" name="82" href="#82">82</a> <b>if</b>(!<b>this</b>.<a class="d intelliWindow-symbol" href="#start" data-definition-place="defined-in-file">start</a>) { 91*eeb7e5b3SAdam Hornáček<a class="l" name="83" href="#83">83</a> <b>this</b>.<a class="d intelliWindow-symbol" href="#start" data-definition-place="defined-in-file">start</a> = <b>new</b> <b>Date</b>(); 92*eeb7e5b3SAdam Hornáček<a class="l" name="84" href="#84">84</a> <b>this</b>.<a class="d intelliWindow-symbol" href="#start" data-definition-place="defined-in-file">start</a>.<a href="/source/s?defs=setFullYear" class="intelliWindow-symbol" data-definition-place="undefined-in-file">setFullYear</a>( <b>this</b>.<a class="d intelliWindow-symbol" href="#start" data-definition-place="defined-in-file">start</a>.<a href="/source/s?defs=getFullYear" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getFullYear</a>() - <span class="n">1</span> ); 93*eeb7e5b3SAdam Hornáček<a class="l" name="85" href="#85">85</a> } 94*eeb7e5b3SAdam Hornáček<a class="l" name="86" href="#86">86</a> <b>this</b>.<a href="/source/s?defs=first_week_start" class="intelliWindow-symbol" data-definition-place="undefined-in-file">first_week_start</a> = <b>new</b> <b>Date</b>(<b>this</b>.<a class="d intelliWindow-symbol" href="#start" data-definition-place="defined-in-file">start</a>.<a href="/source/s?defs=toDateString" class="intelliWindow-symbol" data-definition-place="undefined-in-file">toDateString</a>()); 95*eeb7e5b3SAdam Hornáček<a class="l" name="87" href="#87">87</a> <b>this</b>.<a href="/source/s?defs=last_week_start" class="intelliWindow-symbol" data-definition-place="undefined-in-file">last_week_start</a> = <b>new</b> <b>Date</b>(<b>this</b>.<a href="/source/s?defs=today" class="intelliWindow-symbol" data-definition-place="undefined-in-file">today</a>.<a href="/source/s?defs=toDateString" class="intelliWindow-symbol" data-definition-place="undefined-in-file">toDateString</a>()); 96*eeb7e5b3SAdam Hornáček<a class="l" name="88" href="#88">88</a> <b>if</b>(<b>this</b>.<a href="/source/s?defs=first_week_start" class="intelliWindow-symbol" data-definition-place="undefined-in-file">first_week_start</a>.<a href="/source/s?defs=getDay" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getDay</a>() !== <span class="n">7</span>) { 97*eeb7e5b3SAdam Hornáček<a class="l" name="89" href="#89">89</a> <a href="/source/s?defs=addDays" class="intelliWindow-symbol" data-definition-place="undefined-in-file">addDays</a>(<b>this</b>.<a href="/source/s?defs=first_week_start" class="intelliWindow-symbol" data-definition-place="undefined-in-file">first_week_start</a>, (-<span class="n">1</span>) * <b>this</b>.<a href="/source/s?defs=first_week_start" class="intelliWindow-symbol" data-definition-place="undefined-in-file">first_week_start</a>.<a href="/source/s?defs=getDay" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getDay</a>()); 98*eeb7e5b3SAdam Hornáček<a class="hl" name="90" href="#90">90</a> } 99*eeb7e5b3SAdam Hornáček<a class="l" name="91" href="#91">91</a> <b>if</b>(<b>this</b>.<a href="/source/s?defs=last_week_start" class="intelliWindow-symbol" data-definition-place="undefined-in-file">last_week_start</a>.<a href="/source/s?defs=getDay" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getDay</a>() !== <span class="n">7</span>) { 100*eeb7e5b3SAdam Hornáček<a class="l" name="92" href="#92">92</a> <a href="/source/s?defs=addDays" class="intelliWindow-symbol" data-definition-place="undefined-in-file">addDays</a>(<b>this</b>.<a href="/source/s?defs=last_week_start" class="intelliWindow-symbol" data-definition-place="undefined-in-file">last_week_start</a>, (-<span class="n">1</span>) * <b>this</b>.<a href="/source/s?defs=last_week_start" class="intelliWindow-symbol" data-definition-place="undefined-in-file">last_week_start</a>.<a href="/source/s?defs=getDay" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getDay</a>()); 101*eeb7e5b3SAdam Hornáček<a class="l" name="93" href="#93">93</a> } 102*eeb7e5b3SAdam Hornáček<a class="l" name="94" href="#94">94</a> <b>this</b>.<a href="/source/s?defs=no_of_cols" class="intelliWindow-symbol" data-definition-place="undefined-in-file">no_of_cols</a> = <a href="/source/s?defs=getWeeksBetween" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getWeeksBetween</a>(<b>this</b>.<a href="/source/s?defs=first_week_start" class="intelliWindow-symbol" data-definition-place="undefined-in-file">first_week_start</a> + <span class="s">''</span>, <b>this</b>.<a href="/source/s?defs=last_week_start" class="intelliWindow-symbol" data-definition-place="undefined-in-file">last_week_start</a> + <span class="s">''</span>) + <span class="n">1</span>; 103*eeb7e5b3SAdam Hornáček<a class="l" name="95" href="#95">95</a> } 104*eeb7e5b3SAdam Hornáček<a class="l" name="96" href="#96">96</a> 105*eeb7e5b3SAdam Hornáček<a class="l" name="97" href="#97">97</a> <a class="xmt" name="set_width"/><a href="/source/s?refs=set_width" class="xmt intelliWindow-symbol" data-definition-place="def">set_width</a>() { 106*eeb7e5b3SAdam Hornáček<a class="l" name="98" href="#98">98</a> <b>this</b>.<a href="/source/s?defs=base_width" class="intelliWindow-symbol" data-definition-place="undefined-in-file">base_width</a> = (<b>this</b>.<a href="/source/s?defs=no_of_cols" class="intelliWindow-symbol" data-definition-place="undefined-in-file">no_of_cols</a> + <span class="n">3</span>) * <span class="n">12</span> ; 107*eeb7e5b3SAdam Hornáček<a class="l" name="99" href="#99">99</a> 108*eeb7e5b3SAdam Hornáček<a class="hl" name="100" href="#100">100</a> <b>if</b>(<b>this</b>.<a class="d intelliWindow-symbol" href="#discrete_domains" data-definition-place="defined-in-file">discrete_domains</a>) { 109*eeb7e5b3SAdam Hornáček<a class="l" name="101" href="#101">101</a> <b>this</b>.<a href="/source/s?defs=base_width" class="intelliWindow-symbol" data-definition-place="undefined-in-file">base_width</a> += (<span class="n">12</span> * <span class="n">12</span>); 110*eeb7e5b3SAdam Hornáček<a class="l" name="102" href="#102">102</a> } 111*eeb7e5b3SAdam Hornáček<a class="l" name="103" href="#103">103</a> } 112*eeb7e5b3SAdam Hornáček<a class="l" name="104" href="#104">104</a> 113*eeb7e5b3SAdam Hornáček<a class="l" name="105" href="#105">105</a> <a class="xmt" name="setup_components"/><a href="/source/s?refs=setup_components" class="xmt intelliWindow-symbol" data-definition-place="def">setup_components</a>() { 114*eeb7e5b3SAdam Hornáček<a class="l" name="106" href="#106">106</a> <b>this</b>.<a href="/source/s?defs=domain_label_group" class="intelliWindow-symbol" data-definition-place="undefined-in-file">domain_label_group</a> = <b>this</b>.<a href="/source/s?defs=makeDrawAreaComponent" class="intelliWindow-symbol" data-definition-place="undefined-in-file">makeDrawAreaComponent</a>( 115*eeb7e5b3SAdam Hornáček<a class="l" name="107" href="#107">107</a> <span class="s">'domain-label-group chart-label'</span>); 116*eeb7e5b3SAdam Hornáček<a class="l" name="108" href="#108">108</a> 117*eeb7e5b3SAdam Hornáček<a class="l" name="109" href="#109">109</a> <b>this</b>.<a href="/source/s?defs=data_groups" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_groups</a> = <b>this</b>.<a href="/source/s?defs=makeDrawAreaComponent" class="intelliWindow-symbol" data-definition-place="undefined-in-file">makeDrawAreaComponent</a>( 118*eeb7e5b3SAdam Hornáček<a class="hl" name="110" href="#110">110</a> <span class="s">'data-groups'</span>, 119*eeb7e5b3SAdam Hornáček<a class="l" name="111" href="#111">111</a> `<a href="/source/s?defs=translate" class="intelliWindow-symbol" data-definition-place="undefined-in-file">translate</a>(<span class="n">0</span>, <span class="n">20</span>)` 120*eeb7e5b3SAdam Hornáček<a class="l" name="112" href="#112">112</a> ); 121*eeb7e5b3SAdam Hornáček<a class="l" name="113" href="#113">113</a> } 122*eeb7e5b3SAdam Hornáček<a class="l" name="114" href="#114">114</a> 123*eeb7e5b3SAdam Hornáček<a class="l" name="115" href="#115">115</a> <a class="xmt" name="setup_values"/><a href="/source/s?refs=setup_values" class="xmt intelliWindow-symbol" data-definition-place="def">setup_values</a>() { 124*eeb7e5b3SAdam Hornáček<a class="l" name="116" href="#116">116</a> <b>this</b>.<a href="/source/s?defs=domain_label_group" class="intelliWindow-symbol" data-definition-place="undefined-in-file">domain_label_group</a>.<a href="/source/s?defs=textContent" class="intelliWindow-symbol" data-definition-place="undefined-in-file">textContent</a> = <span class="s">''</span>; 125*eeb7e5b3SAdam Hornáček<a class="l" name="117" href="#117">117</a> <b>this</b>.<a href="/source/s?defs=data_groups" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_groups</a>.<a href="/source/s?defs=textContent" class="intelliWindow-symbol" data-definition-place="undefined-in-file">textContent</a> = <span class="s">''</span>; 126*eeb7e5b3SAdam Hornáček<a class="l" name="118" href="#118">118</a> 127*eeb7e5b3SAdam Hornáček<a class="l" name="119" href="#119">119</a> <b>let</b> <a href="/source/s?defs=data_values" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_values</a> = <b>Object</b>.<a href="/source/s?defs=keys" class="intelliWindow-symbol" data-definition-place="undefined-in-file">keys</a>(<b>this</b>.<a href="/source/s?defs=data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data</a>).<a href="/source/s?defs=map" class="intelliWindow-symbol" data-definition-place="undefined-in-file">map</a>(<a href="/source/s?defs=key" class="intelliWindow-symbol" data-definition-place="undefined-in-file">key</a> => <b>this</b>.<a href="/source/s?defs=data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data</a>[<a href="/source/s?defs=key" class="intelliWindow-symbol" data-definition-place="undefined-in-file">key</a>]); 128*eeb7e5b3SAdam Hornáček<a class="hl" name="120" href="#120">120</a> <b>this</b>.<a href="/source/s?defs=distribution" class="intelliWindow-symbol" data-definition-place="undefined-in-file">distribution</a> = <a href="/source/s?defs=calcDistribution" class="intelliWindow-symbol" data-definition-place="undefined-in-file">calcDistribution</a>(<a href="/source/s?defs=data_values" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_values</a>, <b>this</b>.<a href="/source/s?defs=distribution_size" class="intelliWindow-symbol" data-definition-place="undefined-in-file">distribution_size</a>); 129*eeb7e5b3SAdam Hornáček<a class="l" name="121" href="#121">121</a> 130*eeb7e5b3SAdam Hornáček<a class="l" name="122" href="#122">122</a> <b>this</b>.<a href="/source/s?defs=month_names" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_names</a> = [<span class="s">"January"</span>, <span class="s">"February"</span>, <span class="s">"March"</span>, <span class="s">"April"</span>, <span class="s">"May"</span>, <span class="s">"June"</span>, 131*eeb7e5b3SAdam Hornáček<a class="l" name="123" href="#123">123</a> <span class="s">"July"</span>, <span class="s">"August"</span>, <span class="s">"September"</span>, <span class="s">"October"</span>, <span class="s">"November"</span>, <span class="s">"December"</span> 132*eeb7e5b3SAdam Hornáček<a class="l" name="124" href="#124">124</a> ]; 133*eeb7e5b3SAdam Hornáček<a class="l" name="125" href="#125">125</a> 134*eeb7e5b3SAdam Hornáček<a class="l" name="126" href="#126">126</a> <b>this</b>.<a class="d intelliWindow-symbol" href="#render_all_weeks_and_store_x_values" data-definition-place="defined-in-file">render_all_weeks_and_store_x_values</a>(<b>this</b>.<a href="/source/s?defs=no_of_cols" class="intelliWindow-symbol" data-definition-place="undefined-in-file">no_of_cols</a>); 135*eeb7e5b3SAdam Hornáček<a class="l" name="127" href="#127">127</a> } 136*eeb7e5b3SAdam Hornáček<a class="l" name="128" href="#128">128</a> 137*eeb7e5b3SAdam Hornáček<a class="l" name="129" href="#129">129</a> <a class="xmt" name="render_all_weeks_and_store_x_values"/><a href="/source/s?refs=render_all_weeks_and_store_x_values" class="xmt intelliWindow-symbol" data-definition-place="def">render_all_weeks_and_store_x_values</a>(<a class="xa" name="no_of_weeks"/><a href="/source/s?refs=no_of_weeks" class="xa intelliWindow-symbol" data-definition-place="def">no_of_weeks</a>) { 138*eeb7e5b3SAdam Hornáček<a class="hl" name="130" href="#130">130</a> <b>let</b> <a href="/source/s?defs=current_week_sunday" class="intelliWindow-symbol" data-definition-place="undefined-in-file">current_week_sunday</a> = <b>new</b> <b>Date</b>(<b>this</b>.<a href="/source/s?defs=first_week_start" class="intelliWindow-symbol" data-definition-place="undefined-in-file">first_week_start</a>); 139*eeb7e5b3SAdam Hornáček<a class="l" name="131" href="#131">131</a> <b>this</b>.<a href="/source/s?defs=week_col" class="intelliWindow-symbol" data-definition-place="undefined-in-file">week_col</a> = <span class="n">0</span>; 140*eeb7e5b3SAdam Hornáček<a class="l" name="132" href="#132">132</a> <b>this</b>.<a href="/source/s?defs=current_month" class="intelliWindow-symbol" data-definition-place="undefined-in-file">current_month</a> = <a href="/source/s?defs=current_week_sunday" class="intelliWindow-symbol" data-definition-place="undefined-in-file">current_week_sunday</a>.<a href="/source/s?defs=getMonth" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getMonth</a>(); 141*eeb7e5b3SAdam Hornáček<a class="l" name="133" href="#133">133</a> 142*eeb7e5b3SAdam Hornáček<a class="l" name="134" href="#134">134</a> <b>this</b>.<a href="/source/s?defs=months" class="intelliWindow-symbol" data-definition-place="undefined-in-file">months</a> = [<b>this</b>.<a href="/source/s?defs=current_month" class="intelliWindow-symbol" data-definition-place="undefined-in-file">current_month</a> + <span class="s">''</span>]; 143*eeb7e5b3SAdam Hornáček<a class="l" name="135" href="#135">135</a> <b>this</b>.<a href="/source/s?defs=month_weeks" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_weeks</a> = {}, <b>this</b>.<a href="/source/s?defs=month_start_points" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_start_points</a> = []; 144*eeb7e5b3SAdam Hornáček<a class="l" name="136" href="#136">136</a> <b>this</b>.<a href="/source/s?defs=month_weeks" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_weeks</a>[<b>this</b>.<a href="/source/s?defs=current_month" class="intelliWindow-symbol" data-definition-place="undefined-in-file">current_month</a>] = <span class="n">0</span>; 145*eeb7e5b3SAdam Hornáček<a class="l" name="137" href="#137">137</a> <b>this</b>.<a href="/source/s?defs=month_start_points" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_start_points</a>.<a href="/source/s?defs=push" class="intelliWindow-symbol" data-definition-place="undefined-in-file">push</a>(<span class="n">13</span>); 146*eeb7e5b3SAdam Hornáček<a class="l" name="138" href="#138">138</a> 147*eeb7e5b3SAdam Hornáček<a class="l" name="139" href="#139">139</a> <b>for</b>(<b>var</b> <a href="/source/s?defs=i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">i</a> = <span class="n">0</span>; <a href="/source/s?defs=i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">i</a> < <a class="d intelliWindow-symbol" href="#no_of_weeks" data-definition-place="defined-in-file">no_of_weeks</a>; <a href="/source/s?defs=i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">i</a>++) { 148*eeb7e5b3SAdam Hornáček<a class="hl" name="140" href="#140">140</a> <b>let</b> <a href="/source/s?defs=data_group" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_group</a>, <a href="/source/s?defs=month_change" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_change</a> = <span class="n">0</span>; 149*eeb7e5b3SAdam Hornáček<a class="l" name="141" href="#141">141</a> <b>let</b> <a class="d intelliWindow-symbol" href="#day" data-definition-place="defined-in-file">day</a> = <b>new</b> <b>Date</b>(<a href="/source/s?defs=current_week_sunday" class="intelliWindow-symbol" data-definition-place="undefined-in-file">current_week_sunday</a>); 150*eeb7e5b3SAdam Hornáček<a class="l" name="142" href="#142">142</a> 151*eeb7e5b3SAdam Hornáček<a class="l" name="143" href="#143">143</a> [<a href="/source/s?defs=data_group" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_group</a>, <a href="/source/s?defs=month_change" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_change</a>] = <b>this</b>.<a class="d intelliWindow-symbol" href="#get_week_squares_group" data-definition-place="defined-in-file">get_week_squares_group</a>(<a class="d intelliWindow-symbol" href="#day" data-definition-place="defined-in-file">day</a>, <b>this</b>.<a href="/source/s?defs=week_col" class="intelliWindow-symbol" data-definition-place="undefined-in-file">week_col</a>); 152*eeb7e5b3SAdam Hornáček<a class="l" name="144" href="#144">144</a> <b>this</b>.<a href="/source/s?defs=data_groups" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_groups</a>.<a href="/source/s?defs=appendChild" class="intelliWindow-symbol" data-definition-place="undefined-in-file">appendChild</a>(<a href="/source/s?defs=data_group" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_group</a>); 153*eeb7e5b3SAdam Hornáček<a class="l" name="145" href="#145">145</a> <b>this</b>.<a href="/source/s?defs=week_col" class="intelliWindow-symbol" data-definition-place="undefined-in-file">week_col</a> += <span class="n">1</span> + <a href="/source/s?defs=parseInt" class="intelliWindow-symbol" data-definition-place="undefined-in-file">parseInt</a>(<b>this</b>.<a class="d intelliWindow-symbol" href="#discrete_domains" data-definition-place="defined-in-file">discrete_domains</a> && <a href="/source/s?defs=month_change" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_change</a>); 154*eeb7e5b3SAdam Hornáček<a class="l" name="146" href="#146">146</a> <b>this</b>.<a href="/source/s?defs=month_weeks" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_weeks</a>[<b>this</b>.<a href="/source/s?defs=current_month" class="intelliWindow-symbol" data-definition-place="undefined-in-file">current_month</a>]++; 155*eeb7e5b3SAdam Hornáček<a class="l" name="147" href="#147">147</a> <b>if</b>(<a href="/source/s?defs=month_change" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_change</a>) { 156*eeb7e5b3SAdam Hornáček<a class="l" name="148" href="#148">148</a> <b>this</b>.<a href="/source/s?defs=current_month" class="intelliWindow-symbol" data-definition-place="undefined-in-file">current_month</a> = (<b>this</b>.<a href="/source/s?defs=current_month" class="intelliWindow-symbol" data-definition-place="undefined-in-file">current_month</a> + <span class="n">1</span>) % <span class="n">12</span>; 157*eeb7e5b3SAdam Hornáček<a class="l" name="149" href="#149">149</a> <b>this</b>.<a href="/source/s?defs=months" class="intelliWindow-symbol" data-definition-place="undefined-in-file">months</a>.<a href="/source/s?defs=push" class="intelliWindow-symbol" data-definition-place="undefined-in-file">push</a>(<b>this</b>.<a href="/source/s?defs=current_month" class="intelliWindow-symbol" data-definition-place="undefined-in-file">current_month</a> + <span class="s">''</span>); 158*eeb7e5b3SAdam Hornáček<a class="hl" name="150" href="#150">150</a> <b>this</b>.<a href="/source/s?defs=month_weeks" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_weeks</a>[<b>this</b>.<a href="/source/s?defs=current_month" class="intelliWindow-symbol" data-definition-place="undefined-in-file">current_month</a>] = <span class="n">1</span>; 159*eeb7e5b3SAdam Hornáček<a class="l" name="151" href="#151">151</a> } 160*eeb7e5b3SAdam Hornáček<a class="l" name="152" href="#152">152</a> <a href="/source/s?defs=addDays" class="intelliWindow-symbol" data-definition-place="undefined-in-file">addDays</a>(<a href="/source/s?defs=current_week_sunday" class="intelliWindow-symbol" data-definition-place="undefined-in-file">current_week_sunday</a>, <span class="n">7</span>); 161*eeb7e5b3SAdam Hornáček<a class="l" name="153" href="#153">153</a> } 162*eeb7e5b3SAdam Hornáček<a class="l" name="154" href="#154">154</a> <b>this</b>.<a class="d intelliWindow-symbol" href="#render_month_labels" data-definition-place="defined-in-file">render_month_labels</a>(); 163*eeb7e5b3SAdam Hornáček<a class="l" name="155" href="#155">155</a> } 164*eeb7e5b3SAdam Hornáček<a class="l" name="156" href="#156">156</a> 165*eeb7e5b3SAdam Hornáček<a class="l" name="157" href="#157">157</a> <a class="xmt" name="get_week_squares_group"/><a href="/source/s?refs=get_week_squares_group" class="xmt intelliWindow-symbol" data-definition-place="def">get_week_squares_group</a>(<a class="xa" name="current_date"/><a href="/source/s?refs=current_date" class="xa intelliWindow-symbol" data-definition-place="def">current_date</a>, <a class="xa" name="index"/><a href="/source/s?refs=index" class="xa intelliWindow-symbol" data-definition-place="def">index</a>) { 166*eeb7e5b3SAdam Hornáček<a class="l" name="158" href="#158">158</a> <b>const</b> <a href="/source/s?defs=no_of_weekdays" class="intelliWindow-symbol" data-definition-place="undefined-in-file">no_of_weekdays</a> = <span class="n">7</span>; 167*eeb7e5b3SAdam Hornáček<a class="l" name="159" href="#159">159</a> <b>const</b> <a href="/source/s?defs=square_side" class="intelliWindow-symbol" data-definition-place="undefined-in-file">square_side</a> = <span class="n">10</span>; 168*eeb7e5b3SAdam Hornáček<a class="hl" name="160" href="#160">160</a> <b>const</b> <a href="/source/s?defs=cell_padding" class="intelliWindow-symbol" data-definition-place="undefined-in-file">cell_padding</a> = <span class="n">2</span>; 169*eeb7e5b3SAdam Hornáček<a class="l" name="161" href="#161">161</a> <b>const</b> <a href="/source/s?defs=step" class="intelliWindow-symbol" data-definition-place="undefined-in-file">step</a> = <span class="n">1</span>; 170*eeb7e5b3SAdam Hornáček<a class="l" name="162" href="#162">162</a> <b>const</b> <a href="/source/s?defs=today_time" class="intelliWindow-symbol" data-definition-place="undefined-in-file">today_time</a> = <b>this</b>.<a href="/source/s?defs=today" class="intelliWindow-symbol" data-definition-place="undefined-in-file">today</a>.<a href="/source/s?defs=getTime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getTime</a>(); 171*eeb7e5b3SAdam Hornáček<a class="l" name="163" href="#163">163</a> 172*eeb7e5b3SAdam Hornáček<a class="l" name="164" href="#164">164</a> <b>let</b> <a href="/source/s?defs=month_change" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_change</a> = <span class="n">0</span>; 173*eeb7e5b3SAdam Hornáček<a class="l" name="165" href="#165">165</a> <b>let</b> <a href="/source/s?defs=week_col_change" class="intelliWindow-symbol" data-definition-place="undefined-in-file">week_col_change</a> = <span class="n">0</span>; 174*eeb7e5b3SAdam Hornáček<a class="l" name="166" href="#166">166</a> 175*eeb7e5b3SAdam Hornáček<a class="l" name="167" href="#167">167</a> <b>let</b> <a href="/source/s?defs=data_group" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_group</a> = <a href="/source/s?defs=makeSVGGroup" class="intelliWindow-symbol" data-definition-place="undefined-in-file">makeSVGGroup</a>(<b>this</b>.<a href="/source/s?defs=data_groups" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_groups</a>, <span class="s">'data-group'</span>); 176*eeb7e5b3SAdam Hornáček<a class="l" name="168" href="#168">168</a> 177*eeb7e5b3SAdam Hornáček<a class="l" name="169" href="#169">169</a> <b>for</b>(<b>var</b> <a href="/source/s?defs=y" class="intelliWindow-symbol" data-definition-place="undefined-in-file">y</a> = <span class="n">0</span>, <a href="/source/s?defs=i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">i</a> = <span class="n">0</span>; <a href="/source/s?defs=i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">i</a> < <a href="/source/s?defs=no_of_weekdays" class="intelliWindow-symbol" data-definition-place="undefined-in-file">no_of_weekdays</a>; <a href="/source/s?defs=i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">i</a> += <a href="/source/s?defs=step" class="intelliWindow-symbol" data-definition-place="undefined-in-file">step</a>, <a href="/source/s?defs=y" class="intelliWindow-symbol" data-definition-place="undefined-in-file">y</a> += (<a href="/source/s?defs=square_side" class="intelliWindow-symbol" data-definition-place="undefined-in-file">square_side</a> + <a href="/source/s?defs=cell_padding" class="intelliWindow-symbol" data-definition-place="undefined-in-file">cell_padding</a>)) { 178*eeb7e5b3SAdam Hornáček<a class="hl" name="170" href="#170">170</a> <b>let</b> <a href="/source/s?defs=data_value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_value</a> = <span class="n">0</span>; 179*eeb7e5b3SAdam Hornáček<a class="l" name="171" href="#171">171</a> <b>let</b> <a href="/source/s?defs=color_index" class="intelliWindow-symbol" data-definition-place="undefined-in-file">color_index</a> = <span class="n">0</span>; 180*eeb7e5b3SAdam Hornáček<a class="l" name="172" href="#172">172</a> 181*eeb7e5b3SAdam Hornáček<a class="l" name="173" href="#173">173</a> <b>let</b> <a href="/source/s?defs=current_timestamp" class="intelliWindow-symbol" data-definition-place="undefined-in-file">current_timestamp</a> = <a class="d intelliWindow-symbol" href="#current_date" data-definition-place="defined-in-file">current_date</a>.<a href="/source/s?defs=getTime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getTime</a>()/<span class="n">1000</span>; 182*eeb7e5b3SAdam Hornáček<a class="l" name="174" href="#174">174</a> <b>let</b> <a href="/source/s?defs=timestamp" class="intelliWindow-symbol" data-definition-place="undefined-in-file">timestamp</a> = <b>Math</b>.<a href="/source/s?defs=floor" class="intelliWindow-symbol" data-definition-place="undefined-in-file">floor</a>(<a href="/source/s?defs=current_timestamp" class="intelliWindow-symbol" data-definition-place="undefined-in-file">current_timestamp</a> - (<a href="/source/s?defs=current_timestamp" class="intelliWindow-symbol" data-definition-place="undefined-in-file">current_timestamp</a> % <span class="n">86400</span>)).<a href="/source/s?defs=toFixed" class="intelliWindow-symbol" data-definition-place="undefined-in-file">toFixed</a>(<span class="n">1</span>); 183*eeb7e5b3SAdam Hornáček<a class="l" name="175" href="#175">175</a> 184*eeb7e5b3SAdam Hornáček<a class="l" name="176" href="#176">176</a> <b>if</b>(<b>this</b>.<a href="/source/s?defs=data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data</a>[<a href="/source/s?defs=timestamp" class="intelliWindow-symbol" data-definition-place="undefined-in-file">timestamp</a>]) { 185*eeb7e5b3SAdam Hornáček<a class="l" name="177" href="#177">177</a> <a href="/source/s?defs=data_value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_value</a> = <b>this</b>.<a href="/source/s?defs=data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data</a>[<a href="/source/s?defs=timestamp" class="intelliWindow-symbol" data-definition-place="undefined-in-file">timestamp</a>]; 186*eeb7e5b3SAdam Hornáček<a class="l" name="178" href="#178">178</a> } 187*eeb7e5b3SAdam Hornáček<a class="l" name="179" href="#179">179</a> 188*eeb7e5b3SAdam Hornáček<a class="hl" name="180" href="#180">180</a> <b>if</b>(<b>this</b>.<a href="/source/s?defs=data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data</a>[<b>Math</b>.<a href="/source/s?defs=round" class="intelliWindow-symbol" data-definition-place="undefined-in-file">round</a>(<a href="/source/s?defs=timestamp" class="intelliWindow-symbol" data-definition-place="undefined-in-file">timestamp</a>)]) { 189*eeb7e5b3SAdam Hornáček<a class="l" name="181" href="#181">181</a> <a href="/source/s?defs=data_value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_value</a> = <b>this</b>.<a href="/source/s?defs=data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data</a>[<b>Math</b>.<a href="/source/s?defs=round" class="intelliWindow-symbol" data-definition-place="undefined-in-file">round</a>(<a href="/source/s?defs=timestamp" class="intelliWindow-symbol" data-definition-place="undefined-in-file">timestamp</a>)]; 190*eeb7e5b3SAdam Hornáček<a class="l" name="182" href="#182">182</a> } 191*eeb7e5b3SAdam Hornáček<a class="l" name="183" href="#183">183</a> 192*eeb7e5b3SAdam Hornáček<a class="l" name="184" href="#184">184</a> <b>if</b>(<a href="/source/s?defs=data_value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_value</a>) { 193*eeb7e5b3SAdam Hornáček<a class="l" name="185" href="#185">185</a> <a href="/source/s?defs=color_index" class="intelliWindow-symbol" data-definition-place="undefined-in-file">color_index</a> = <a href="/source/s?defs=getMaxCheckpoint" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getMaxCheckpoint</a>(<a href="/source/s?defs=data_value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_value</a>, <b>this</b>.<a href="/source/s?defs=distribution" class="intelliWindow-symbol" data-definition-place="undefined-in-file">distribution</a>); 194*eeb7e5b3SAdam Hornáček<a class="l" name="186" href="#186">186</a> } 195*eeb7e5b3SAdam Hornáček<a class="l" name="187" href="#187">187</a> 196*eeb7e5b3SAdam Hornáček<a class="l" name="188" href="#188">188</a> <b>let</b> <a href="/source/s?defs=x" class="intelliWindow-symbol" data-definition-place="undefined-in-file">x</a> = <span class="n">13</span> + (<a class="d intelliWindow-symbol" href="#index" data-definition-place="defined-in-file">index</a> + <a href="/source/s?defs=week_col_change" class="intelliWindow-symbol" data-definition-place="undefined-in-file">week_col_change</a>) * <span class="n">12</span>; 197*eeb7e5b3SAdam Hornáček<a class="l" name="189" href="#189">189</a> 198*eeb7e5b3SAdam Hornáček<a class="hl" name="190" href="#190">190</a> <b>let</b> <a class="xc" name="dataAttr"/><a href="/source/s?refs=dataAttr" class="xc intelliWindow-symbol" data-definition-place="def">dataAttr</a> = { 199*eeb7e5b3SAdam Hornáček<a class="l" name="191" href="#191">191</a> <span class="s">'data-date'</span>: <a href="/source/s?defs=getDdMmYyyy" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getDdMmYyyy</a>(<a class="d intelliWindow-symbol" href="#current_date" data-definition-place="defined-in-file">current_date</a>), 200*eeb7e5b3SAdam Hornáček<a class="l" name="192" href="#192">192</a> <span class="s">'data-value'</span>: <a href="/source/s?defs=data_value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_value</a>, 201*eeb7e5b3SAdam Hornáček<a class="l" name="193" href="#193">193</a> <span class="s">'data-day'</span>: <a class="d intelliWindow-symbol" href="#current_date" data-definition-place="defined-in-file">current_date</a>.<a href="/source/s?defs=getDay" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getDay</a>() 202*eeb7e5b3SAdam Hornáček<a class="l" name="194" href="#194">194</a> }; 203*eeb7e5b3SAdam Hornáček<a class="l" name="195" href="#195">195</a> <b>let</b> <a href="/source/s?defs=heatSquare" class="intelliWindow-symbol" data-definition-place="undefined-in-file">heatSquare</a> = <a href="/source/s?defs=makeHeatSquare" class="intelliWindow-symbol" data-definition-place="undefined-in-file">makeHeatSquare</a>(<span class="s">'day'</span>, <a href="/source/s?defs=x" class="intelliWindow-symbol" data-definition-place="undefined-in-file">x</a>, <a href="/source/s?defs=y" class="intelliWindow-symbol" data-definition-place="undefined-in-file">y</a>, <a href="/source/s?defs=square_side" class="intelliWindow-symbol" data-definition-place="undefined-in-file">square_side</a>, 204*eeb7e5b3SAdam Hornáček<a class="l" name="196" href="#196">196</a> <b>this</b>.<a class="d intelliWindow-symbol" href="#legend_colors" data-definition-place="defined-in-file">legend_colors</a>[<a href="/source/s?defs=color_index" class="intelliWindow-symbol" data-definition-place="undefined-in-file">color_index</a>], <a class="d intelliWindow-symbol" href="#dataAttr" data-definition-place="defined-in-file">dataAttr</a>); 205*eeb7e5b3SAdam Hornáček<a class="l" name="197" href="#197">197</a> 206*eeb7e5b3SAdam Hornáček<a class="l" name="198" href="#198">198</a> <a href="/source/s?defs=data_group" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_group</a>.<a href="/source/s?defs=appendChild" class="intelliWindow-symbol" data-definition-place="undefined-in-file">appendChild</a>(<a href="/source/s?defs=heatSquare" class="intelliWindow-symbol" data-definition-place="undefined-in-file">heatSquare</a>); 207*eeb7e5b3SAdam Hornáček<a class="l" name="199" href="#199">199</a> 208*eeb7e5b3SAdam Hornáček<a class="hl" name="200" href="#200">200</a> <b>let</b> <a href="/source/s?defs=next_date" class="intelliWindow-symbol" data-definition-place="undefined-in-file">next_date</a> = <b>new</b> <b>Date</b>(<a class="d intelliWindow-symbol" href="#current_date" data-definition-place="defined-in-file">current_date</a>); 209*eeb7e5b3SAdam Hornáček<a class="l" name="201" href="#201">201</a> <a href="/source/s?defs=addDays" class="intelliWindow-symbol" data-definition-place="undefined-in-file">addDays</a>(<a href="/source/s?defs=next_date" class="intelliWindow-symbol" data-definition-place="undefined-in-file">next_date</a>, <span class="n">1</span>); 210*eeb7e5b3SAdam Hornáček<a class="l" name="202" href="#202">202</a> <b>if</b>(<a href="/source/s?defs=next_date" class="intelliWindow-symbol" data-definition-place="undefined-in-file">next_date</a>.<a href="/source/s?defs=getTime" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getTime</a>() > <a href="/source/s?defs=today_time" class="intelliWindow-symbol" data-definition-place="undefined-in-file">today_time</a>) <b>break</b>; 211*eeb7e5b3SAdam Hornáček<a class="l" name="203" href="#203">203</a> 212*eeb7e5b3SAdam Hornáček<a class="l" name="204" href="#204">204</a> 213*eeb7e5b3SAdam Hornáček<a class="l" name="205" href="#205">205</a> <b>if</b>(<a href="/source/s?defs=next_date" class="intelliWindow-symbol" data-definition-place="undefined-in-file">next_date</a>.<a href="/source/s?defs=getMonth" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getMonth</a>() - <a class="d intelliWindow-symbol" href="#current_date" data-definition-place="defined-in-file">current_date</a>.<a href="/source/s?defs=getMonth" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getMonth</a>()) { 214*eeb7e5b3SAdam Hornáček<a class="l" name="206" href="#206">206</a> <a href="/source/s?defs=month_change" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_change</a> = <span class="n">1</span>; 215*eeb7e5b3SAdam Hornáček<a class="l" name="207" href="#207">207</a> <b>if</b>(<b>this</b>.<a class="d intelliWindow-symbol" href="#discrete_domains" data-definition-place="defined-in-file">discrete_domains</a>) { 216*eeb7e5b3SAdam Hornáček<a class="l" name="208" href="#208">208</a> <a href="/source/s?defs=week_col_change" class="intelliWindow-symbol" data-definition-place="undefined-in-file">week_col_change</a> = <span class="n">1</span>; 217*eeb7e5b3SAdam Hornáček<a class="l" name="209" href="#209">209</a> } 218*eeb7e5b3SAdam Hornáček<a class="hl" name="210" href="#210">210</a> 219*eeb7e5b3SAdam Hornáček<a class="l" name="211" href="#211">211</a> <b>this</b>.<a href="/source/s?defs=month_start_points" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_start_points</a>.<a href="/source/s?defs=push" class="intelliWindow-symbol" data-definition-place="undefined-in-file">push</a>(<span class="n">13</span> + (<a class="d intelliWindow-symbol" href="#index" data-definition-place="defined-in-file">index</a> + <a href="/source/s?defs=week_col_change" class="intelliWindow-symbol" data-definition-place="undefined-in-file">week_col_change</a>) * <span class="n">12</span>); 220*eeb7e5b3SAdam Hornáček<a class="l" name="212" href="#212">212</a> } 221*eeb7e5b3SAdam Hornáček<a class="l" name="213" href="#213">213</a> <a class="d intelliWindow-symbol" href="#current_date" data-definition-place="defined-in-file">current_date</a> = <a href="/source/s?defs=next_date" class="intelliWindow-symbol" data-definition-place="undefined-in-file">next_date</a>; 222*eeb7e5b3SAdam Hornáček<a class="l" name="214" href="#214">214</a> } 223*eeb7e5b3SAdam Hornáček<a class="l" name="215" href="#215">215</a> 224*eeb7e5b3SAdam Hornáček<a class="l" name="216" href="#216">216</a> <b>return</b> [<a href="/source/s?defs=data_group" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data_group</a>, <a href="/source/s?defs=month_change" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_change</a>]; 225*eeb7e5b3SAdam Hornáček<a class="l" name="217" href="#217">217</a> } 226*eeb7e5b3SAdam Hornáček<a class="l" name="218" href="#218">218</a> 227*eeb7e5b3SAdam Hornáček<a class="l" name="219" href="#219">219</a> <a class="xmt" name="render_month_labels"/><a href="/source/s?refs=render_month_labels" class="xmt intelliWindow-symbol" data-definition-place="def">render_month_labels</a>() { 228*eeb7e5b3SAdam Hornáček<a class="hl" name="220" href="#220">220</a> <span class="c">// this.first_month_label = 1;</span> 229*eeb7e5b3SAdam Hornáček<a class="l" name="221" href="#221">221</a> <span class="c">// if (this.first_week_start.getDate() > 8) {</span> 230*eeb7e5b3SAdam Hornáček<a class="l" name="222" href="#222">222</a> <span class="c">// this.first_month_label = 0;</span> 231*eeb7e5b3SAdam Hornáček<a class="l" name="223" href="#223">223</a> <span class="c">// }</span> 232*eeb7e5b3SAdam Hornáček<a class="l" name="224" href="#224">224</a> <span class="c">// this.last_month_label = 1;</span> 233*eeb7e5b3SAdam Hornáček<a class="l" name="225" href="#225">225</a> 234*eeb7e5b3SAdam Hornáček<a class="l" name="226" href="#226">226</a> <span class="c">// let first_month = this.months.shift();</span> 235*eeb7e5b3SAdam Hornáček<a class="l" name="227" href="#227">227</a> <span class="c">// let first_month_start = this.month_start_points.shift();</span> 236*eeb7e5b3SAdam Hornáček<a class="l" name="228" href="#228">228</a> <span class="c">// render first month if</span> 237*eeb7e5b3SAdam Hornáček<a class="l" name="229" href="#229">229</a> 238*eeb7e5b3SAdam Hornáček<a class="hl" name="230" href="#230">230</a> <span class="c">// let last_month = this.months.pop();</span> 239*eeb7e5b3SAdam Hornáček<a class="l" name="231" href="#231">231</a> <span class="c">// let last_month_start = this.month_start_points.pop();</span> 240*eeb7e5b3SAdam Hornáček<a class="l" name="232" href="#232">232</a> <span class="c">// render last month if</span> 241*eeb7e5b3SAdam Hornáček<a class="l" name="233" href="#233">233</a> 242*eeb7e5b3SAdam Hornáček<a class="l" name="234" href="#234">234</a> <b>this</b>.<a href="/source/s?defs=months" class="intelliWindow-symbol" data-definition-place="undefined-in-file">months</a>.<a href="/source/s?defs=shift" class="intelliWindow-symbol" data-definition-place="undefined-in-file">shift</a>(); 243*eeb7e5b3SAdam Hornáček<a class="l" name="235" href="#235">235</a> <b>this</b>.<a href="/source/s?defs=month_start_points" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_start_points</a>.<a href="/source/s?defs=shift" class="intelliWindow-symbol" data-definition-place="undefined-in-file">shift</a>(); 244*eeb7e5b3SAdam Hornáček<a class="l" name="236" href="#236">236</a> <b>this</b>.<a href="/source/s?defs=months" class="intelliWindow-symbol" data-definition-place="undefined-in-file">months</a>.<a href="/source/s?defs=pop" class="intelliWindow-symbol" data-definition-place="undefined-in-file">pop</a>(); 245*eeb7e5b3SAdam Hornáček<a class="l" name="237" href="#237">237</a> <b>this</b>.<a href="/source/s?defs=month_start_points" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_start_points</a>.<a href="/source/s?defs=pop" class="intelliWindow-symbol" data-definition-place="undefined-in-file">pop</a>(); 246*eeb7e5b3SAdam Hornáček<a class="l" name="238" href="#238">238</a> 247*eeb7e5b3SAdam Hornáček<a class="l" name="239" href="#239">239</a> <b>this</b>.<a href="/source/s?defs=month_start_points" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_start_points</a>.<a href="/source/s?defs=map" class="intelliWindow-symbol" data-definition-place="undefined-in-file">map</a>((<a class="d intelliWindow-symbol" href="#start" data-definition-place="defined-in-file">start</a>, <a href="/source/s?defs=i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">i</a>) => { 248*eeb7e5b3SAdam Hornáček<a class="hl" name="240" href="#240">240</a> <b>let</b> <a href="/source/s?defs=month_name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_name</a> = <b>this</b>.<a href="/source/s?defs=month_names" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_names</a>[<b>this</b>.<a href="/source/s?defs=months" class="intelliWindow-symbol" data-definition-place="undefined-in-file">months</a>[<a href="/source/s?defs=i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">i</a>]].<a href="/source/s?defs=substring" class="intelliWindow-symbol" data-definition-place="undefined-in-file">substring</a>(<span class="n">0</span>, <span class="n">3</span>); 249*eeb7e5b3SAdam Hornáček<a class="l" name="241" href="#241">241</a> <b>let</b> <a href="/source/s?defs=text" class="intelliWindow-symbol" data-definition-place="undefined-in-file">text</a> = <a href="/source/s?defs=makeText" class="intelliWindow-symbol" data-definition-place="undefined-in-file">makeText</a>(<span class="s">'y-value-text'</span>, <a class="d intelliWindow-symbol" href="#start" data-definition-place="defined-in-file">start</a>+<span class="n">12</span>, <span class="n">10</span>, <a href="/source/s?defs=month_name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_name</a>); 250*eeb7e5b3SAdam Hornáček<a class="l" name="242" href="#242">242</a> <b>this</b>.<a href="/source/s?defs=domain_label_group" class="intelliWindow-symbol" data-definition-place="undefined-in-file">domain_label_group</a>.<a href="/source/s?defs=appendChild" class="intelliWindow-symbol" data-definition-place="undefined-in-file">appendChild</a>(<a href="/source/s?defs=text" class="intelliWindow-symbol" data-definition-place="undefined-in-file">text</a>); 251*eeb7e5b3SAdam Hornáček<a class="l" name="243" href="#243">243</a> }); 252*eeb7e5b3SAdam Hornáček<a class="l" name="244" href="#244">244</a> } 253*eeb7e5b3SAdam Hornáček<a class="l" name="245" href="#245">245</a> 254*eeb7e5b3SAdam Hornáček<a class="l" name="246" href="#246">246</a> <a class="xmt" name="make_graph_components"/><a href="/source/s?refs=make_graph_components" class="xmt intelliWindow-symbol" data-definition-place="def">make_graph_components</a>() { 255*eeb7e5b3SAdam Hornáček<a class="l" name="247" href="#247">247</a> <b>Array</b>.<a href="/source/s?defs=prototype" class="intelliWindow-symbol" data-definition-place="undefined-in-file">prototype</a>.<a class="xmt" name="slice"/><a href="/source/s?refs=slice" class="xmt intelliWindow-symbol" data-definition-place="def">slice</a>.<a href="/source/s?defs=call" class="intelliWindow-symbol" data-definition-place="undefined-in-file">call</a>( 256*eeb7e5b3SAdam Hornáček<a class="l" name="248" href="#248">248</a> <b>this</b>.<a class="d intelliWindow-symbol" href="#container" data-definition-place="defined-in-file">container</a>.<a href="/source/s?defs=querySelectorAll" class="intelliWindow-symbol" data-definition-place="undefined-in-file">querySelectorAll</a>(<span class="s">'.graph-stats-container, .sub-title, .title'</span>) 257*eeb7e5b3SAdam Hornáček<a class="l" name="249" href="#249">249</a> ).<a href="/source/s?defs=map" class="intelliWindow-symbol" data-definition-place="undefined-in-file">map</a>(<a href="/source/s?defs=d" class="intelliWindow-symbol" data-definition-place="undefined-in-file">d</a> => { 258*eeb7e5b3SAdam Hornáček<a class="hl" name="250" href="#250">250</a> <a href="/source/s?defs=d" class="intelliWindow-symbol" data-definition-place="undefined-in-file">d</a>.<a href="/source/s?defs=style" class="intelliWindow-symbol" data-definition-place="undefined-in-file">style</a>.<a href="/source/s?defs=display" class="intelliWindow-symbol" data-definition-place="undefined-in-file">display</a> = <span class="s">'None'</span>; 259*eeb7e5b3SAdam Hornáček<a class="l" name="251" href="#251">251</a> }); 260*eeb7e5b3SAdam Hornáček<a class="l" name="252" href="#252">252</a> <b>this</b>.<a href="/source/s?defs=chart_wrapper" class="intelliWindow-symbol" data-definition-place="undefined-in-file">chart_wrapper</a>.<a href="/source/s?defs=style" class="intelliWindow-symbol" data-definition-place="undefined-in-file">style</a>.<a href="/source/s?defs=marginTop" class="intelliWindow-symbol" data-definition-place="undefined-in-file">marginTop</a> = <span class="s">'0px'</span>; 261*eeb7e5b3SAdam Hornáček<a class="l" name="253" href="#253">253</a> <b>this</b>.<a href="/source/s?defs=chart_wrapper" class="intelliWindow-symbol" data-definition-place="undefined-in-file">chart_wrapper</a>.<a href="/source/s?defs=style" class="intelliWindow-symbol" data-definition-place="undefined-in-file">style</a>.<a href="/source/s?defs=paddingTop" class="intelliWindow-symbol" data-definition-place="undefined-in-file">paddingTop</a> = <span class="s">'0px'</span>; 262*eeb7e5b3SAdam Hornáček<a class="l" name="254" href="#254">254</a> } 263*eeb7e5b3SAdam Hornáček<a class="l" name="255" href="#255">255</a> 264*eeb7e5b3SAdam Hornáček<a class="l" name="256" href="#256">256</a> <a class="xmt" name="bind_tooltip"/><a href="/source/s?refs=bind_tooltip" class="xmt intelliWindow-symbol" data-definition-place="def">bind_tooltip</a>() { 265*eeb7e5b3SAdam Hornáček<a class="l" name="257" href="#257">257</a> <b>Array</b>.<a href="/source/s?defs=prototype" class="intelliWindow-symbol" data-definition-place="undefined-in-file">prototype</a>.<a class="xmt" name="slice"/><a href="/source/s?refs=slice" class="xmt intelliWindow-symbol" data-definition-place="def">slice</a>.<a href="/source/s?defs=call" class="intelliWindow-symbol" data-definition-place="undefined-in-file">call</a>( 266*eeb7e5b3SAdam Hornáček<a class="l" name="258" href="#258">258</a> <a href="/source/s?defs=document" class="intelliWindow-symbol" data-definition-place="undefined-in-file">document</a>.<a href="/source/s?defs=querySelectorAll" class="intelliWindow-symbol" data-definition-place="undefined-in-file">querySelectorAll</a>(<span class="s">".data-group .day"</span>) 267*eeb7e5b3SAdam Hornáček<a class="l" name="259" href="#259">259</a> ).<a href="/source/s?defs=map" class="intelliWindow-symbol" data-definition-place="undefined-in-file">map</a>(<a href="/source/s?defs=el" class="intelliWindow-symbol" data-definition-place="undefined-in-file">el</a> => { 268*eeb7e5b3SAdam Hornáček<a class="hl" name="260" href="#260">260</a> <a href="/source/s?defs=el" class="intelliWindow-symbol" data-definition-place="undefined-in-file">el</a>.<a href="/source/s?defs=addEventListener" class="intelliWindow-symbol" data-definition-place="undefined-in-file">addEventListener</a>(<span class="s">'mouseenter'</span>, (<a href="/source/s?defs=e" class="intelliWindow-symbol" data-definition-place="undefined-in-file">e</a>) => { 269*eeb7e5b3SAdam Hornáček<a class="l" name="261" href="#261">261</a> <b>let</b> <a href="/source/s?defs=count" class="intelliWindow-symbol" data-definition-place="undefined-in-file">count</a> = <a href="/source/s?defs=e" class="intelliWindow-symbol" data-definition-place="undefined-in-file">e</a>.<a href="/source/s?defs=target" class="intelliWindow-symbol" data-definition-place="undefined-in-file">target</a>.<a href="/source/s?defs=getAttribute" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getAttribute</a>(<span class="s">'data-value'</span>); 270*eeb7e5b3SAdam Hornáček<a class="l" name="262" href="#262">262</a> <b>let</b> <a href="/source/s?defs=date_parts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">date_parts</a> = <a href="/source/s?defs=e" class="intelliWindow-symbol" data-definition-place="undefined-in-file">e</a>.<a href="/source/s?defs=target" class="intelliWindow-symbol" data-definition-place="undefined-in-file">target</a>.<a href="/source/s?defs=getAttribute" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getAttribute</a>(<span class="s">'data-date'</span>).<a href="/source/s?defs=split" class="intelliWindow-symbol" data-definition-place="undefined-in-file">split</a>(<span class="s">'-'</span>); 271*eeb7e5b3SAdam Hornáček<a class="l" name="263" href="#263">263</a> 272*eeb7e5b3SAdam Hornáček<a class="l" name="264" href="#264">264</a> <b>let</b> <a href="/source/s?defs=month" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month</a> = <b>this</b>.<a href="/source/s?defs=month_names" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month_names</a>[<a href="/source/s?defs=parseInt" class="intelliWindow-symbol" data-definition-place="undefined-in-file">parseInt</a>(<a href="/source/s?defs=date_parts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">date_parts</a>[<span class="n">1</span>])-<span class="n">1</span>].<a href="/source/s?defs=substring" class="intelliWindow-symbol" data-definition-place="undefined-in-file">substring</a>(<span class="n">0</span>, <span class="n">3</span>); 273*eeb7e5b3SAdam Hornáček<a class="l" name="265" href="#265">265</a> 274*eeb7e5b3SAdam Hornáček<a class="l" name="266" href="#266">266</a> <b>let</b> <a href="/source/s?defs=g_off" class="intelliWindow-symbol" data-definition-place="undefined-in-file">g_off</a> = <b>this</b>.<a href="/source/s?defs=chart_wrapper" class="intelliWindow-symbol" data-definition-place="undefined-in-file">chart_wrapper</a>.<a href="/source/s?defs=getBoundingClientRect" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getBoundingClientRect</a>(), <a href="/source/s?defs=p_off" class="intelliWindow-symbol" data-definition-place="undefined-in-file">p_off</a> = <a href="/source/s?defs=e" class="intelliWindow-symbol" data-definition-place="undefined-in-file">e</a>.<a href="/source/s?defs=target" class="intelliWindow-symbol" data-definition-place="undefined-in-file">target</a>.<a href="/source/s?defs=getBoundingClientRect" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getBoundingClientRect</a>(); 275*eeb7e5b3SAdam Hornáček<a class="l" name="267" href="#267">267</a> 276*eeb7e5b3SAdam Hornáček<a class="l" name="268" href="#268">268</a> <b>let</b> <a href="/source/s?defs=width" class="intelliWindow-symbol" data-definition-place="undefined-in-file">width</a> = <a href="/source/s?defs=parseInt" class="intelliWindow-symbol" data-definition-place="undefined-in-file">parseInt</a>(<a href="/source/s?defs=e" class="intelliWindow-symbol" data-definition-place="undefined-in-file">e</a>.<a href="/source/s?defs=target" class="intelliWindow-symbol" data-definition-place="undefined-in-file">target</a>.<a href="/source/s?defs=getAttribute" class="intelliWindow-symbol" data-definition-place="undefined-in-file">getAttribute</a>(<span class="s">'width'</span>)); 277*eeb7e5b3SAdam Hornáček<a class="l" name="269" href="#269">269</a> <b>let</b> <a href="/source/s?defs=x" class="intelliWindow-symbol" data-definition-place="undefined-in-file">x</a> = <a href="/source/s?defs=p_off" class="intelliWindow-symbol" data-definition-place="undefined-in-file">p_off</a>.<a href="/source/s?defs=left" class="intelliWindow-symbol" data-definition-place="undefined-in-file">left</a> - <a href="/source/s?defs=g_off" class="intelliWindow-symbol" data-definition-place="undefined-in-file">g_off</a>.<a href="/source/s?defs=left" class="intelliWindow-symbol" data-definition-place="undefined-in-file">left</a> + (<a href="/source/s?defs=width" class="intelliWindow-symbol" data-definition-place="undefined-in-file">width</a>+<span class="n">2</span>)/<span class="n">2</span>; 278*eeb7e5b3SAdam Hornáček<a class="hl" name="270" href="#270">270</a> <b>let</b> <a href="/source/s?defs=y" class="intelliWindow-symbol" data-definition-place="undefined-in-file">y</a> = <a href="/source/s?defs=p_off" class="intelliWindow-symbol" data-definition-place="undefined-in-file">p_off</a>.<a href="/source/s?defs=top" class="intelliWindow-symbol" data-definition-place="undefined-in-file">top</a> - <a href="/source/s?defs=g_off" class="intelliWindow-symbol" data-definition-place="undefined-in-file">g_off</a>.<a href="/source/s?defs=top" class="intelliWindow-symbol" data-definition-place="undefined-in-file">top</a> - (<a href="/source/s?defs=width" class="intelliWindow-symbol" data-definition-place="undefined-in-file">width</a>+<span class="n">2</span>)/<span class="n">2</span>; 279*eeb7e5b3SAdam Hornáček<a class="l" name="271" href="#271">271</a> <b>let</b> <a href="/source/s?defs=value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">value</a> = <a href="/source/s?defs=count" class="intelliWindow-symbol" data-definition-place="undefined-in-file">count</a> + <span class="s">' '</span> + <b>this</b>.<a class="d intelliWindow-symbol" href="#count_label" data-definition-place="defined-in-file">count_label</a>; 280*eeb7e5b3SAdam Hornáček<a class="l" name="272" href="#272">272</a> <b>let</b> <a href="/source/s?defs=name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">name</a> = <span class="s">' on '</span> + <a href="/source/s?defs=month" class="intelliWindow-symbol" data-definition-place="undefined-in-file">month</a> + <span class="s">' '</span> + <a href="/source/s?defs=date_parts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">date_parts</a>[<span class="n">0</span>] + <span class="s">', '</span> + <a href="/source/s?defs=date_parts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">date_parts</a>[<span class="n">2</span>]; 281*eeb7e5b3SAdam Hornáček<a class="l" name="273" href="#273">273</a> 282*eeb7e5b3SAdam Hornáček<a class="l" name="274" href="#274">274</a> <b>this</b>.<a href="/source/s?defs=tip" class="intelliWindow-symbol" data-definition-place="undefined-in-file">tip</a>.<a href="/source/s?defs=set_values" class="intelliWindow-symbol" data-definition-place="undefined-in-file">set_values</a>(<a href="/source/s?defs=x" class="intelliWindow-symbol" data-definition-place="undefined-in-file">x</a>, <a href="/source/s?defs=y" class="intelliWindow-symbol" data-definition-place="undefined-in-file">y</a>, <a href="/source/s?defs=name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">name</a>, <a href="/source/s?defs=value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">value</a>, [], <span class="n">1</span>); 283*eeb7e5b3SAdam Hornáček<a class="l" name="275" href="#275">275</a> <b>this</b>.<a href="/source/s?defs=tip" class="intelliWindow-symbol" data-definition-place="undefined-in-file">tip</a>.<a href="/source/s?defs=show_tip" class="intelliWindow-symbol" data-definition-place="undefined-in-file">show_tip</a>(); 284*eeb7e5b3SAdam Hornáček<a class="l" name="276" href="#276">276</a> }); 285*eeb7e5b3SAdam Hornáček<a class="l" name="277" href="#277">277</a> }); 286*eeb7e5b3SAdam Hornáček<a class="l" name="278" href="#278">278</a> } 287*eeb7e5b3SAdam Hornáček<a class="l" name="279" href="#279">279</a> 288*eeb7e5b3SAdam Hornáček<a class="hl" name="280" href="#280">280</a> <a class="xmt" name="update"/><a href="/source/s?refs=update" class="xmt intelliWindow-symbol" data-definition-place="def">update</a>(<a class="xa" name="data"/><a href="/source/s?refs=data" class="xa intelliWindow-symbol" data-definition-place="def">data</a>) { 289*eeb7e5b3SAdam Hornáček<a class="l" name="281" href="#281">281</a> <b>this</b>.<a href="/source/s?defs=data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data</a> = <a href="/source/s?defs=data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">data</a>; 290*eeb7e5b3SAdam Hornáček<a class="l" name="282" href="#282">282</a> <b>this</b>.<a class="d intelliWindow-symbol" href="#setup_values" data-definition-place="defined-in-file">setup_values</a>(); 291*eeb7e5b3SAdam Hornáček<a class="l" name="283" href="#283">283</a> <b>this</b>.<a class="d intelliWindow-symbol" href="#bind_tooltip" data-definition-place="defined-in-file">bind_tooltip</a>(); 292*eeb7e5b3SAdam Hornáček<a class="l" name="284" href="#284">284</a> } 293*eeb7e5b3SAdam Hornáček<a class="l" name="285" href="#285">285</a> <a class="xmt" name="foo"/><a href="/source/s?refs=foo" class="xmt intelliWindow-symbol" data-definition-place="def">foo</a>() { 294*eeb7e5b3SAdam Hornáček<a class="l" name="286" href="#286">286</a> <span class="c">/*<a href="http://example.com">http://example.com</a>*/</span> 295*eeb7e5b3SAdam Hornáček<a class="l" name="287" href="#287">287</a> <b>var</b> <a href="/source/s?defs=u1" class="intelliWindow-symbol" data-definition-place="undefined-in-file">u1</a> = <span class="s">"<a href="http://example.com">http://example.com</a>"</span> 296*eeb7e5b3SAdam Hornáček<a class="l" name="288" href="#288">288</a> <b>var</b> <a href="/source/s?defs=u2" class="intelliWindow-symbol" data-definition-place="undefined-in-file">u2</a> = <span class="s">'<a href="http://example.com">http://example.com</a>'</span> 297*eeb7e5b3SAdam Hornáček<a class="l" name="289" href="#289">289</a> <b>var</b> <a href="/source/s?defs=str" class="intelliWindow-symbol" data-definition-place="undefined-in-file">str</a> = <span class="s">'this string \ 298*eeb7e5b3SAdam Hornáček<a class="hl" name="290" href="#290">290</a> is broken \ 299*eeb7e5b3SAdam Hornáček<a class="l" name="291" href="#291">291</a> across multiple \ 300*eeb7e5b3SAdam Hornáček<a class="l" name="292" href="#292">292</a> lines.'</span> 301*eeb7e5b3SAdam Hornáček<a class="l" name="293" href="#293">293</a> } 302*eeb7e5b3SAdam Hornáček<a class="l" name="294" href="#294">294</a>} 303*eeb7e5b3SAdam Hornáček<a class="l" name="295" href="#295">295</a></body> 304*eeb7e5b3SAdam Hornáček</html> 305