Skip to content

Instantly share code, notes, and snippets.

@timelyportfolio
Last active December 26, 2015 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timelyportfolio/7156298 to your computer and use it in GitHub Desktop.
Save timelyportfolio/7156298 to your computer and use it in GitHub Desktop.
Backtest Overfitting | Translated in R
<!DOCTYPE html>
<html>
<head>
<title>Backtest Overfitting | Translated in R</title>
<meta charset="utf-8">
<meta name="description" content="Backtest Overfitting | Translated in R">
<meta name="author" content="TimelyPortfolio">
<meta name="generator" content="slidify" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link rel="stylesheet" href="http://slidifylibraries2.googlecode.com/git/inst/libraries/frameworks/io2012/css/default.css" media="all" >
<link rel="stylesheet" href="http://slidifylibraries2.googlecode.com/git/inst/libraries/frameworks/io2012/css/phone.css"
media="only screen and (max-device-width: 480px)" >
<link rel="stylesheet" href="http://slidifylibraries2.googlecode.com/git/inst/libraries/frameworks/io2012/css/slidify.css" >
<link rel="stylesheet" href="http://slidifylibraries2.googlecode.com/git/inst/libraries/highlighters/highlight.js/css/solarized_light.css" />
<base target="_blank"> <!-- This amazingness opens all links in a new tab. --> <link rel=stylesheet href="http://slidifylibraries2.googlecode.com/git/inst/libraries/widgets/bootstrap/css/bootstrap.css"></link>
<link rel=stylesheet href="http://fonts.googleapis.com/css?family=Raleway:300"></link>
<link rel=stylesheet href="http://fonts.googleapis.com/css?family=Oxygen"></link>
<!-- Grab CDN jQuery, fall back to local if offline -->
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.min.js"></script>
<script>window.jQuery || document.write('<script src="http://slidifylibraries2.googlecode.com/git/inst/libraries/widgets/quiz/js/jquery.js"><\/script>')</script>
<script data-main="http://slidifylibraries2.googlecode.com/git/inst/libraries/frameworks/io2012/js/slides"
src="http://slidifylibraries2.googlecode.com/git/inst/libraries/frameworks/io2012/js/require-1.0.8.min.js">
</script>
</head>
<body style="opacity: 0">
<slides class="layout-widescreen">
<!-- LOGO SLIDE -->
<slide class="title-slide segue nobackground">
<hgroup class="auto-fadein">
<h1>Backtest Overfitting | Translated in R</h1>
<h2></h2>
<p>TimelyPortfolio<br/></p>
</hgroup>
<a href="https://github.com/timelyportfolio/research_lopezdePrado/zipball/gh-pages" class="example">
Download
</a>
<article></article>
<footer class = 'license'>
<a href='http://creativecommons.org/licenses/by-nc-sa/3.0/'>
<img width = '80px' src = 'http://mirrors.creativecommons.org/presskit/buttons/88x31/png/by-nc-sa.png'>
</a>
</footer>
</slide>
<!-- SLIDES -->
<slide class="" id="slide-1" style="background:;">
<article data-timings="10">
<style>
iframe{
height:450px;
width:900px;
margin:auto auto;
}
body{
font-family: 'Oxygen', sans-serif;
}
h1,h2,h3,h4 {
font-family: 'Raleway', sans-serif;
}
h3 {
background-color: #D4DAEC;
text-indent: 100px;
}
h4 {
text-indent: 100px;
}
iframe {height: 300px; width: 900px}
</style>
<h3>Original Paper</h3>
<p><br>
<address>
<strong style="lineheight:40px;">Pseudo-Mathematics and Financial Charlatanism:</strong><p style="lineheight:40px;">The Effects of Backtest Overfitting on Out-of-Sample Performance</p></p>
<p class="muted" style="line-height:26px;">Bailey, David H. and Borwein, Jonathan M. and Lopez de Prado, Marcos and Zhu, Qiji Jim<br>
October 7, 2013<br>
Available at SSRN: <a href="http://ssrn.com/abstract=2308659">http://ssrn.com/abstract=2308659</a>
</p>
<p></address></p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-2" style="background:;">
<hgroup>
<h3>Constants - R Equivalents</h3>
</hgroup>
<article data-timings="">
<pre><code class="r"># these are the constants referenced
# Euler–Mascheroni&#39;s constant
-digamma(1)
</code></pre>
<pre><code>## [1] 0.5772
</code></pre>
<pre><code class="r"># euler constant
exp(1)
</code></pre>
<pre><code>## [1] 2.718
</code></pre>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-3" style="background:;">
<hgroup>
<h3>Expected Maximum Sharpe \(E[max_N]\)</h3>
</hgroup>
<article data-timings="">
<p>\[
\begin{aligned}
(1-\gamma)Z^{-1}\left[1-\frac{1}{N}\right]+\gamma Z^{-1}\left[1-\frac{1}{N}e^{-1}\right] \end{aligned}
\]</p>
<h4>R Translation</h4>
<pre><code class="r">### Eq. 4
emax &lt;- function(N) {
( ( 1 + digamma(1) ) * qnorm( 1 - 1/N ) ) +
(-digamma(1) * qnorm( 1 - (1/N) * exp(-1)))
}
emax( N = 10 ) # should be about = 1.57 to match paper
</code></pre>
<pre><code>## [1] 1.575
</code></pre>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-4" style="background:;">
<hgroup>
<h3>Plot \(E[max_N]\)</h3>
</hgroup>
<article data-timings="">
<pre><code class="r">#implement upper bound
upbound &lt;- function(N) {sqrt(2*log(N))}
#make a ugly plot for reasonableness check
curve(upbound, from = 1, to = 1000, col = &quot;red&quot;, lty = 2)
curve(emax, from = 1, to = 1000, add=TRUE)
grid()
</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAxgAAAFoCAMAAADjHq2+AAAAflBMVEX9/v0AAAAAADkAAGUAOTkAOY8AZrU5AAA5ADk5AGU5OWU5OY85j9plAABlADllAGVlOQBlOY9lZmVlZrVltf2POQCPOTmPOWWPZgCPtY+P29qP2/21ZgC1ZmW1/rW1/v3T09Pajzna/tra/v39tWX924/9/rX9/tr9/v3/AAClybC8AAAAKnRSTlP/////////////////////////////////////////////////////AP+MjuKjAAAACXBIWXMAAAsSAAALEgHS3X78AAANN0lEQVR4nO3dDXca1xWF4WA3VlxLUdNK6YdoBbEA6f//wTKA5EjaoLnMnTl75rzPWtRt7MAusHXPncHDT48A3vkpOgDgiGIAAsUABIoBCBQDECgGIFAMQKAYgEAxAIFiAALFAASKAQgUAxAoBiBQDECgGIBAMQCBYgACxQAEigEIFAMQKAYgUAxAoBiAQDEAgWIAAsUABIoBCBQDECgGIFAMQKAYgEAxAIFiAALFAASKAQgUAxAoBiBQDECgGIBAMQCBYgACxQAEigEIFAMQKAYgUAxAoBiAQDEAgWIAAsUABIoBCBQDECgGIFAMQKAYgEAxAIFiAEKXYsyA8eqxGB3+XSBWRDEWHe60DhJYRHBOQDGyJjCI4JyAUQoQKAYgMEplTWAQwTkBxciawCCCcwJGKaTw1BC/HkMxMHL6Dd+2AMcwSmVNYBDhdIJ2b/iz3vUtElCMrAniIzw1Cfp5w7flVQxk0O+P+t5RDJyn9lBvhlEqa4K2EXp848c/CV6jlPPzkSfBjwhhP/njnwSvYiDGKGf9KBRjqihAJ4xSI07QbQaayJPQUwKKMZoEtZeAUT4JgyVglDI0yeOfI0MxbLAZcMIoFWBbgEX8ipD+ZTiZgGIM5tWKEP8cGERwTsAo1SP2CONFMSrixMF0MEp1dlYR4p8DgwjOCSjGGSqMSPHPgUEE5wSMUq0xImVCMT7E5jkjRilhgKNJ8c+BQQTnBBTjTwYcleKfA4MIzgkYpdg7QEhcDPYOOC7lKPW0CC9E+HPgEGH4BG+/NslrlAp7RV5GpozvCcMIFROc+f1hXsUYHHuI0ev2jXnnPODp355CMSiEv45fFdlHotO/PepR6vjuelJTxBgi6Hf7Iu59f+A1SvX9inx8uCn+bRmfYNAJv/cEZ/IqRo8Ym3pkNOj0b1LFoBYVpHr7HzeVUaqsE85r+JARgt/+8U+C1yhV8/k470is8ytS35EFYBG+Bji/DOMepZid3sk+AtUy1mLwMafH8Elo0sY5SmW8OmX1EozxSRguQedirC5ml/PZ7PN9+7vu9HxUWSqcX5HGIEuB+5MQm6BrMTa3N4/zbStW374X3vVZpjtAMQ956VqM9fX948Pl/tfnu3w+6rGtIzd52z43sze38EzcXt1qrBiNkhVj8dGdahVXizMTdPFmRQhI8FZ8BOcEnfcY66umGcu+9xh1j0IN84qcmo7i3xMGEZwTjOBw7Zj2FewUpsK+GPa1oAuT5H4eo59adFzDK3QhfoowiOCcwL0Y/Tg3Qb11If45MIjgnMB5lLIYopiUcvItRvjmgi5kZjtK9VqLYwmGWx7ipwiDCM4JbIvRq3cJBh+V4p8DgwjOCSxHqSGHKAYmKIbFGGhzwX4aJ/iNUv3XYn9Bo94f5qT4KcIggnMCv2L0yOgjfPEJDCI4JzAcpfrA2IQyXsWoP0axk8BZnEapurvuU41wXsMTRXBOYFSMerX4cJFwfkUSRXBO4DNK1eoFgxMq8ClGBWwnUIvRKNXloQq32M5reKIIzglMitFhjjpnlXB+RRJFcE7gMUqd2wtGJ/RkxMWgFOiPxSh1Ri+6tcJ5DU8UwTnBKIvRea1wfkUSRXBO4DFKldwrExQGMK5iUAoMxGKUanl/9VrhvIYniuCcIL4Y7TYYddcK51ckUQTnBOGjVKteMEFhYGMoBrXA4KJHqQ970ct+23kNTxTBOUG7YjzsPqN3U/agNYrR02Lh/IokiuCcoE0xHmZfml82t2XV6P6eZoZClBbFWP/28i1i/33/vUln3/UAdwCcK3qPceJf77EXzmt4ogjOCVoVY79mbP5Zsl60KsbxHUa/U5TzK5IognOCdivG6uLL4/zTXdmDtnhrHysGmwsEaztKPZQek2pTjKO9KH0ooLKIFeNl/TpSjP574byGJ4rgnCB0jyGLMcQY5fyKJIrgnKDN4dp/vPzPAQ7XMkbBgdsJPnoBC9EfCSmLU4vzGp4ognOCwBN8Yocx1Hrh/IokiuCcIPBj5++LwRwFF20231eHK2B+rnRU6uBtMTirBx/tVoz55fY/ll8q3bUepYashfManiiCc4J25zGu71/+s72yYgy6XDi/IokiOCdoVYzN7W7F+Pn76T9cdtcd/jDQt3aj1OZ2u8UonKSK3uv0Al5M/j7GwMVwXsMTRXBO0LkYq4tZ8+lCsQEp2GMMvWA4vyKJIjgnKDnzrQ7Xbm5vdluQkmIcBBYD+EC7o1JXRz8Nsi/E/MufinE46zFbbOt44vb047/PTv05btwCbgWHa6Vmxdha/uVr6Sj19PEf7M1i8Ef0S2AQwTlBwQk+bX21+73l+zmLYlgnMIjgnKDlKNXHR0JK/xwwnPBr11IMOIo/jxHRC+c1PFEE5wQRo9TrPQbFSBvBOUHBirE8vgM/566fWv0pIERBMap9unaPYsBYQTEe+hilYnrhvIYniuCcoGSPUfdiCBQjfQTnBNGHa5mkYCm4GPQCngr+olLhX+BrdR4jqBjOa3iiCM4JIv5q6489RtSC4fyKJIrgnCDiYgh7kcUAPhB3MYQnegFfcXuMyGI4r+GJIjgniPsQIcVIH8E5QeThWiYp2Iq8rhTFgK24w7WRvXBewxNFcE4Qdu3aJ4qRPoJzgoirne8c+ypjwEHY92NQDDgLO1wbWgznNTxRBOcEFCNrAoMIzglMvgYA8FJyuLbq5htwFvhVY4FIYBHBOUG7UWq3WNT9ckr2GNHiIzgnKLkYQuEBWw7XYrzCPkRIMeCMw7VZExhEcE4Qdu1aihEtPoJzgrhr1wLG4q5dCxiLu3ZtJBJYRHBOEHbtWvYY0eIjOCfgcC0gRBWDXsBa1HmM2GI4r+GJIjgnoBhZExhEcE4Q/f0YgCWKAQjx3/MdgQQWEZwTsMfImsAggnMCDtcCAsUABEaprAkMIjgnoBhZExhEcE7A4VpAoBiAwHmMrAkMIjgnYI+RNYFBBOcEHK4FBIoBCF2LIS5SePgHs8V2nTK9LQwycNu9ENEZjt06rxj7K6Er7DGsExhEcE7QfZRa/3p31l0DxjiPAQicx8iawCCCcwLOY2RNYBDBOQGHawEhqBj0At6CRqngYjiv4YkiOCegGFkTGERwTsDhWkCgGIDAeYysCQwiOCdgj5E1gUEE5wQcrgUEigEIjFJZExhEcE5AMbImMIjgnIDDtYBAMQCB8xhZExhEcE7AHiNrAoMIzgk4XAsIFAMQGKWyJjCI4JyAYmRNYBDBOQGHawGBYgAC5zGyJjCI4JwgphjRB6WcX5FEEZwTxIxS0cUAPkAxAIFRKmsCgwjOCShG1gQGEZwTcLgWECgGIHAeI2sCgwjOCdhjZE1gEME5AYdrAYFiAAKjVNYEBhGcE1CMrAkMIjgn4HAtIFAMQOA8RtYEBhGcE7DHyJrAIIJzAg7XAkJIMegF3IWMUuHFcF7DE0VwTkAxsiYwiOCcgMO1gEAxAIHzGFkTGERwTsAeI2sCgwjOCThcCwidi7G6mDU+3xfcNcWAu67F2Nze7H59+Pl767tmlHJIYBDBOUHXYqyv71/92tzlwWL7qPr2dOSfD3ZbBD8+t91tYZDh2C1ixQDsdd5jrK/K9xiAO85jZE1gEME5AcXImsAggnMCPhICCBQDEBilsiYwiOCcoM9iHLM4+jtDIYFFBOsE/RXjeGP6uFMSjC/CiBNQjMkmMIgw4gQUY7IJDCKMOAHFmGwCgwgjTkAxJpvAIMKIE1CMySYwiDDiBBRjsgkMIow4QS/FAMaOYgACxQAEigEIFAMQKAYgUAxAoBiAQDEAgWIAQv1irK9m76/NNozmMrs3LwliguwuUBeZYHM7+3QXGmH7MjRXIYtLsPr67uGLU1QvRvPGWH6pfa+trH+9e1z9cndIEBRkua1maIL5TXPVyMAIzcuwjEzw0PTy9cOXp6hejOYat7vGDu+h+X8+vzkkiAmy+uvfbh4jExyuMRwYYfXte/PwYQnmn/69fbzXD1+eonoxdk/L9mdGkO1DHxKEBNn8/p/tz6bIBKtv/2pGqcAIhxUjMEFTgdcPX56iejGaiz/HFWNze/mcICTI8rJZtCMTrC52xYyMsJ/nAxM0xXj98OUpprVirK8uHyN/WG4fcxO+YnT7SVkhwS93jw+f71kxXgvcY+x+WoaO18vdBYsuQ/cYv+3eAoERDj+dI3c5jnuMZpgJOiq178VzgqAgzYoRmmB+s1+4wiIcVozIBF/v37wG5SmmdB5j//P6Jvl5jO2Dxp5FeHyYBZ9JsTyPAUwBxQAEigEIFAMQKAYgUAxAoBiAQDEAgWIAAsUABIoBCBQDECgGIFAMQKAYgEAxAIFiAALFAASKAQgUAxAoBiBQDECgGJ7mYVfnwg7F8LS+/t91zOUcsUMxTC1nl9ERUqMYppoLXSIOxTA1/ztbjEgUw9Pq2x+/s2QEohiWnr9+BlEoBiBQDECgGIBAMQCBYgACxQAEigEIFAMQKAYgUAxAoBiAQDEAgWIAAsUABIoBCBQDECgGIFAMQPg/MU3zAT6PWZgAAAAASUVORK5CYII=" alt="plot of chunk unnamed-chunk-4"> </p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-5" style="background:;">
<hgroup>
<h3>rChart \(E[max_N]\)</h3>
</hgroup>
<article data-timings="">
<pre><code class="r">require(rCharts)
df &lt;- data.frame(
list(x=c(1,2:1000), y=c(0,emax(2:1000))))
d1 &lt;- dPlot( y ~ x, groups = &quot;x&quot;, data = df, type = &quot;line&quot;, height = 270, width = 800)
d1$xAxis(type = &quot;addMeasureAxis&quot;,orderBy = &quot;x&quot;,outputFormat = &quot;,0.0f&quot;)
d1$yAxis( outputFormat = &quot;.2f&quot;)
d1
</code></pre>
<iframe src=unnamed-chunk-5.html seamless></iframe>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-6" style="background:;">
<hgroup>
<h3>Check My Math with <em>Eq. 6</em></h3>
</hgroup>
<article data-timings="">
<pre><code class="r">### Try next example for Eq. 6
# if y = 5
# so solve for annualized Sharpe of 1
# says no more than 45 N should be tried
# first just do this to make sure I understand
N = 45
y = 5
emax( N ) * y^-0.5 #seems like on the right path
</code></pre>
<pre><code>## [1] 0.9998
</code></pre>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-7" style="background:;">
<hgroup>
<h3>Minimum Backtest Length \(MinBTL\)</h3>
</hgroup>
<article data-timings="">
<p>\[
\begin{aligned}
\left(\frac{(1-\gamma)Z^{-1}\left[1-\frac{1}{N}\right]+\gamma Z^{-1}\left[1-\frac{1}{N}e^{-1}\right]}{\overline{E[max_N]}}\right)^2 \end{aligned}
\]</p>
<h4> R Translation </h4>
<pre><code class="r">#use emax from earlier for numerator
minBTL &lt;- function( N, eMaxSharpe = 1 ) {
(emax(N) / eMaxSharpe) ^ 2
}
#then this should equal 5 if correct
minBTL( N = 45, eMaxSharpe = 1 )
</code></pre>
<pre><code>## [1] 4.998
</code></pre>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-8" style="background:;">
<hgroup>
<h3>Plot \(MinBTL\)</h3>
</hgroup>
<article data-timings="">
<pre><code class="r">#make ugly plot for a reasonableness check
curve( minBTL, from = 1, to = 1000)
</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAxgAAAFoCAMAAADjHq2+AAAAeFBMVEX9/v0AAAAAADkAAGUAOY8AZrU5AAA5ADk5AGU5OWU5OY85j9plAABlADllAGVlOQBlOY9lZmVlZrVltf2POQCPOTmPOWWPZgCPtY+P29qP2/21ZgC1ZmW1/rW1/v3ajzna24/a/tra/v39tWX924/9/rX9/tr9/v0jL9iuAAAAKHRSTlP///////////////////////////////////////////////////8AvqouGAAAAAlwSFlzAAALEgAACxIB0t1+/AAACZpJREFUeJzt3WtbG9cVgNEoNsQ1mKYF9wINtNbt///DSgKcKGzkGc3l7Dmz1heePLJH26BXZ45GET9tgTd+Kj0AZCQMCAgDAsKAgDAgIAwICAMCwoCAMCAgDAgIAwLCgIAwICAMCAgDAsKAgDAgIAwICAMCwoCAMCAgDAgIAwLCgIAwICAMCAgDAsKAgDAgIAwICAMCwoCAMCAgDAgIAwLCgIAwICAMCAgDAsKAgDAgIAwICAMCwoCAMCAgDAgIAwLCgIAwICAMCAgDAsKAgDAgIAwICAMCwoCAMCAgDAh0CWMB0zVgGB3+LpQlDAgIAwLCgIAwICAMCAgDAsJgfhpcrRAGs9Di4t3znz99szCYrLYtHP/l0zcLg+k5s4XjY5y+WRhMQqfVITzg6ZuFQVa9t3B89NM3C4NEhm3h+K5O3ywMyhqxheP7PX2zMBhdqRaOhzh9szAYUdkWjnQOY3V5+Md8eGx7aNgmWR4CXcPY3N0evi4/fmt5aOYqawtHuoaxvnk8+tr80MxO8haOWDEY0iRWh0jnPcb62h6DwPRaOOJVKXoz2eUhMEAYtXxraKzCH7gVg7PUtDpEhEFL1bZwpPPLtdcvTxpvd9/Vf+/mpt7lIdB5xdjcXZ13aCag9hOm93U/lVp/uT/r0GQ2xxaO2GPwYr6rQ0QYzGQ73Y4w5szy8C5hzJMifkAYM2ORaEYY9bOrPoMwaqaFswmjSpaHroRRGUX0Qxi1sEj0ShjTp4gBCGPCLBLDEcYkKWJowpgWi8RIhDEVihiVMNKzSJQgjMQUUY4wMrJIFCeMXBSRhDCSsEjkIoziFJGRMEqSRFrCKEYTmQmjBCtFesIYlS32VAhjJIqYFmEMTxITJIyBaWKahDEcK8WECWMAttjTJ4yeKaIOwuiRKOohjH44d6qMMLrTRIWE0Y0oKiWMszl7qpkwzqKJ2gmjNVHMgTDaEcVMCKMFVcyHMJqx054ZYfyQJuZIGKdpYqaEcYIq5ksY73D+NG+dw1hdLi6eFosPj20PnZkoZq9rGJuv99uni10fn7+1PHRaqqB7GOubx+3T1fPX10O+6j7d+CY6Nn2zYvxuqjEzgD72GFc17DFEwR95VWpPFfyJMFRBYOZh2FYQm3MYouBd8w1DFZww1zBkwUnNwlgeLtjd9nrokmTBDzQJY7m42H/Z3LVLI+mDz36bBhqEsf71+0Xt/7y9jHf2oYsQBc3Mao+hCppqFMbzmrH5R5v1Il8YsqC5ZivG6vJi+/Dzfa+HHpksaKPpqdSy7WtSmcKw36at+lcMUXCG2vcYquAsTV6u/fv3/5zay7Wy4Ew1X+CTBWer9y0hsqCDWi/wyYJOWoTxhw8C6ePQQ5IFHdUYhizorMIwZEF31YVhuaAPlYUhC/rR5ALf9ctHbgYfqtbh0AOQBX2p6OVaWdCfJitGy1OohofumSzoUyVhyIJ+1RGGLOhZDZtvywW9q2DFkAX9m3wYlguGMPEwZMEwJn0dQxYMpUkY+99YvGy99x4+DFkwmAZhbO5ut0+7KpYf3/z+yS6H7spywYAa7jH2v5Q115sIZcGQJhqG5YJhTTMMWTCwKV75tlwwuAm+XCsLhje9MHTBCNp84FqGUymnUYyi2Yc6X7f+HQA/PvRZZME4moVx1rulBngQ64KRNDuVerjq/9ApjgixhqdSKfYYumA0E3pVSheMp3MYq8vbzd1iEbzBsOcHsi4YUaO3hPz2/qnU/q23D7fbw3tG2h26JV0wpq4rxvrmcfP1/uiFq8Wr7tP9TheMqvMFvt1ysbza/YmLtoduRReMq9mrUl9O/Cbjh0M0b7vo8cHscjdjm8IFPlkwumanUk8lL/DpgvE1DKPgBT5dUED3Pca5hx71KNBO9j2GLigi+R5DF5SR/E2EwqCM3G8i1AWFpA5DF5SSOQxdUEziMHRBOXnD0AUFpQ1DF5SUNQxdUJQwIJA0DF1QVs4wdEFhKcPQBaVlDEMXFCcMCCQMQxeUJwwI5AtDFySQLgxdkIEwIJAtDF2QgjAgkCwMXZBDrjB0QRLCgECqMHRBFsKAQKYwdEEawoBAojB0QR7CgECeMHRBIsKAQJowdEEmwoBAljB0QSrCgECSMHRBLsKAgDAgkCMMXZCMMCDQTxirT4+tD33mH4UxdA1jfb149uFNGs0f7bogm84rxvp6l8TRirF41dcQMLoeTqXW1x//2+1UShhk08seY3X59kSqxcNdF6ST4VUpYZCOMCCQIAxdkI8wICAMCJQPQxckJAwICAMCxcPQBRkJAwLCgIAwIFA6DF2QkjAgIAwICAMChcPQBTkJAwLCgIAwIFA2DF2QlDAgIAwICAMCRcPQBVkJAwLCgIAwIFAyDF2QljAgIAwICAMCBcPQBXkJAwLCgEDp/+cbUhIGBIQBAWFAQBgQEAYEhAGBIcOA6RoujPeLGeKgJpjeCBOeQBjVTpBghAlPIIxqJ0gwwoQnEEa1EyQYYcITCKPaCRKMMOEJhFHtBAlGmPAEwqh2ggQjTHiCQcKAqRMGBIQBAWFAQBgQEAYEhAEBYUBAGBAQBgT6D2N9vfj4rfejNrK6XCxuv09QZpDNXeEJNneLn++LjrD7MXx4LDnB6tObu289Re9h7B8YTxd9H7WR9Zf77eqX+5cJCg3ytEuz6AQPt9vlx28FR9j/GJ5KTrDcd3l89+2n6D2M9c3jc7HjW+7/5Q+3LxOUGWT1l7/ebktOsL/T7bbkCKvP3/Z3X2yCh5//tbu/47tvP0XvYRy+LbvnjEJ2d/0yQZFBNl//vXtuKjnB6vM/96dSBUd4WTEKTrBP4Pju20/Rexi7ZbxgGJu7q9cJigzydLVftEtOsLo8hFlyhOfz+YIT7MM4vvv2U9S1Yqyvr7Ylnyx397kpvmJ0e6bsYYJf7rfLD49WjGMF9xiHZ8uip9dPhw8suiq6x/j18BAoOMLLs3PJXU7GPcb+ZKbQq1LPXbxOUGiQ/YpRdIKH2+eFq9gILytGyQk+Pf7pZ9B+ipquYzw/X9/O/DrG7k7LXkXYLheFr6SkvI4BNRAGBIQBAWFAQBgQEAYEhAEBYUBAGBAQBgSEAQFhQEAYEBAGBIQBAWFAQBgQEAYEhAEBYUBAGBAQBgSEkdNDsU/n4kAYOa1vfrsp83GOHAgjqafFVekRZk0YSe0/6JJyhJHUw99sMUoSRk6rz//7askoSBgpvf76GUoRBgSEAQFhQEAYEBAGBIQBAWFAQBgQEAYEhAEBYUBAGBAQBgSEAQFhQEAYEBAGBIQBgf8DYJLZ1nNOUYcAAAAASUVORK5CYII=" alt="plot of chunk unnamed-chunk-8"> </p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-9" style="background:;">
<hgroup>
<h3>rChart \(MinBTL\)</h3>
</hgroup>
<article data-timings="">
<pre><code class="r">df &lt;- data.frame(
list(x=c(1,2:1000), minBTL=c(0,minBTL(2:1000))))
n1 &lt;- nPlot( minBTL ~ x, data = df, type = &quot;lineChart&quot;, height = 270, width = 800)
n1$yAxis( tickFormat = &quot;#!d3.format(&#39;,.2f&#39;)!#&quot;)
n1$chart( useInteractiveGuideline = TRUE )
n1
</code></pre>
<iframe src=unnamed-chunk-9.html seamless></iframe>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-10" style="background:;">
<hgroup>
<h3>Thanks</h3>
</hgroup>
<article data-timings="">
<ul>
<li>Ramnath Vaidyanathan</li>
<li>Bailey, David H. and Borwein, Jonathan M. and Lopez de Prado, Marcos and Zhu, Qiji Jim</li>
</ul>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="backdrop"></slide>
</slides>
<div class="pagination pagination-small" id='io2012-ptoc' style="display:none;">
<ul>
<li>
<a href="#" target="_self" rel='tooltip'
data-slide=1 title=''>
1
</a>
</li>
<li>
<a href="#" target="_self" rel='tooltip'
data-slide=2 title='Constants - R Equivalents'>
2
</a>
</li>
<li>
<a href="#" target="_self" rel='tooltip'
data-slide=3 title='Expected Maximum Sharpe \(E[max_N]\)'>
3
</a>
</li>
<li>
<a href="#" target="_self" rel='tooltip'
data-slide=4 title='Plot \(E[max_N]\)'>
4
</a>
</li>
<li>
<a href="#" target="_self" rel='tooltip'
data-slide=5 title='rChart \(E[max_N]\)'>
5
</a>
</li>
<li>
<a href="#" target="_self" rel='tooltip'
data-slide=6 title='Check My Math with <em>Eq. 6</em>'>
6
</a>
</li>
<li>
<a href="#" target="_self" rel='tooltip'
data-slide=7 title='Minimum Backtest Length \(MinBTL\)'>
7
</a>
</li>
<li>
<a href="#" target="_self" rel='tooltip'
data-slide=8 title='Plot \(MinBTL\)'>
8
</a>
</li>
<li>
<a href="#" target="_self" rel='tooltip'
data-slide=9 title='rChart \(MinBTL\)'>
9
</a>
</li>
<li>
<a href="#" target="_self" rel='tooltip'
data-slide=10 title='Thanks'>
10
</a>
</li>
</ul>
</div> <!--[if IE]>
<script
src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js">
</script>
<script>CFInstall.check({mode: 'overlay'});</script>
<![endif]-->
</body>
<!-- Load Javascripts for Widgets -->
<script src="http://slidifylibraries2.googlecode.com/git/inst/libraries/widgets/bootstrap/js/bootstrap.min.js"></script>
<script src="http://slidifylibraries2.googlecode.com/git/inst/libraries/widgets/bootstrap/js/bootbox.min.js"></script>
<!-- MathJax: Fall back to local if CDN offline but local image fonts are not supported (saves >100MB) -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
processEscapes: true
}
});
</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/2.0-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!-- <script src="https://c328740.ssl.cf1.rackcdn.com/mathjax/2.0-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script> -->
<script>window.MathJax || document.write('<script type="text/x-mathjax-config">MathJax.Hub.Config({"HTML-CSS":{imageFont:null}});<\/script><script src="http://slidifylibraries2.googlecode.com/git/inst/libraries/widgets/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"><\/script>')
</script>
<script>
$(function (){
$("#example").popover();
$("[rel='tooltip']").tooltip();
});
</script>
<!-- LOAD HIGHLIGHTER JS FILES -->
<script src="http://slidifylibraries2.googlecode.com/git/inst/libraries/highlighters/highlight.js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<!-- DONE LOADING HIGHLIGHTER JS FILES -->
</html>
---
title: Backtest Overfitting | Translated in R
author: TimelyPortfolio
license: by-nc-sa
widgets: [mathjax, bootstrap]
github: {user: timelyportfolio, repo: research_lopezdePrado}
mode: standalone
hitheme: solarized_light
assets:
css:
- "http://fonts.googleapis.com/css?family=Raleway:300"
- "http://fonts.googleapis.com/css?family=Oxygen"
--- dt:10
<style>
iframe{
height:450px;
width:900px;
margin:auto auto;
}
body{
font-family: 'Oxygen', sans-serif;
}
h1,h2,h3,h4 {
font-family: 'Raleway', sans-serif;
}
h3 {
background-color: #D4DAEC;
text-indent: 100px;
}
h4 {
text-indent: 100px;
}
iframe {height: 300px; width: 900px}
</style>
```{r message = F, warning = F, error = F, echo = F, tidy = F, cache = F}
require(knitr)
opts_chunk$set(
message = F,
warning = F,
error = F,
tidy = F,
cache = F,
fig.width = 11,
fig.height = 5,
fig.path = ""
)
```
### Original Paper
<br>
<address>
<strong style="lineheight:40px;">Pseudo-Mathematics and Financial Charlatanism:</strong><p style="lineheight:40px;">The Effects of Backtest Overfitting on Out-of-Sample Performance</p>
<p class="muted" style="line-height:26px;">Bailey, David H. and Borwein, Jonathan M. and Lopez de Prado, Marcos and Zhu, Qiji Jim<br>
October 7, 2013<br>
Available at SSRN: <a href="http://ssrn.com/abstract=2308659">http://ssrn.com/abstract=2308659</a>
</p>
</address>
---
### Constants - R Equivalents
```{r}
# these are the constants referenced
# Euler–Mascheroni's constant
-digamma(1)
# euler constant
exp(1)
```
---
### Expected Maximum Sharpe $E[max_N]$
$$
\begin{aligned}
(1-\gamma)Z^{-1}\left[1-\frac{1}{N}\right]+\gamma Z^{-1}\left[1-\frac{1}{N}e^{-1}\right] \end{aligned}
$$
<h4>R Translation</h4>
```{r}
### Eq. 4
emax <- function(N) {
( ( 1 + digamma(1) ) * qnorm( 1 - 1/N ) ) +
(-digamma(1) * qnorm( 1 - (1/N) * exp(-1)))
}
emax( N = 10 ) # should be about = 1.57 to match paper
```
---
### Plot $E[max_N]$
```{r}
#implement upper bound
upbound <- function(N) {sqrt(2*log(N))}
#make a ugly plot for reasonableness check
curve(upbound, from = 1, to = 1000, col = "red", lty = 2)
curve(emax, from = 1, to = 1000, add=TRUE)
grid()
```
---
### rChart $E[max_N]$
```{r results = "asis"}
require(rCharts)
df <- data.frame(
list(x=c(1,2:1000), y=c(0,emax(2:1000))))
d1 <- dPlot( y ~ x, groups = "x", data = df, type = "line", height = 270, width = 800)
d1$xAxis(type = "addMeasureAxis",orderBy = "x",outputFormat = ",0.0f")
d1$yAxis( outputFormat = ".2f")
d1
```
---
### Check My Math with *Eq. 6*
```{r}
### Try next example for Eq. 6
# if y = 5
# so solve for annualized Sharpe of 1
# says no more than 45 N should be tried
# first just do this to make sure I understand
N = 45
y = 5
emax( N ) * y^-0.5 #seems like on the right path
```
---
### Minimum Backtest Length $MinBTL$
$$
\begin{aligned}
\left(\frac{(1-\gamma)Z^{-1}\left[1-\frac{1}{N}\right]+\gamma Z^{-1}\left[1-\frac{1}{N}e^{-1}\right]}{\overline{E[max_N]}}\right)^2 \end{aligned}
$$
<h4> R Translation </h4>
```{r}
#use emax from earlier for numerator
minBTL <- function( N, eMaxSharpe = 1 ) {
(emax(N) / eMaxSharpe) ^ 2
}
#then this should equal 5 if correct
minBTL( N = 45, eMaxSharpe = 1 )
```
---
### Plot $MinBTL$
```{r}
#make ugly plot for a reasonableness check
curve( minBTL, from = 1, to = 1000)
```
---
### rChart $MinBTL$
```{r results = 'asis'}
df <- data.frame(
list(x=c(1,2:1000), minBTL=c(0,minBTL(2:1000))))
n1 <- nPlot( minBTL ~ x, data = df, type = "lineChart", height = 270, width = 800)
n1$yAxis( tickFormat = "#!d3.format(',.2f')!#")
n1$chart( useInteractiveGuideline = TRUE )
n1
```
---
### Thanks
- Ramnath Vaidyanathan
- Bailey, David H. and Borwein, Jonathan M. and Lopez de Prado, Marcos and Zhu, Qiji Jim
(function(){function t(e,t){return(new Date(t,e+1,0)).getDate()}function n(e,t,n){return function(r,i,s){var o=e(r),u=[];o<r&&t(o);if(s>1)while(o<i){var a=new Date(+o);n(a)%s===0&&u.push(a),t(o)}else while(o<i)u.push(new Date(+o)),t(o);return u}}var e=window.nv||{};e.version="1.1.10b",e.dev=!0,window.nv=e,e.tooltip={},e.utils={},e.models={},e.charts={},e.graphs=[],e.logs={},e.dispatch=d3.dispatch("render_start","render_end"),e.dev&&(e.dispatch.on("render_start",function(t){e.logs.startTime=+(new Date)}),e.dispatch.on("render_end",function(t){e.logs.endTime=+(new Date),e.logs.totalTime=e.logs.endTime-e.logs.startTime,e.log("total",e.logs.totalTime)})),e.log=function(){if(e.dev&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(e.dev&&typeof console.log=="function"&&Function.prototype.bind){var t=Function.prototype.bind.call(console.log,console);t.apply(console,arguments)}return arguments[arguments.length-1]},e.render=function(n){n=n||1,e.render.active=!0,e.dispatch.render_start(),setTimeout(function(){var t,r;for(var i=0;i<n&&(r=e.render.queue[i]);i++)t=r.generate(),typeof r.callback==typeof Function&&r.callback(t),e.graphs.push(t);e.render.queue.splice(0,i),e.render.queue.length?setTimeout(arguments.callee,0):(e.render.active=!1,e.dispatch.render_end())},0)},e.render.active=!1,e.render.queue=[],e.addGraph=function(t){typeof arguments[0]==typeof Function&&(t={generate:arguments[0],callback:arguments[1]}),e.render.queue.push(t),e.render.active||e.render()},e.identity=function(e){return e},e.strip=function(e){return e.replace(/(\s|&)/g,"")},d3.time.monthEnd=function(e){return new Date(e.getFullYear(),e.getMonth(),0)},d3.time.monthEnds=n(d3.time.monthEnd,function(e){e.setUTCDate(e.getUTCDate()+1),e.setDate(t(e.getMonth()+1,e.getFullYear()))},function(e){return e.getMonth()}),e.interactiveGuideline=function(){"use strict";function c(o){o.each(function(o){function g(){var e=d3.mouse(this),n=e[0],r=e[1],o=!0,a=!1;l&&(n=d3.event.offsetX,r=d3.event.offsetY,d3.event.target.tagName!=="svg"&&(o=!1),d3.event.target.className.baseVal.match("nv-legend")&&(a=!0)),o&&(n-=i.left,r-=i.top);if(n<0||r<0||n>p||r>d||d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===undefined||a){if(l&&d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===undefined&&d3.event.relatedTarget.className.match(t.nvPointerEventsClass))return;u.elementMouseout({mouseX:n,mouseY:r}),c.renderGuideLine(null);return}var f=s.invert(n);u.elementMousemove({mouseX:n,mouseY:r,pointXValue:f})}var h=d3.select(this),p=n||960,d=r||400,v=h.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([o]),m=v.enter().append("g").attr("class"," nv-wrap nv-interactiveLineLayer");m.append("g").attr("class","nv-interactiveGuideLine");if(!f)return;f.on("mousemove",g,!0).on("mouseout",g,!0),c.renderGuideLine=function(t){if(!a)return;var n=v.select(".nv-interactiveGuideLine").selectAll("line").data(t!=null?[e.utils.NaNtoZero(t)]:[],String);n.enter().append("line").attr("class","nv-guideline").attr("x1",function(e){return e}).attr("x2",function(e){return e}).attr("y1",d).attr("y2",0),n.exit().remove()}})}var t=e.models.tooltip(),n=null,r=null,i={left:0,top:0},s=d3.scale.linear(),o=d3.scale.linear(),u=d3.dispatch("elementMousemove","elementMouseout"),a=!0,f=null,l=navigator.userAgent.indexOf("MSIE")!==-1;return c.dispatch=u,c.tooltip=t,c.margin=function(e){return arguments.length?(i.top=typeof e.top!="undefined"?e.top:i.top,i.left=typeof e.left!="undefined"?e.left:i.left,c):i},c.width=function(e){return arguments.length?(n=e,c):n},c.height=function(e){return arguments.length?(r=e,c):r},c.xScale=function(e){return arguments.length?(s=e,c):s},c.showGuideLine=function(e){return arguments.length?(a=e,c):a},c.svgContainer=function(e){return arguments.length?(f=e,c):f},c},e.interactiveBisect=function(e,t,n){"use strict";if(!e instanceof Array)return null;typeof n!="function"&&(n=function(e,t){return e.x});var r=d3.bisector(n).left,i=d3.max([0,r(e,t)-1]),s=n(e[i],i);typeof s=="undefined"&&(s=i);if(s===t)return i;var o=d3.min([i+1,e.length-1]),u=n(e[o],o);return typeof u=="undefined"&&(u=o),Math.abs(u-t)>=Math.abs(s-t)?i:o},function(){"use strict";window.nv.tooltip={},window.nv.models.tooltip=function(){function g(){if(a){var e=d3.select(a);e.node().tagName!=="svg"&&(e=e.select("svg"));var t=e.node()?e.attr("viewBox"):null;if(t){t=t.split(" ");var n=parseInt(e.style("width"))/t[2];f.left=f.left*n,f.top=f.top*n}}}function y(e){var t;a?t=d3.select(a):t=d3.select("body");var n=t.select(".nvtooltip");return n.node()===null&&(n=t.append("div").attr("class","nvtooltip "+(u?u:"xy-tooltip")).attr("id",c)),n.node().innerHTML=e,n.style("top",0).style("left",0).style("opacity",0),n.selectAll("div, table, td, tr").classed(h,!0),n.classed(h,!0),n.node()}function b(){if(!l)return;if(!m(n))return;g();var t=f.left,u=o!=null?o:f.top,c=y(v(n));if(a){var h=a.getElementsByTagName("svg")[0],p=h?h.getBoundingClientRect():a.getBoundingClientRect(),d={left:0,top:0};if(h){var w=h.getBoundingClientRect(),E=a.getBoundingClientRect();d.top=Math.abs(w.top-E.top),d.left=Math.abs(w.left-E.left)}t+=a.offsetLeft+d.left-2*a.scrollLeft,u+=a.offsetTop+d.top-2*a.scrollTop}return s&&s>0&&(u=Math.floor(u/s)*s),e.tooltip.calcTooltipPosition([t,u],r,i,c),b}var t=null,n=null,r="w",i=50,s=25,o=null,u=null,a=null,f={left:null,top:null},l=!0,c="nvtooltip-"+Math.floor(Math.random()*1e5),h="nv-pointer-events-none",p=function(e,t){return e},d=function(e){return e},v=function(e){if(t!=null)return t;if(e==null)return"";var n="<table><thead><tr><td colspan='3'><strong class='x-value'>"+d(e.value)+"</strong></td></tr></thead><tbody>";return e.series instanceof Array&&e.series.forEach(function(e,t){n+="<tr>",n+="<td class='legend-color-guide'><div style='background-color: "+e.color+";'></div></td>",n+="<td class='key'>"+e.key+":</td>",n+="<td class='value'>"+p(e.value,t)+"</td></tr>"}),n+="</tbody></table>",n},m=function(e){return e&&e.series&&e.series.length>0?!0:!1};return b.nvPointerEventsClass=h,b.content=function(e){return arguments.length?(t=e,b):t},b.contentGenerator=function(e){return arguments.length?(typeof e=="function"&&(v=e),b):v},b.data=function(e){return arguments.length?(n=e,b):n},b.gravity=function(e){return arguments.length?(r=e,b):r},b.distance=function(e){return arguments.length?(i=e,b):i},b.snapDistance=function(e){return arguments.length?(s=e,b):s},b.classes=function(e){return arguments.length?(u=e,b):u},b.chartContainer=function(e){return arguments.length?(a=e,b):a},b.position=function(e){return arguments.length?(f.left=typeof e.left!="undefined"?e.left:f.left,f.top=typeof e.top!="undefined"?e.top:f.top,b):f},b.fixedTop=function(e){return arguments.length?(o=e,b):o},b.enabled=function(e){return arguments.length?(l=e,b):l},b.valueFormatter=function(e){return arguments.length?(typeof e=="function"&&(p=e),b):p},b.headerFormatter=function(e){return arguments.length?(typeof e=="function"&&(d=e),b):d},b.id=function(){return c},b},e.tooltip.show=function(t,n,r,i,s,o){var u=document.createElement("div");u.className="nvtooltip "+(o?o:"xy-tooltip");var a=s;if(!s||s.tagName.match(/g|svg/i))a=document.getElementsByTagName("body")[0];u.style.left=0,u.style.top=0,u.style.opacity=0,u.innerHTML=n,a.appendChild(u),s&&(t[0]=t[0]-s.scrollLeft,t[1]=t[1]-s.scrollTop),e.tooltip.calcTooltipPosition(t,r,i,u)},e.tooltip.findFirstNonSVGParent=function(e){while(e.tagName.match(/^g|svg$/i)!==null)e=e.parentNode;return e},e.tooltip.findTotalOffsetTop=function(e,t){var n=t;do isNaN(e.offsetTop)||(n+=e.offsetTop);while(e=e.offsetParent);return n},e.tooltip.findTotalOffsetLeft=function(e,t){var n=t;do isNaN(e.offsetLeft)||(n+=e.offsetLeft);while(e=e.offsetParent);return n},e.tooltip.calcTooltipPosition=function(t,n,r,i){var s=parseInt(i.offsetHeight),o=parseInt(i.offsetWidth),u=e.utils.windowSize().width,a=e.utils.windowSize().height,f=window.pageYOffset,l=window.pageXOffset,c,h;a=window.innerWidth>=document.body.scrollWidth?a:a-16,u=window.innerHeight>=document.body.scrollHeight?u:u-16,n=n||"s",r=r||20;var p=function(t){return e.tooltip.findTotalOffsetTop(t,h)},d=function(t){return e.tooltip.findTotalOffsetLeft(t,c)};switch(n){case"e":c=t[0]-o-r,h=t[1]-s/2;var v=d(i),m=p(i);v<l&&(c=t[0]+r>l?t[0]+r:l-v+c),m<f&&(h=f-m+h),m+s>f+a&&(h=f+a-m+h-s);break;case"w":c=t[0]+r,h=t[1]-s/2;var v=d(i),m=p(i);v+o>u&&(c=t[0]-o-r),m<f&&(h=f+5),m+s>f+a&&(h=f+a-m+h-s);break;case"n":c=t[0]-o/2-5,h=t[1]+r;var v=d(i),m=p(i);v<l&&(c=l+5),v+o>u&&(c=c-o/2+5),m+s>f+a&&(h=f+a-m+h-s);break;case"s":c=t[0]-o/2,h=t[1]-s-r;var v=d(i),m=p(i);v<l&&(c=l+5),v+o>u&&(c=c-o/2+5),f>m&&(h=f);break;case"none":c=t[0],h=t[1]-r;var v=d(i),m=p(i)}return i.style.left=c+"px",i.style.top=h+"px",i.style.opacity=1,i.style.position="absolute",i},e.tooltip.cleanup=function(){var e=document.getElementsByClassName("nvtooltip"),t=[];while(e.length)t.push(e[0]),e[0].style.transitionDelay="0 !important",e[0].style.opacity=0,e[0].className="nvtooltip-pending-removal";setTimeout(function(){while(t.length){var e=t.pop();e.parentNode.removeChild(e)}},500)}}(),e.utils.windowSize=function(){var e={width:640,height:480};return document.body&&document.body.offsetWidth&&(e.width=document.body.offsetWidth,e.height=document.body.offsetHeight),document.compatMode=="CSS1Compat"&&document.documentElement&&document.documentElement.offsetWidth&&(e.width=document.documentElement.offsetWidth,e.height=document.documentElement.offsetHeight),window.innerWidth&&window.innerHeight&&(e.width=window.innerWidth,e.height=window.innerHeight),e},e.utils.windowResize=function(e){if(e===undefined)return;var t=window.onresize;window.onresize=function(n){typeof t=="function"&&t(n),e(n)}},e.utils.getColor=function(t){return arguments.length?Object.prototype.toString.call(t)==="[object Array]"?function(e,n){return e.color||t[n%t.length]}:t:e.utils.defaultColor()},e.utils.defaultColor=function(){var e=d3.scale.category20().range();return function(t,n){return t.color||e[n%e.length]}},e.utils.customTheme=function(e,t,n){t=t||function(e){return e.key},n=n||d3.scale.category20().range();var r=n.length;return function(i,s){var o=t(i);return r||(r=n.length),typeof e[o]!="undefined"?typeof e[o]=="function"?e[o]():e[o]:n[--r]}},e.utils.pjax=function(t,n){function r(r){d3.html(r,function(r){var i=d3.select(n).node();i.parentNode.replaceChild(d3.select(r).select(n).node(),i),e.utils.pjax(t,n)})}d3.selectAll(t).on("click",function(){history.pushState(this.href,this.textContent,this.href),r(this.href),d3.event.preventDefault()}),d3.select(window).on("popstate",function(){d3.event.state&&r(d3.event.state)})},e.utils.calcApproxTextWidth=function(e){if(e instanceof d3.selection){var t=parseInt(e.style("font-size").replace("px","")),n=e.text().length;return n*t*.5}return 0},e.utils.NaNtoZero=function(e){return typeof e!="number"||isNaN(e)||e===null||e===Infinity?0:e},e.utils.optionsFunc=function(e){return e&&d3.map(e).forEach(function(e,t){typeof this[e]=="function"&&this[e](t)}.bind(this)),this},e.models.axis=function(){"use strict";function v(e){return e.each(function(e){var i=d3.select(this),v=i.selectAll("g.nv-wrap.nv-axis").data([e]),m=v.enter().append("g").attr("class","nvd3 nv-wrap nv-axis"),g=m.append("g"),y=v.select("g");p!==null?t.ticks(p):(t.orient()=="top"||t.orient()=="bottom")&&t.ticks(Math.abs(s.range()[1]-s.range()[0])/100),y.transition().call(t),d=d||t.scale();var b=t.tickFormat();b==null&&(b=d.tickFormat());var w=y.selectAll("text.nv-axislabel").data([o||null]);w.exit().remove();switch(t.orient()){case"top":w.enter().append("text").attr("class","nv-axislabel");var E=s.range().length==2?s.range()[1]:s.range()[s.range().length-1]+(s.range()[1]-s.range()[0]);w.attr("text-anchor","middle").attr("y",0).attr("x",E/2);if(u){var S=v.selectAll("g.nv-axisMaxMin").data(s.domain());S.enter().append("g").attr("class","nv-axisMaxMin").append("text"),S.exit().remove(),S.attr("transform",function(e,t){return"translate("+s(e)+",0)"}).select("text").attr("dy","0em").attr("y",-t.tickPadding()).attr("text-anchor","middle").text(function(e,t){var n=b(e);return(""+n).match("NaN")?"":n}),S.transition().attr("transform",function(e,t){return"translate("+s.range()[t]+",0)"})}break;case"bottom":var x=36,T=30,N=y.selectAll("g").select("text");if(f%360){N.each(function(e,t){var n=this.getBBox().width;n>T&&(T=n)});var C=Math.abs(Math.sin(f*Math.PI/180)),x=(C?C*T:T)+30;N.attr("transform",function(e,t,n){return"rotate("+f+" 0,0)"}).style("text-anchor",f%360>0?"start":"end")}w.enter().append("text").attr("class","nv-axislabel");var E=s.range().length==2?s.range()[1]:s.range()[s.range().length-1]+(s.range()[1]-s.range()[0]);w.attr("text-anchor","middle").attr("y",x).attr("x",E/2);if(u){var S=v.selectAll("g.nv-axisMaxMin").data([s.domain()[0],s.domain()[s.domain().length-1]]);S.enter().append("g").attr("class","nv-axisMaxMin").append("text"),S.exit().remove(),S.attr("transform",function(e,t){return"translate("+(s(e)+(h?s.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",t.tickPadding()).attr("transform",function(e,t,n){return"rotate("+f+" 0,0)"}).style("text-anchor",f?f%360>0?"start":"end":"middle").text(function(e,t){var n=b(e);return(""+n).match("NaN")?"":n}),S.transition().attr("transform",function(e,t){return"translate("+(s(e)+(h?s.rangeBand()/2:0))+",0)"})}c&&N.attr("transform",function(e,t){return"translate(0,"+(t%2==0?"0":"12")+")"});break;case"right":w.enter().append("text").attr("class","nv-axislabel"),w.style("text-anchor",l?"middle":"begin").attr("transform",l?"rotate(90)":"").attr("y",l?-Math.max(n.right,r)+12:-10).attr("x",l?s.range()[0]/2:t.tickPadding());if(u){var S=v.selectAll("g.nv-axisMaxMin").data(s.domain());S.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),S.exit().remove(),S.attr("transform",function(e,t){return"translate(0,"+s(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",t.tickPadding()).style("text-anchor","start").text(function(e,t){var n=b(e);return(""+n).match("NaN")?"":n}),S.transition().attr("transform",function(e,t){return"translate(0,"+s.range()[t]+")"}).select("text").style("opacity",1)}break;case"left":w.enter().append("text").attr("class","nv-axislabel"),w.style("text-anchor",l?"middle":"end").attr("transform",l?"rotate(-90)":"").attr("y",l?-Math.max(n.left,r)+12:-10).attr("x",l?-s.range()[0]/2:-t.tickPadding());if(u){var S=v.selectAll("g.nv-axisMaxMin").data(s.domain());S.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),S.exit().remove(),S.attr("transform",function(e,t){return"translate(0,"+d(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-t.tickPadding()).attr("text-anchor","end").text(function(e,t){var n=b(e);return(""+n).match("NaN")?"":n}),S.transition().attr("transform",function(e,t){return"translate(0,"+s.range()[t]+")"}).select("text").style("opacity",1)}}w.text(function(e){return e}),u&&(t.orient()==="left"||t.orient()==="right")&&(y.selectAll("g").each(function(e,t){d3.select(this).select("text").attr("opacity",1);if(s(e)<s.range()[1]+10||s(e)>s.range()[0]-10)(e>1e-10||e<-1e-10)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0)}),s.domain()[0]==s.domain()[1]&&s.domain()[0]==0&&v.selectAll("g.nv-axisMaxMin").style("opacity",function(e,t){return t?0:1}));if(u&&(t.orient()==="top"||t.orient()==="bottom")){var k=[];v.selectAll("g.nv-axisMaxMin").each(function(e,t){try{t?k.push(s(e)-this.getBBox().width-4):k.push(s(e)+this.getBBox().width+4)}catch(n){t?k.push(s(e)-4):k.push(s(e)+4)}}),y.selectAll("g").each(function(e,t){if(s(e)<k[0]||s(e)>k[1])e>1e-10||e<-1e-10?d3.select(this).remove():d3.select(this).select("text").remove()})}a&&y.selectAll(".tick").filter(function(e){return!parseFloat(Math.round(e.__data__*1e5)/1e6)&&e.__data__!==undefined}).classed("zero",!0),d=s.copy()}),v}var t=d3.svg.axis(),n={top:0,right:0,bottom:0,left:0},r=75,i=60,s=d3.scale.linear(),o=null,u=!0,a=!0,f=0,l=!0,c=!1,h=!1,p=null;t.scale(s).orient("bottom").tickFormat(function(e){return e});var d;return v.axis=t,d3.rebind(v,t,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"),d3.rebind(v,s,"domain","range","rangeBand","rangeBands"),v.options=e.utils.optionsFunc.bind(v),v.margin=function(e){return arguments.length?(n.top=typeof e.top!="undefined"?e.top:n.top,n.right=typeof e.right!="undefined"?e.right:n.right,n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom,n.left=typeof e.left!="undefined"?e.left:n.left,v):n},v.width=function(e){return arguments.length?(r=e,v):r},v.ticks=function(e){return arguments.length?(p=e,v):p},v.height=function(e){return arguments.length?(i=e,v):i},v.axisLabel=function(e){return arguments.length?(o=e,v):o},v.showMaxMin=function(e){return arguments.length?(u=e,v):u},v.highlightZero=function(e){return arguments.length?(a=e,v):a},v.scale=function(e){return arguments.length?(s=e,t.scale(s),h=typeof s.rangeBands=="function",d3.rebind(v,s,"domain","range","rangeBand","rangeBands"),v):s},v.rotateYLabel=function(e){return arguments.length?(l=e,v):l},v.rotateLabels=function(e){return arguments.length?(f=e,v):f},v.staggerLabels=function(e){return arguments.length?(c=e,v):c},v},e.models.bullet=function(){"use strict";function m(e){return e.each(function(e,n){var p=c-t.left-t.right,m=h-t.top-t.bottom,g=d3.select(this),y=i.call(this,e,n).slice().sort(d3.descending),b=s.call(this,e,n).slice().sort(d3.descending),w=o.call(this,e,n).slice().sort(d3.descending),E=u.call(this,e,n).slice(),S=a.call(this,e,n).slice(),x=f.call(this,e,n).slice(),T=d3.scale.linear().domain(d3.extent(d3.merge([l,y]))).range(r?[p,0]:[0,p]),N=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(T.range());this.__chart__=T;var C=d3.min(y),k=d3.max(y),L=y[1],A=g.selectAll("g.nv-wrap.nv-bullet").data([e]),O=A.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet"),M=O.append("g"),_=A.select("g");M.append("rect").attr("class","nv-range nv-rangeMax"),M.append("rect").attr("class","nv-range nv-rangeAvg"),M.append("rect").attr("class","nv-range nv-rangeMin"),M.append("rect").attr("class","nv-measure"),M.append("path").attr("class","nv-markerTriangle"),A.attr("transform","translate("+t.left+","+t.top+")");var D=function(e){return Math.abs(N(e)-N(0))},P=function(e){return Math.abs(T(e)-T(0))},H=function(e){return e<0?N(e):N(0)},B=function(e){return e<0?T(e):T(0)};_.select("rect.nv-rangeMax").attr("height",m).attr("width",P(k>0?k:C)).attr("x",B(k>0?k:C)).datum(k>0?k:C),_.select("rect.nv-rangeAvg").attr("height",m).attr("width",P(L)).attr("x",B(L)).datum(L),_.select("rect.nv-rangeMin").attr("height",m).attr("width",P(k)).attr("x",B(k)).attr("width",P(k>0?C:k)).attr("x",B(k>0?C:k)).datum(k>0?C:k),_.select("rect.nv-measure").style("fill",d).attr("height",m/3).attr("y",m/3).attr("width",w<0?T(0)-T(w[0]):T(w[0])-T(0)).attr("x",B(w)).on("mouseover",function(){v.elementMouseover({value:w[0],label:x[0]||"Current",pos:[T(w[0]),m/2]})}).on("mouseout",function(){v.elementMouseout({value:w[0],label:x[0]||"Current"})});var j=m/6;b[0]?_.selectAll("path.nv-markerTriangle").attr("transform",function(e){return"translate("+T(b[0])+","+m/2+")"}).attr("d","M0,"+j+"L"+j+","+ -j+" "+ -j+","+ -j+"Z").on("mouseover",function(){v.elementMouseover({value:b[0],label:S[0]||"Previous",pos:[T(b[0]),m/2]})}).on("mouseout",function(){v.elementMouseout({value:b[0],label:S[0]||"Previous"})}):_.selectAll("path.nv-markerTriangle").remove(),A.selectAll(".nv-range").on("mouseover",function(e,t){var n=E[t]||(t?t==1?"Mean":"Minimum":"Maximum");v.elementMouseover({value:e,label:n,pos:[T(e),m/2]})}).on("mouseout",function(e,t){var n=E[t]||(t?t==1?"Mean":"Minimum":"Maximum");v.elementMouseout({value:e,label:n})})}),m}var t={top:0,right:0,bottom:0,left:0},n="left",r=!1,i=function(e){return e.ranges},s=function(e){return e.markers},o=function(e){return e.measures},u=function(e){return e.rangeLabels?e.rangeLabels:[]},a=function(e){return e.markerLabels?e.markerLabels:[]},f=function(e){return e.measureLabels?e.measureLabels:[]},l=[0],c=380,h=30,p=null,d=e.utils.getColor(["#1f77b4"]),v=d3.dispatch("elementMouseover","elementMouseout");return m.dispatch=v,m.options=e.utils.optionsFunc.bind(m),m.orient=function(e){return arguments.length?(n=e,r=n=="right"||n=="bottom",m):n},m.ranges=function(e){return arguments.length?(i=e,m):i},m.markers=function(e){return arguments.length?(s=e,m):s},m.measures=function(e){return arguments.length?(o=e,m):o},m.forceX=function(e){return arguments.length?(l=e,m):l},m.width=function(e){return arguments.length?(c=e,m):c},m.height=function(e){return arguments.length?(h=e,m):h},m.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,m):t},m.tickFormat=function(e){return arguments.length?(p=e,m):p},m.color=function(t){return arguments.length?(d=e.utils.getColor(t),m):d},m},e.models.bulletChart=function(){"use strict";function m(e){return e.each(function(n,h){var g=d3.select(this),y=(a||parseInt(g.style("width"))||960)-i.left-i.right,b=f-i.top-i.bottom,w=this;m.update=function(){m(e)},m.container=this;if(!n||!s.call(this,n,h)){var E=g.selectAll(".nv-noData").data([p]);return E.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),E.attr("x",i.left+y/2).attr("y",18+i.top+b/2).text(function(e){return e}),m}g.selectAll(".nv-noData").remove();var S=s.call(this,n,h).slice().sort(d3.descending),x=o.call(this,n,h).slice().sort(d3.descending),T=u.call(this,n,h).slice().sort(d3.descending),N=g.selectAll("g.nv-wrap.nv-bulletChart").data([n]),C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart"),k=C.append("g"),L=N.select("g");k.append("g").attr("class","nv-bulletWrap"),k.append("g").attr("class","nv-titles"),N.attr("transform","translate("+i.left+","+i.top+")");var A=d3.scale.linear().domain([0,Math.max(S[0],x[0],T[0])]).range(r?[y,0]:[0,y]),O=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(A.range());this.__chart__=A;var M=function(e){return Math.abs(O(e)-O(0))},_=function(e){return Math.abs(A(e)-A(0))},D=k.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(f-i.top-i.bottom)/2+")");D.append("text").attr("class","nv-title").text(function(e){return e.title}),D.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(e){return e.subtitle}),t.width(y).height(b);var P=L.select(".nv-bulletWrap");d3.transition(P).call(t);var H=l||A.tickFormat(y/100),B=L.selectAll("g.nv-tick").data(A.ticks(y/50),function(e){return this.textContent||H(e)}),j=B.enter().append("g").attr("class","nv-tick").attr("transform",function(e){return"translate("+O(e)+",0)"}).style("opacity",1e-6);j.append("line").attr("y1",b).attr("y2",b*7/6),j.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",b*7/6).text(H);var F=d3.transition(B).attr("transform",function(e){return"translate("+A(e)+",0)"}).style("opacity",1);F.select("line").attr("y1",b).attr("y2",b*7/6),F.select("text").attr("y",b*7/6),d3.transition(B.exit()).attr("transform",function(e){return"translate("+A(e)+",0)"}).style("opacity",1e-6).remove(),d.on("tooltipShow",function(e){e.key=n.title,c&&v(e,w.parentNode)})}),d3.timer.flush(),m}var t=e.models.bullet(),n="left",r=!1,i={top:5,right:40,bottom:20,left:120},s=function(e){return e.ranges},o=function(e){return e.markers},u=function(e){return e.measures},a=null,f=55,l=null,c=!0,h=function(e,t,n,r,i){return"<h3>"+t+"</h3>"+"<p>"+n+"</p>"},p="No Data Available.",d=d3.dispatch("tooltipShow","tooltipHide"),v=function(t,n){var r=t.pos[0]+(n.offsetLeft||0)+i.left,s=t.pos[1]+(n.offsetTop||0)+i.top,o=h(t.key,t.label,t.value,t,m);e.tooltip.show([r,s],o,t.value<0?"e":"w",null,n)};return t.dispatch.on("elementMouseover.tooltip",function(e){d.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){d.tooltipHide(e)}),d.on("tooltipHide",function(){c&&e.tooltip.cleanup()}),m.dispatch=d,m.bullet=t,d3.rebind(m,t,"color"),m.options=e.utils.optionsFunc.bind(m),m.orient=function(e){return arguments.length?(n=e,r=n=="right"||n=="bottom",m):n},m.ranges=function(e){return arguments.length?(s=e,m):s},m.markers=function(e){return arguments.length?(o=e,m):o},m.measures=function(e){return arguments.length?(u=e,m):u},m.width=function(e){return arguments.length?(a=e,m):a},m.height=function(e){return arguments.length?(f=e,m):f},m.margin=function(e){return arguments.length?(i.top=typeof e.top!="undefined"?e.top:i.top,i.right=typeof e.right!="undefined"?e.right:i.right,i.bottom=typeof e.bottom!="undefined"?e.bottom:i.bottom,i.left=typeof e.left!="undefined"?e.left:i.left,m):i},m.tickFormat=function(e){return arguments.length?(l=e,m):l},m.tooltips=function(e){return arguments.length?(c=e,m):c},m.tooltipContent=function(e){return arguments.length?(h=e,m):h},m.noData=function(e){return arguments.length?(p=e,m):p},m},e.models.cumulativeLineChart=function(){"use strict";function _(b){return b.each(function(b){function q(e,t){d3.select(_.container).style("cursor","ew-resize")}function R(e,t){O.x=d3.event.x,O.i=Math.round(A.invert(O.x)),rt()}function U(e,t){d3.select(_.container).style("cursor","auto"),x.index=O.i,k.stateChange(x)}function rt(){nt.data([O]);var e=_.transitionDuration();_.transitionDuration(0),_.update(),_.transitionDuration(e)}var P=d3.select(this).classed("nv-chart-"+S,!0),H=this,B=(f||parseInt(P.style("width"))||960)-u.left-u.right,j=(l||parseInt(P.style("height"))||400)-u.top-u.bottom;_.update=function(){P.transition().duration(L).call(_)},_.container=this,x.disabled=b.map(function(e){return!!e.disabled});if(!T){var F;T={};for(F in x)x[F]instanceof Array?T[F]=x[F].slice(0):T[F]=x[F]}var I=d3.behavior.drag().on("dragstart",q).on("drag",R).on("dragend",U);if(!b||!b.length||!b.filter(function(e){return e.values.length}).length){var z=P.selectAll(".nv-noData").data([N]);return z.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),z.attr("x",u.left+B/2).attr("y",u.top+j/2).text(function(e){return e}),_}P.selectAll(".nv-noData").remove(),w=t.xScale(),E=t.yScale();if(!y){var W=b.filter(function(e){return!e.disabled}).map(function(e,n){var r=d3.extent(e.values,t.y());return r[0]<-0.95&&(r[0]=-0.95),[(r[0]-r[1])/(1+r[1]),(r[1]-r[0])/(1+r[0])]}),X=[d3.min(W,function(e){return e[0]}),d3.max(W,function(e){return e[1]})];t.yDomain(X)}else t.yDomain(null);A.domain([0,b[0].values.length-1]).range([0,B]).clamp(!0);var b=D(O.i,b),V=g?"none":"all",$=P.selectAll("g.nv-wrap.nv-cumulativeLine").data([b]),J=$.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g"),K=$.select("g");J.append("g").attr("class","nv-interactive"),J.append("g").attr("class","nv-x nv-axis").style("pointer-events","none"),J.append("g").attr("class","nv-y nv-axis"),J.append("g").attr("class","nv-background"),J.append("g").attr("class","nv-linesWrap").style("pointer-events",V),J.append("g").attr("class","nv-avgLinesWrap").style("pointer-events","none"),J.append("g").attr("class","nv-legendWrap"),J.append("g").attr("class","nv-controlsWrap"),c&&(i.width(B),K.select(".nv-legendWrap").datum(b).call(i),u.top!=i.height()&&(u.top=i.height(),j=(l||parseInt(P.style("height"))||400)-u.top-u.bottom),K.select(".nv-legendWrap").attr("transform","translate(0,"+ -u.top+")"));if(m){var Q=[{key:"Re-scale y-axis",disabled:!y}];s.width(140).color(["#444","#444","#444"]),K.select(".nv-controlsWrap").datum(Q).attr("transform","translate(0,"+ -u.top+")").call(s)}$.attr("transform","translate("+u.left+","+u.top+")"),d&&K.select(".nv-y.nv-axis").attr("transform","translate("+B+",0)");var G=b.filter(function(e){return e.tempDisabled});$.select(".tempDisabled").remove(),G.length&&$.append("text").attr("class","tempDisabled").attr("x",B/2).attr("y","-.71em").style("text-anchor","end").text(G.map(function(e){return e.key}).join(", ")+" values cannot be calculated for this time period."),g&&(o.width(B).height(j).margin({left:u.left,top:u.top}).svgContainer(P).xScale(w),$.select(".nv-interactive").call(o)),J.select(".nv-background").append("rect"),K.select(".nv-background rect").attr("width",B).attr("height",j),t.y(function(e){return e.display.y}).width(B).height(j).color(b.map(function(e,t){return e.color||a(e,t)}).filter(function(e,t){return!b[t].disabled&&!b[t].tempDisabled}));var Y=K.select(".nv-linesWrap").datum(b.filter(function(e){return!e.disabled&&!e.tempDisabled}));Y.call(t),b.forEach(function(e,t){e.seriesIndex=t});var Z=b.filter(function(e){return!e.disabled&&!!C(e)}),et=K.select(".nv-avgLinesWrap").selectAll("line").data(Z,function(e){return e.key}),tt=function(e){var t=E(C(e));return t<0?0:t>j?j:t};et.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(e,n){return t.color()(e,e.seriesIndex)}).attr("x1",0).attr("x2",B).attr("y1",tt).attr("y2",tt),et.style("stroke-opacity",function(e){var t=E(C(e));return t<0||t>j?0:1}).attr("x1",0).attr("x2",B).attr("y1",tt).attr("y2",tt),et.exit().remove();var nt=Y.selectAll(".nv-indexLine").data([O]);nt.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).style("pointer-events","all").call(I),nt.attr("transform",function(e){return"translate("+A(e.i)+",0)"}).attr("height",j),h&&(n.scale(w).ticks(Math.min(b[0].values.length,B/70)).tickSize(-j,0),K.select(".nv-x.nv-axis").attr("transform","translate(0,"+E.range()[0]+")"),d3.transition(K.select(".nv-x.nv-axis")).call(n)),p&&(r.scale(E).ticks(j/36).tickSize(-B,0),d3.transition(K.select(".nv-y.nv-axis")).call(r)),K.select(".nv-background rect").on("click",function(){O.x=d3.mouse(this)[0],O.i=Math.round(A.invert(O.x)),x.index=O.i,k.stateChange(x),rt()}),t.dispatch.on("elementClick",function(e){O.i=e.pointIndex,O.x=A(O.i),x.index=O.i,k.stateChange(x),rt()}),s.dispatch.on("legendClick",function(e,t){e.disabled=!e.disabled,y=!e.disabled,x.rescaleY=y,k.stateChange(x),_.update()}),i.dispatch.on("stateChange",function(e){x.disabled=e.disabled,k.stateChange(x),_.update()}),o.dispatch.on("elementMousemove",function(i){t.clearHighlights();var s,f,l,c=[];b.filter(function(e,t){return e.seriesIndex=t,!e.disabled}).forEach(function(n,r){f=e.interactiveBisect(n.values,i.pointXValue,_.x()),t.highlightPoint(r,f,!0);var o=n.values[f];if(typeof o=="undefined")return;typeof s=="undefined"&&(s=o),typeof l=="undefined"&&(l=_.xScale()(_.x()(o,f))),c.push({key:n.key,value:_.y()(o,f),color:a(n,n.seriesIndex)})});var h=n.tickFormat()(_.x()(s,f));o.tooltip.position({left:l+u.left,top:i.mouseY+u.top}).chartContainer(H.parentNode).enabled(v).valueFormatter(function(e,t){return r.tickFormat()(e)}).data({value:h,series:c})(),o.renderGuideLine(l)}),o.dispatch.on("elementMouseout",function(e){k.tooltipHide(),t.clearHighlights()}),k.on("tooltipShow",function(e){v&&M(e,H.parentNode)}),k.on("changeState",function(e){typeof e.disabled!="undefined"&&(b.forEach(function(t,n){t.disabled=e.disabled[n]}),x.disabled=e.disabled),typeof e.index!="undefined"&&(O.i=e.index,O.x=A(O.i),x.index=e.index,nt.data([O])),typeof e.rescaleY!="undefined"&&(y=e.rescaleY),_.update()})}),_}function D(e,n){return n.map(function(n,r){if(!n.values)return n;var i=t.y()(n.values[e],e);return i<-0.95?(n.tempDisabled=!0,n):(n.tempDisabled=!1,n.values=n.values.map(function(e,n){return e.display={y:(t.y()(e,n)-i)/(1+i)},e}),n)})}var t=e.models.line(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.interactiveGuideline(),u={top:30,right:30,bottom:50,left:60},a=e.utils.defaultColor(),f=null,l=null,c=!0,h=!0,p=!0,d=!1,v=!0,m=!0,g=!1,y=!0,b=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},w,E,S=t.id(),x={index:0,rescaleY:y},T=null,N="No Data Available.",C=function(e){return e.average},k=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),L=250;n.orient("bottom").tickPadding(7),r.orient(d?"right":"left"),s.updateState(!1);var A=d3.scale.linear(),O={i:0,x:0},M=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=b(i.series.key,a,f,i,_);e.tooltip.show([o,u],l,null,null,s)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top],k.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){k.tooltipHide(e)}),k.on("tooltipHide",function(){v&&e.tooltip.cleanup()}),_.dispatch=k,_.lines=t,_.legend=i,_.xAxis=n,_.yAxis=r,_.interactiveLayer=o,d3.rebind(_,t,"defined","isArea","x","y","xScale","yScale","size","xDomain","yDomain","xRange","yRange","forceX"
,"forceY","interactive","clipEdge","clipVoronoi","useVoronoi","id"),_.options=e.utils.optionsFunc.bind(_),_.margin=function(e){return arguments.length?(u.top=typeof e.top!="undefined"?e.top:u.top,u.right=typeof e.right!="undefined"?e.right:u.right,u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom,u.left=typeof e.left!="undefined"?e.left:u.left,_):u},_.width=function(e){return arguments.length?(f=e,_):f},_.height=function(e){return arguments.length?(l=e,_):l},_.color=function(t){return arguments.length?(a=e.utils.getColor(t),i.color(a),_):a},_.rescaleY=function(e){return arguments.length?(y=e,y):y},_.showControls=function(e){return arguments.length?(m=e,_):m},_.useInteractiveGuideline=function(e){return arguments.length?(g=e,e===!0&&(_.interactive(!1),_.useVoronoi(!1)),_):g},_.showLegend=function(e){return arguments.length?(c=e,_):c},_.showXAxis=function(e){return arguments.length?(h=e,_):h},_.showYAxis=function(e){return arguments.length?(p=e,_):p},_.rightAlignYAxis=function(e){return arguments.length?(d=e,r.orient(e?"right":"left"),_):d},_.tooltips=function(e){return arguments.length?(v=e,_):v},_.tooltipContent=function(e){return arguments.length?(b=e,_):b},_.state=function(e){return arguments.length?(x=e,_):x},_.defaultState=function(e){return arguments.length?(T=e,_):T},_.noData=function(e){return arguments.length?(N=e,_):N},_.average=function(e){return arguments.length?(C=e,_):C},_.transitionDuration=function(e){return arguments.length?(L=e,_):L},_},e.models.discreteBar=function(){"use strict";function E(e){return e.each(function(e){var i=n-t.left-t.right,E=r-t.top-t.bottom,S=d3.select(this);e=e.map(function(e,t){return e.values=e.values.map(function(e){return e.series=t,e}),e});var T=p&&d?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0}})});s.domain(p||d3.merge(T).map(function(e){return e.x})).rangeBands(v||[0,i],.1),o.domain(d||d3.extent(d3.merge(T).map(function(e){return e.y}).concat(f))),c?o.range(m||[E-(o.domain()[0]<0?12:0),o.domain()[1]>0?12:0]):o.range(m||[E,0]),b=b||s,w=w||o.copy().range([o(0),o(0)]);var N=S.selectAll("g.nv-wrap.nv-discretebar").data([e]),C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar"),k=C.append("g"),L=N.select("g");k.append("g").attr("class","nv-groups"),N.attr("transform","translate("+t.left+","+t.top+")");var A=N.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});A.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),A.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),A.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}),A.transition().style("stroke-opacity",1).style("fill-opacity",.75);var O=A.selectAll("g.nv-bar").data(function(e){return e.values});O.exit().remove();var M=O.enter().append("g").attr("transform",function(e,t,n){return"translate("+(s(u(e,t))+s.rangeBand()*.05)+", "+o(0)+")"}).on("mouseover",function(t,n){d3.select(this).classed("hover",!0),g.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",!1),g.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){g.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(t,n){g.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event}),d3.event.stopPropagation()});M.append("rect").attr("height",0).attr("width",s.rangeBand()*.9/e.length),c?(M.append("text").attr("text-anchor","middle"),O.select("text").text(function(e,t){return h(a(e,t))}).transition().attr("x",s.rangeBand()*.9/2).attr("y",function(e,t){return a(e,t)<0?o(a(e,t))-o(0)+12:-4})):O.selectAll("text").remove(),O.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(e,t){return e.color||l(e,t)}).style("stroke",function(e,t){return e.color||l(e,t)}).select("rect").attr("class",y).transition().attr("width",s.rangeBand()*.9/e.length),O.transition().attr("transform",function(e,t){var n=s(u(e,t))+s.rangeBand()*.05,r=a(e,t)<0?o(0):o(0)-o(a(e,t))<1?o(0)-1:o(a(e,t));return"translate("+n+", "+r+")"}).select("rect").attr("height",function(e,t){return Math.max(Math.abs(o(a(e,t))-o(d&&d[0]||0))||1)}),b=s.copy(),w=o.copy()}),E}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.ordinal(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=e.utils.defaultColor(),c=!1,h=d3.format(",.2f"),p,d,v,m,g=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),y="discreteBar",b,w;return E.dispatch=g,E.options=e.utils.optionsFunc.bind(E),E.x=function(e){return arguments.length?(u=e,E):u},E.y=function(e){return arguments.length?(a=e,E):a},E.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,E):t},E.width=function(e){return arguments.length?(n=e,E):n},E.height=function(e){return arguments.length?(r=e,E):r},E.xScale=function(e){return arguments.length?(s=e,E):s},E.yScale=function(e){return arguments.length?(o=e,E):o},E.xDomain=function(e){return arguments.length?(p=e,E):p},E.yDomain=function(e){return arguments.length?(d=e,E):d},E.xRange=function(e){return arguments.length?(v=e,E):v},E.yRange=function(e){return arguments.length?(m=e,E):m},E.forceY=function(e){return arguments.length?(f=e,E):f},E.color=function(t){return arguments.length?(l=e.utils.getColor(t),E):l},E.id=function(e){return arguments.length?(i=e,E):i},E.showValues=function(e){return arguments.length?(c=e,E):c},E.valueFormat=function(e){return arguments.length?(h=e,E):h},E.rectClass=function(e){return arguments.length?(y=e,E):y},E},e.models.discreteBarChart=function(){"use strict";function w(e){return e.each(function(e){var u=d3.select(this),p=this,E=(s||parseInt(u.style("width"))||960)-i.left-i.right,S=(o||parseInt(u.style("height"))||400)-i.top-i.bottom;w.update=function(){g.beforeUpdate(),u.transition().duration(y).call(w)},w.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var T=u.selectAll(".nv-noData").data([m]);return T.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),T.attr("x",i.left+E/2).attr("y",i.top+S/2).text(function(e){return e}),w}u.selectAll(".nv-noData").remove(),d=t.xScale(),v=t.yScale().clamp(!0);var N=u.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([e]),C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g"),k=C.append("defs"),L=N.select("g");C.append("g").attr("class","nv-x nv-axis"),C.append("g").attr("class","nv-y nv-axis"),C.append("g").attr("class","nv-barsWrap"),L.attr("transform","translate("+i.left+","+i.top+")"),l&&L.select(".nv-y.nv-axis").attr("transform","translate("+E+",0)"),t.width(E).height(S);var A=L.select(".nv-barsWrap").datum(e.filter(function(e){return!e.disabled}));A.transition().call(t),k.append("clipPath").attr("id","nv-x-label-clip-"+t.id()).append("rect"),L.select("#nv-x-label-clip-"+t.id()+" rect").attr("width",d.rangeBand()*(c?2:1)).attr("height",16).attr("x",-d.rangeBand()/(c?1:2));if(a){n.scale(d).ticks(E/100).tickSize(-S,0),L.select(".nv-x.nv-axis").attr("transform","translate(0,"+(v.range()[0]+(t.showValues()&&v.domain()[0]<0?16:0))+")"),L.select(".nv-x.nv-axis").transition().call(n);var O=L.select(".nv-x.nv-axis").selectAll("g");c&&O.selectAll("text").attr("transform",function(e,t,n){return"translate(0,"+(n%2==0?"5":"17")+")"})}f&&(r.scale(v).ticks(S/36).tickSize(-E,0),L.select(".nv-y.nv-axis").transition().call(r)),g.on("tooltipShow",function(e){h&&b(e,p.parentNode)})}),w}var t=e.models.discreteBar(),n=e.models.axis(),r=e.models.axis(),i={top:15,right:10,bottom:50,left:60},s=null,o=null,u=e.utils.getColor(),a=!0,f=!0,l=!1,c=!1,h=!0,p=function(e,t,n,r,i){return"<h3>"+t+"</h3>"+"<p>"+n+"</p>"},d,v,m="No Data Available.",g=d3.dispatch("tooltipShow","tooltipHide","beforeUpdate"),y=250;n.orient("bottom").highlightZero(!1).showMaxMin(!1).tickFormat(function(e){return e}),r.orient(l?"right":"left").tickFormat(d3.format(",.1f"));var b=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=p(i.series.key,a,f,i,w);e.tooltip.show([o,u],l,i.value<0?"n":"s",null,s)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+i.left,e.pos[1]+i.top],g.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){g.tooltipHide(e)}),g.on("tooltipHide",function(){h&&e.tooltip.cleanup()}),w.dispatch=g,w.discretebar=t,w.xAxis=n,w.yAxis=r,d3.rebind(w,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","id","showValues","valueFormat"),w.options=e.utils.optionsFunc.bind(w),w.margin=function(e){return arguments.length?(i.top=typeof e.top!="undefined"?e.top:i.top,i.right=typeof e.right!="undefined"?e.right:i.right,i.bottom=typeof e.bottom!="undefined"?e.bottom:i.bottom,i.left=typeof e.left!="undefined"?e.left:i.left,w):i},w.width=function(e){return arguments.length?(s=e,w):s},w.height=function(e){return arguments.length?(o=e,w):o},w.color=function(n){return arguments.length?(u=e.utils.getColor(n),t.color(u),w):u},w.showXAxis=function(e){return arguments.length?(a=e,w):a},w.showYAxis=function(e){return arguments.length?(f=e,w):f},w.rightAlignYAxis=function(e){return arguments.length?(l=e,r.orient(e?"right":"left"),w):l},w.staggerLabels=function(e){return arguments.length?(c=e,w):c},w.tooltips=function(e){return arguments.length?(h=e,w):h},w.tooltipContent=function(e){return arguments.length?(p=e,w):p},w.noData=function(e){return arguments.length?(m=e,w):m},w.transitionDuration=function(e){return arguments.length?(y=e,w):y},w},e.models.distribution=function(){"use strict";function l(e){return e.each(function(e){var a=n-(i==="x"?t.left+t.right:t.top+t.bottom),l=i=="x"?"y":"x",c=d3.select(this);f=f||u;var h=c.selectAll("g.nv-distribution").data([e]),p=h.enter().append("g").attr("class","nvd3 nv-distribution"),d=p.append("g"),v=h.select("g");h.attr("transform","translate("+t.left+","+t.top+")");var m=v.selectAll("g.nv-dist").data(function(e){return e},function(e){return e.key});m.enter().append("g"),m.attr("class",function(e,t){return"nv-dist nv-series-"+t}).style("stroke",function(e,t){return o(e,t)});var g=m.selectAll("line.nv-dist"+i).data(function(e){return e.values});g.enter().append("line").attr(i+"1",function(e,t){return f(s(e,t))}).attr(i+"2",function(e,t){return f(s(e,t))}),m.exit().selectAll("line.nv-dist"+i).transition().attr(i+"1",function(e,t){return u(s(e,t))}).attr(i+"2",function(e,t){return u(s(e,t))}).style("stroke-opacity",0).remove(),g.attr("class",function(e,t){return"nv-dist"+i+" nv-dist"+i+"-"+t}).attr(l+"1",0).attr(l+"2",r),g.transition().attr(i+"1",function(e,t){return u(s(e,t))}).attr(i+"2",function(e,t){return u(s(e,t))}),f=u.copy()}),l}var t={top:0,right:0,bottom:0,left:0},n=400,r=8,i="x",s=function(e){return e[i]},o=e.utils.defaultColor(),u=d3.scale.linear(),a,f;return l.options=e.utils.optionsFunc.bind(l),l.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,l):t},l.width=function(e){return arguments.length?(n=e,l):n},l.axis=function(e){return arguments.length?(i=e,l):i},l.size=function(e){return arguments.length?(r=e,l):r},l.getData=function(e){return arguments.length?(s=d3.functor(e),l):s},l.scale=function(e){return arguments.length?(u=e,l):u},l.color=function(t){return arguments.length?(o=e.utils.getColor(t),l):o},l},e.models.historicalBar=function(){"use strict";function w(E){return E.each(function(w){var E=n-t.left-t.right,S=r-t.top-t.bottom,T=d3.select(this);s.domain(d||d3.extent(w[0].values.map(u).concat(f))),c?s.range(m||[E*.5/w[0].values.length,E*(w[0].values.length-.5)/w[0].values.length]):s.range(m||[0,E]),o.domain(v||d3.extent(w[0].values.map(a).concat(l))).range(g||[S,0]),s.domain()[0]===s.domain()[1]&&(s.domain()[0]?s.domain([s.domain()[0]-s.domain()[0]*.01,s.domain()[1]+s.domain()[1]*.01]):s.domain([-1,1])),o.domain()[0]===o.domain()[1]&&(o.domain()[0]?o.domain([o.domain()[0]+o.domain()[0]*.01,o.domain()[1]-o.domain()[1]*.01]):o.domain([-1,1]));var N=T.selectAll("g.nv-wrap.nv-historicalBar-"+i).data([w[0].values]),C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBar-"+i),k=C.append("defs"),L=C.append("g"),A=N.select("g");L.append("g").attr("class","nv-bars"),N.attr("transform","translate("+t.left+","+t.top+")"),T.on("click",function(e,t){y.chartClick({data:e,index:t,pos:d3.event,id:i})}),k.append("clipPath").attr("id","nv-chart-clip-path-"+i).append("rect"),N.select("#nv-chart-clip-path-"+i+" rect").attr("width",E).attr("height",S),A.attr("clip-path",h?"url(#nv-chart-clip-path-"+i+")":"");var O=N.select(".nv-bars").selectAll(".nv-bar").data(function(e){return e},function(e,t){return u(e,t)});O.exit().remove();var M=O.enter().append("rect").attr("x",0).attr("y",function(t,n){return e.utils.NaNtoZero(o(Math.max(0,a(t,n))))}).attr("height",function(t,n){return e.utils.NaNtoZero(Math.abs(o(a(t,n))-o(0)))}).attr("transform",function(e,t){return"translate("+(s(u(e,t))-E/w[0].values.length*.45)+",0)"}).on("mouseover",function(e,t){if(!b)return;d3.select(this).classed("hover",!0),y.elementMouseover({point:e,series:w[0],pos:[s(u(e,t)),o(a(e,t))],pointIndex:t,seriesIndex:0,e:d3.event})}).on("mouseout",function(e,t){if(!b)return;d3.select(this).classed("hover",!1),y.elementMouseout({point:e,series:w[0],pointIndex:t,seriesIndex:0,e:d3.event})}).on("click",function(e,t){if(!b)return;y.elementClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i}),d3.event.stopPropagation()}).on("dblclick",function(e,t){if(!b)return;y.elementDblClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i}),d3.event.stopPropagation()});O.attr("fill",function(e,t){return p(e,t)}).attr("class",function(e,t,n){return(a(e,t)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+n+"-"+t}).transition().attr("transform",function(e,t){return"translate("+(s(u(e,t))-E/w[0].values.length*.45)+",0)"}).attr("width",E/w[0].values.length*.9),O.transition().attr("y",function(t,n){var r=a(t,n)<0?o(0):o(0)-o(a(t,n))<1?o(0)-1:o(a(t,n));return e.utils.NaNtoZero(r)}).attr("height",function(t,n){return e.utils.NaNtoZero(Math.max(Math.abs(o(a(t,n))-o(0)),1))})}),w}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[],l=[0],c=!1,h=!0,p=e.utils.defaultColor(),d,v,m,g,y=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),b=!0;return w.highlightPoint=function(e,t){d3.select(".nv-historicalBar-"+i).select(".nv-bars .nv-bar-0-"+e).classed("hover",t)},w.clearHighlights=function(){d3.select(".nv-historicalBar-"+i).select(".nv-bars .nv-bar.hover").classed("hover",!1)},w.dispatch=y,w.options=e.utils.optionsFunc.bind(w),w.x=function(e){return arguments.length?(u=e,w):u},w.y=function(e){return arguments.length?(a=e,w):a},w.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,w):t},w.width=function(e){return arguments.length?(n=e,w):n},w.height=function(e){return arguments.length?(r=e,w):r},w.xScale=function(e){return arguments.length?(s=e,w):s},w.yScale=function(e){return arguments.length?(o=e,w):o},w.xDomain=function(e){return arguments.length?(d=e,w):d},w.yDomain=function(e){return arguments.length?(v=e,w):v},w.xRange=function(e){return arguments.length?(m=e,w):m},w.yRange=function(e){return arguments.length?(g=e,w):g},w.forceX=function(e){return arguments.length?(f=e,w):f},w.forceY=function(e){return arguments.length?(l=e,w):l},w.padData=function(e){return arguments.length?(c=e,w):c},w.clipEdge=function(e){return arguments.length?(h=e,w):h},w.color=function(t){return arguments.length?(p=e.utils.getColor(t),w):p},w.id=function(e){return arguments.length?(i=e,w):i},w.interactive=function(e){return arguments.length?(b=!1,w):b},w},e.models.historicalBarChart=function(){"use strict";function x(e){return e.each(function(d){var T=d3.select(this),N=this,C=(u||parseInt(T.style("width"))||960)-s.left-s.right,k=(a||parseInt(T.style("height"))||400)-s.top-s.bottom;x.update=function(){T.transition().duration(E).call(x)},x.container=this,g.disabled=d.map(function(e){return!!e.disabled});if(!y){var L;y={};for(L in g)g[L]instanceof Array?y[L]=g[L].slice(0):y[L]=g[L]}if(!d||!d.length||!d.filter(function(e){return e.values.length}).length){var A=T.selectAll(".nv-noData").data([b]);return A.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),A.attr("x",s.left+C/2).attr("y",s.top+k/2).text(function(e){return e}),x}T.selectAll(".nv-noData").remove(),v=t.xScale(),m=t.yScale();var O=T.selectAll("g.nv-wrap.nv-historicalBarChart").data([d]),M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBarChart").append("g"),_=O.select("g");M.append("g").attr("class","nv-x nv-axis"),M.append("g").attr("class","nv-y nv-axis"),M.append("g").attr("class","nv-barsWrap"),M.append("g").attr("class","nv-legendWrap"),f&&(i.width(C),_.select(".nv-legendWrap").datum(d).call(i),s.top!=i.height()&&(s.top=i.height(),k=(a||parseInt(T.style("height"))||400)-s.top-s.bottom),O.select(".nv-legendWrap").attr("transform","translate(0,"+ -s.top+")")),O.attr("transform","translate("+s.left+","+s.top+")"),h&&_.select(".nv-y.nv-axis").attr("transform","translate("+C+",0)"),t.width(C).height(k).color(d.map(function(e,t){return e.color||o(e,t)}).filter(function(e,t){return!d[t].disabled}));var D=_.select(".nv-barsWrap").datum(d.filter(function(e){return!e.disabled}));D.transition().call(t),l&&(n.scale(v).tickSize(-k,0),_.select(".nv-x.nv-axis").attr("transform","translate(0,"+m.range()[0]+")"),_.select(".nv-x.nv-axis").transition().call(n)),c&&(r.scale(m).ticks(k/36).tickSize(-C,0),_.select(".nv-y.nv-axis").transition().call(r)),i.dispatch.on("legendClick",function(t,n){t.disabled=!t.disabled,d.filter(function(e){return!e.disabled}).length||d.map(function(e){return e.disabled=!1,O.selectAll(".nv-series").classed("disabled",!1),e}),g.disabled=d.map(function(e){return!!e.disabled}),w.stateChange(g),e.transition().call(x)}),i.dispatch.on("legendDblclick",function(e){d.forEach(function(e){e.disabled=!0}),e.disabled=!1,g.disabled=d.map(function(e){return!!e.disabled}),w.stateChange(g),x.update()}),w.on("tooltipShow",function(e){p&&S(e,N.parentNode)}),w.on("changeState",function(t){typeof t.disabled!="undefined"&&(d.forEach(function(e,n){e.disabled=t.disabled[n]}),g.disabled=t.disabled),e.call(x)})}),x}var t=e.models.historicalBar(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s={top:30,right:90,bottom:50,left:90},o=e.utils.defaultColor(),u=null,a=null,f=!1,l=!0,c=!0,h=!1,p=!0,d=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},v,m,g={},y=null,b="No Data Available.",w=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),E=250;n.orient("bottom").tickPadding(7),r.orient(h?"right":"left");var S=function(i,s){if(s){var o=d3.select(s).select("svg"),u=o.node()?o.attr("viewBox"):null;if(u){u=u.split(" ");var a=parseInt(o.style("width"))/u[2];i.pos[0]=i.pos[0]*a,i.pos[1]=i.pos[1]*a}}var f=i.pos[0]+(s.offsetLeft||0),l=i.pos[1]+(s.offsetTop||0),c=n.tickFormat()(t.x()(i.point,i.pointIndex)),h=r.tickFormat()(t.y()(i.point,i.pointIndex)),p=d(i.series.key,c,h,i,x);e.tooltip.show([f,l],p,null,null,s)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+s.left,e.pos[1]+s.top],w.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){w.tooltipHide(e)}),w.on("tooltipHide",function(){p&&e.tooltip.cleanup()}),x.dispatch=w,x.bars=t,x.legend=i,x.xAxis=n,x.yAxis=r,d3.rebind(x,t,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","id","interpolate","highlightPoint","clearHighlights","interactive"),x.options=e.utils.optionsFunc.bind(x),x.margin=function(e){return arguments.length?(s.top=typeof e.top!="undefined"?e.top:s.top,s.right=typeof e.right!="undefined"?e.right:s.right,s.bottom=typeof e.bottom!="undefined"?e.bottom:s.bottom,s.left=typeof e.left!="undefined"?e.left:s.left,x):s},x.width=function(e){return arguments.length?(u=e,x):u},x.height=function(e){return arguments.length?(a=e,x):a},x.color=function(t){return arguments.length?(o=e.utils.getColor(t),i.color(o),x):o},x.showLegend=function(e){return arguments.length?(f=e,x):f},x.showXAxis=function(e){return arguments.length?(l=e,x):l},x.showYAxis=function(e){return arguments.length?(c=e,x):c},x.rightAlignYAxis=function(e){return arguments.length?(h=e,r.orient(e?"right":"left"),x):h},x.tooltips=function(e){return arguments.length?(p=e,x):p},x.tooltipContent=function(e){return arguments.length?(d=e,x):d},x.state=function(e){return arguments.length?(g=e,x):g},x.defaultState=function(e){return arguments.length?(y=e,x):y},x.noData=function(e){return arguments.length?(b=e,x):b},x.transitionDuration=function(e){return arguments.length?(E=e,x):E},x},e.models.indentedTree=function(){"use strict";function g(e){return e.each(function(e){function k(e,t,n){d3.event.stopPropagation();if(d3.event.shiftKey&&!n)return d3.event.shiftKey=!1,e.values&&e.values.forEach(function(e){(e.values||e._values)&&k(e,0,!0)}),!0;if(!O(e))return!0;e.values?(e._values=e.values,e.values=null):(e.values=e._values,e._values=null),g.update()}function L(e){return e._values&&e._values.length?h:e.values&&e.values.length?p:""}function A(e){return e._values&&e._values.length}function O(e){var t=e.values||e._values;return t&&t.length}var t=1,n=d3.select(this),i=d3.layout.tree().children(function(e){return e.values}).size([r,f]);g.update=function(){n.transition().duration(600).call(g)},e[0]||(e[0]={key:a});var s=i.nodes(e[0]),y=d3.select(this).selectAll("div").data([[s]]),b=y.enter().append("div").attr("class","nvd3 nv-wrap nv-indentedtree"),w=b.append("table"),E=y.select("table").attr("width","100%").attr("class",c);if(o){var S=w.append("thead"),x=S.append("tr");l.forEach(function(e){x.append("th").attr("width",e.width?e.width:"10%").style("text-align",e.type=="numeric"?"right":"left").append("span").text(e.label)})}var T=E.selectAll("tbody").data(function(e){return e});T.enter().append("tbody"),t=d3.max(s,function(e){return e.depth}),i.size([r,t*f]);var N=T.selectAll("tr").data(function(e){return e.filter(function(e){return u&&!e.children?u(e):!0})},function(e,t){return e.id||e.id||++m});N.exit().remove(),N.select("img.nv-treeicon").attr("src",L).classed("folded",A);var C=N.enter().append("tr");l.forEach(function(e,t){var n=C.append("td").style("padding-left",function(e){return(t?0:e.depth*f+12+(L(e)?0:16))+"px"},"important").style("text-align",e.type=="numeric"?"right":"left");t==0&&n.append("img").classed("nv-treeicon",!0).classed("nv-folded",A).attr("src",L).style("width","14px").style("height","14px").style("padding","0 1px").style("display",function(e){return L(e)?"inline-block":"none"}).on("click",k),n.each(function(n){!t&&v(n)?d3.select(this).append("a").attr("href",v).attr("class",d3.functor(e.classes)).append("span"):d3.select(this).append("span"),d3.select(this).select("span").attr("class",d3.functor(e.classes)).text(function(t){return e.format?e.format(t):t[e.key]||"-"})}),e.showCount&&(n.append("span").attr("class","nv-childrenCount"),N.selectAll("span.nv-childrenCount").text(function(e){return e.values&&e.values.length||e._values&&e._values.length?"("+(e.values&&e.values.filter(function(e){return u?u(e):!0}).length||e._values&&e._values.filter(function(e){return u?u(e):!0}).length||0)+")":""}))}),N.order().on("click",function(e){d.elementClick({row:this,data:e,pos:[e.x,e.y]})}).on("dblclick",function(e){d.elementDblclick({row:this,data:e,pos:[e.x,e.y]})}).on("mouseover",function(e){d.elementMouseover({row:this,data:e,pos:[e.x,e.y]})}).on("mouseout",function(e){d.elementMouseout({row:this,data:e,pos:[e.x,e.y]})})}),g}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e4),o=!0,u=!1,a="No Data Available.",f=20,l=[{key:"key",label:"Name",type:"text"}],c=null,h="images/grey-plus.png",p="images/grey-minus.png",d=d3.dispatch("elementClick","elementDblclick","elementMouseover","elementMouseout"),v=function(e){return e.url},m=0;return g.options=e.utils.optionsFunc.bind(g),g.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,g):t},g.width=function(e){return arguments.length?(n=e,g):n},g.height=function(e){return arguments.length?(r=e,g):r},g.color=function(t){return arguments.length?(i=e.utils.getColor(t),scatter.color(i),g):i},g.id=function(e){return arguments.length?(s=e,g):s},g.header=function(e){return arguments.length?(o=e,g):o},g.noData=function(e){return arguments.length?(a=e,g):a},g.filterZero=function(e){return arguments.length?(u=e,g):u},g.columns=function(e){return arguments.length?(l=e,g):l},g.tableClass=function(e){return arguments.length?(c=e,g):c},g.iconOpen=function(e){return arguments.length?(h=e,g):h},g.iconClose=function(e){return arguments.length?(p=e,g):p},g.getUrl=function(e){return arguments.length?(v=e,g):v},g},e.models.legend=function(){"use strict";function c(h){return h.each(function(c){var h=n-t.left-t.right,p=d3.select(this),d=p.selectAll("g.nv-legend").data([c]),v=d.enter().append("g").attr("class","nvd3 nv-legend").append("g"),m=d.select("g");d.attr("transform","translate("+t.left+","+t.top+")");var g=m.selectAll(".nv-series").data(function(e){return e}),y=g.enter().append("g").attr("class","nv-series").on("mouseover",function(e,t){l.legendMouseover(e,t)}).on("mouseout",function(e,t){l.legendMouseout(e,t)}).on("click",function(e,t){l.legendClick(e,t),a&&(f?(c.forEach(function(e){e.disabled=!0}),e.disabled=!1):(e.disabled=!e.disabled,c.every(function(e){return e.disabled})&&c.forEach(function(e){e.disabled=!1})),l.stateChange({disabled:c.map(function(e){return!!e.disabled})}))}).on("dblclick",function(e,t){l.legendDblclick(e,t),a&&(c.forEach(function(e){e.disabled=!0}),e.disabled=!1,l.stateChange({disabled:c.map(function(e){return!!e.disabled})}))});y.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),y.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8"),g.classed("disabled",function(e){return e.disabled}),g.exit().remove(),g.select("circle").style("fill",function(e,t){return e.color||s(e,t)}).style("stroke",function(e,t){return e.color||s(e,t)}),g.select("text").text(i);if(o){var b=[];g.each(function(t,n){var r=d3.select(this).select("text"),i;try{i=r.node().getComputedTextLength()}catch(s){i=e.utils.calcApproxTextWidth(r)}b.push(i+28)});var w=0,E=0,S=[];while(E<h&&w<b.length)S[w]=b[w],E+=b[w++];w===0&&(w=1);while(E>h&&w>1){S=[],w--;for(var x=0;x<b.length;x++)b[x]>(S[x%w]||0)&&(S[x%w]=b[x]);E=S.reduce(function(e,t,n,r){return e+t})}var T=[];for(var N=0,C=0;N<w;N++)T[N]=C,C+=S[N];g.attr("transform",function(e,t){return"translate("+T[t%w]+","+(5+Math.floor(t/w)*20)+")"}),u?m.attr("transform","translate("+(n-t.right-E)+","+t.top+")"):m.attr("transform","translate(0,"+t.top+")"),r=t.top+t.bottom+Math.ceil(b.length/w)*20}else{var k=5,L=5,A=0,O;g.attr("transform",function(e,r){var i=d3.select(this).select("text").node().getComputedTextLength()+28;return O=L,n<t.left+t.right+O+i&&(L=O=5,k+=20),L+=i,L>A&&(A=L),"translate("+O+","+k+")"}),m.attr("transform","translate("+(n-t.right-A)+","+t.top+")"),r=t.top+t.bottom+k+15}}),c}var t={top:5,right:0,bottom:5,left:0},n=400,r=20,i=function(e){return e.key},s=e.utils.defaultColor(),o=!0,u=!0,a=!0,f=!1,l=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange");return c.dispatch=l,c.options=e.utils.optionsFunc.bind(c),c.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,c):t},c.width=function(e){return arguments.length?(n=e,c):n},c.height=function(e){return arguments.length?(r=e,c):r},c.key=function(e){return arguments.length?(i=e,c):i},c.color=function(t){return arguments.length?(s=e.utils.getColor(t),c):s},c.align=function(e){return arguments.length?(o=e,c):o},c.rightAlign=function(e){return arguments.length?(u=e,c):u},c.updateState=function(e){return arguments.length?(a=e,c):a},c.radioButtonMode=function(e){return arguments.length?(f=e,c):f},c},e.models.line=function(){"use strict";function m(g){return g.each(function(m){var g=r-n.left-n.right,b=i-n.top-n.bottom,w=d3.select(this);c=t.xScale(),h=t.yScale(),d=d||c,v=v||h;var E=w.selectAll("g.nv-wrap.nv-line").data([m]),S=E.enter().append("g").attr("class","nvd3 nv-wrap nv-line"),T=S.append("defs"),N=S.append("g"),C=E.select("g");N.append("g").attr("class","nv-groups"),N.append("g").attr("class","nv-scatterWrap"),E.attr("transform","translate("+n.left+","+n.top+")"),t.width(g).height(b);var k=E.select(".nv-scatterWrap");k.transition().call(t),T.append("clipPath").attr("id","nv-edge-clip-"+t.id()).append("rect"),E.select("#nv-edge-clip-"+t.id()+" rect").attr("width",g).attr("height",b),C.attr("clip-path",l?"url(#nv-edge-clip-"+t.id()+")":""),k.attr("clip-path",l?"url(#nv-edge-clip-"+t.id()+")":"");var L=E.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});L.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),L.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),L.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return s(e,t)}).style("stroke",function(e,t){return s(e,t)}),L.transition().style("stroke-opacity",1).style("fill-opacity",.5);var A=L.selectAll("path.nv-area").data(function(e){return f(e)?[e]:[]});A.enter().append("path").attr("class","nv-area").attr("d",function(t){return d3.svg.area().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(d(o(t,n)))}).y0(function(t,n){return e.utils.NaNtoZero(v(u(t,n)))}).y1(function(e,t){return v(h.domain()[0]<=0?h.domain()[1]>=0?0:h.domain()[1]:h.domain()[0])}).apply(this,[t.values])}),L.exit().selectAll("path.nv-area").remove(),A.transition().attr("d",function(t){return d3.svg.area().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y0(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))}).y1(function(e,t){return h(h.domain()[0]<=0?h.domain()[1]>=0?0:h.domain()[1]:h.domain()[0])}).apply(this,[t.values])});var O=L.selectAll("path.nv-line").data(function(e){return[e.values]});O.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(d(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(v(u(t,n)))})),L.exit().selectAll("path.nv-line").transition().attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))})),O.transition().attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))})),d=c.copy(),v=h.copy()}),m}var t=e.models.scatter(),n={top:0,right:0,bottom:0,left:0},r=960,i=500,s=e.utils.defaultColor(),o=function(e){return e.x},u=function(e){return e.y},a=function(e,t){return!isNaN(u(e,t))&&u(e,t)!==null},f=function(e){return e.area},l=!1,c,h,p="linear"
;t.size(16).sizeDomain([16,256]);var d,v;return m.dispatch=t.dispatch,m.scatter=t,d3.rebind(m,t,"id","interactive","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","forceX","forceY","forceSize","clipVoronoi","useVoronoi","clipRadius","padData","highlightPoint","clearHighlights"),m.options=e.utils.optionsFunc.bind(m),m.margin=function(e){return arguments.length?(n.top=typeof e.top!="undefined"?e.top:n.top,n.right=typeof e.right!="undefined"?e.right:n.right,n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom,n.left=typeof e.left!="undefined"?e.left:n.left,m):n},m.width=function(e){return arguments.length?(r=e,m):r},m.height=function(e){return arguments.length?(i=e,m):i},m.x=function(e){return arguments.length?(o=e,t.x(e),m):o},m.y=function(e){return arguments.length?(u=e,t.y(e),m):u},m.clipEdge=function(e){return arguments.length?(l=e,m):l},m.color=function(n){return arguments.length?(s=e.utils.getColor(n),t.color(s),m):s},m.interpolate=function(e){return arguments.length?(p=e,m):p},m.defined=function(e){return arguments.length?(a=e,m):a},m.isArea=function(e){return arguments.length?(f=d3.functor(e),m):f},m},e.models.lineChart=function(){"use strict";function N(m){return m.each(function(m){var C=d3.select(this),k=this,L=(a||parseInt(C.style("width"))||960)-o.left-o.right,A=(f||parseInt(C.style("height"))||400)-o.top-o.bottom;N.update=function(){C.transition().duration(x).call(N)},N.container=this,b.disabled=m.map(function(e){return!!e.disabled});if(!w){var O;w={};for(O in b)b[O]instanceof Array?w[O]=b[O].slice(0):w[O]=b[O]}if(!m||!m.length||!m.filter(function(e){return e.values.length}).length){var M=C.selectAll(".nv-noData").data([E]);return M.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),M.attr("x",o.left+L/2).attr("y",o.top+A/2).text(function(e){return e}),N}C.selectAll(".nv-noData").remove(),g=t.xScale(),y=t.yScale();var _=C.selectAll("g.nv-wrap.nv-lineChart").data([m]),D=_.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),P=_.select("g");D.append("rect").style("opacity",0),D.append("g").attr("class","nv-x nv-axis"),D.append("g").attr("class","nv-y nv-axis"),D.append("g").attr("class","nv-linesWrap"),D.append("g").attr("class","nv-legendWrap"),D.append("g").attr("class","nv-interactive"),P.select("rect").attr("width",L).attr("height",A),l&&(i.width(L),P.select(".nv-legendWrap").datum(m).call(i),o.top!=i.height()&&(o.top=i.height(),A=(f||parseInt(C.style("height"))||400)-o.top-o.bottom),_.select(".nv-legendWrap").attr("transform","translate(0,"+ -o.top+")")),_.attr("transform","translate("+o.left+","+o.top+")"),p&&P.select(".nv-y.nv-axis").attr("transform","translate("+L+",0)"),d&&(s.width(L).height(A).margin({left:o.left,top:o.top}).svgContainer(C).xScale(g),_.select(".nv-interactive").call(s)),t.width(L).height(A).color(m.map(function(e,t){return e.color||u(e,t)}).filter(function(e,t){return!m[t].disabled}));var H=P.select(".nv-linesWrap").datum(m.filter(function(e){return!e.disabled}));H.transition().call(t),c&&(n.scale(g).ticks(L/100).tickSize(-A,0),P.select(".nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")"),P.select(".nv-x.nv-axis").transition().call(n)),h&&(r.scale(y).ticks(A/36).tickSize(-L,0),P.select(".nv-y.nv-axis").transition().call(r)),i.dispatch.on("stateChange",function(e){b=e,S.stateChange(b),N.update()}),s.dispatch.on("elementMousemove",function(i){t.clearHighlights();var a,f,l,c=[];m.filter(function(e,t){return e.seriesIndex=t,!e.disabled}).forEach(function(n,r){f=e.interactiveBisect(n.values,i.pointXValue,N.x()),t.highlightPoint(r,f,!0);var s=n.values[f];if(typeof s=="undefined")return;typeof a=="undefined"&&(a=s),typeof l=="undefined"&&(l=N.xScale()(N.x()(s,f))),c.push({key:n.key,value:N.y()(s,f),color:u(n,n.seriesIndex)})});var h=n.tickFormat()(N.x()(a,f));s.tooltip.position({left:l+o.left,top:i.mouseY+o.top}).chartContainer(k.parentNode).enabled(v).valueFormatter(function(e,t){return r.tickFormat()(e)}).data({value:h,series:c})(),s.renderGuideLine(l)}),s.dispatch.on("elementMouseout",function(e){S.tooltipHide(),t.clearHighlights()}),S.on("tooltipShow",function(e){v&&T(e,k.parentNode)}),S.on("changeState",function(e){typeof e.disabled!="undefined"&&(m.forEach(function(t,n){t.disabled=e.disabled[n]}),b.disabled=e.disabled),N.update()})}),N}var t=e.models.line(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.interactiveGuideline(),o={top:30,right:20,bottom:50,left:60},u=e.utils.defaultColor(),a=null,f=null,l=!0,c=!0,h=!0,p=!1,d=!1,v=!0,m=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},g,y,b={},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),x=250;n.orient("bottom").tickPadding(7),r.orient(p?"right":"left");var T=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=m(i.series.key,a,f,i,N);e.tooltip.show([o,u],l,null,null,s)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top],S.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)}),S.on("tooltipHide",function(){v&&e.tooltip.cleanup()}),N.dispatch=S,N.lines=t,N.legend=i,N.xAxis=n,N.yAxis=r,N.interactiveLayer=s,d3.rebind(N,t,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","useVoronoi","id","interpolate"),N.options=e.utils.optionsFunc.bind(N),N.margin=function(e){return arguments.length?(o.top=typeof e.top!="undefined"?e.top:o.top,o.right=typeof e.right!="undefined"?e.right:o.right,o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom,o.left=typeof e.left!="undefined"?e.left:o.left,N):o},N.width=function(e){return arguments.length?(a=e,N):a},N.height=function(e){return arguments.length?(f=e,N):f},N.color=function(t){return arguments.length?(u=e.utils.getColor(t),i.color(u),N):u},N.showLegend=function(e){return arguments.length?(l=e,N):l},N.showXAxis=function(e){return arguments.length?(c=e,N):c},N.showYAxis=function(e){return arguments.length?(h=e,N):h},N.rightAlignYAxis=function(e){return arguments.length?(p=e,r.orient(e?"right":"left"),N):p},N.useInteractiveGuideline=function(e){return arguments.length?(d=e,e===!0&&(N.interactive(!1),N.useVoronoi(!1)),N):d},N.tooltips=function(e){return arguments.length?(v=e,N):v},N.tooltipContent=function(e){return arguments.length?(m=e,N):m},N.state=function(e){return arguments.length?(b=e,N):b},N.defaultState=function(e){return arguments.length?(w=e,N):w},N.noData=function(e){return arguments.length?(E=e,N):E},N.transitionDuration=function(e){return arguments.length?(x=e,N):x},N},e.models.linePlusBarChart=function(){"use strict";function T(e){return e.each(function(e){var l=d3.select(this),c=this,v=(a||parseInt(l.style("width"))||960)-u.left-u.right,N=(f||parseInt(l.style("height"))||400)-u.top-u.bottom;T.update=function(){l.transition().call(T)},b.disabled=e.map(function(e){return!!e.disabled});if(!w){var C;w={};for(C in b)b[C]instanceof Array?w[C]=b[C].slice(0):w[C]=b[C]}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var k=l.selectAll(".nv-noData").data([E]);return k.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),k.attr("x",u.left+v/2).attr("y",u.top+N/2).text(function(e){return e}),T}l.selectAll(".nv-noData").remove();var L=e.filter(function(e){return!e.disabled&&e.bar}),A=e.filter(function(e){return!e.bar});m=A.filter(function(e){return!e.disabled}).length&&A.filter(function(e){return!e.disabled})[0].values.length?t.xScale():n.xScale(),g=n.yScale(),y=t.yScale();var O=d3.select(this).selectAll("g.nv-wrap.nv-linePlusBar").data([e]),M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),_=O.select("g");M.append("g").attr("class","nv-x nv-axis"),M.append("g").attr("class","nv-y1 nv-axis"),M.append("g").attr("class","nv-y2 nv-axis"),M.append("g").attr("class","nv-barsWrap"),M.append("g").attr("class","nv-linesWrap"),M.append("g").attr("class","nv-legendWrap"),p&&(o.width(v/2),_.select(".nv-legendWrap").datum(e.map(function(e){return e.originalKey=e.originalKey===undefined?e.key:e.originalKey,e.key=e.originalKey+(e.bar?" (left axis)":" (right axis)"),e})).call(o),u.top!=o.height()&&(u.top=o.height(),N=(f||parseInt(l.style("height"))||400)-u.top-u.bottom),_.select(".nv-legendWrap").attr("transform","translate("+v/2+","+ -u.top+")")),O.attr("transform","translate("+u.left+","+u.top+")"),t.width(v).height(N).color(e.map(function(e,t){return e.color||h(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar})),n.width(v).height(N).color(e.map(function(e,t){return e.color||h(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar}));var D=_.select(".nv-barsWrap").datum(L.length?L:[{values:[]}]),P=_.select(".nv-linesWrap").datum(A[0]&&!A[0].disabled?A:[{values:[]}]);d3.transition(D).call(n),d3.transition(P).call(t),r.scale(m).ticks(v/100).tickSize(-N,0),_.select(".nv-x.nv-axis").attr("transform","translate(0,"+g.range()[0]+")"),d3.transition(_.select(".nv-x.nv-axis")).call(r),i.scale(g).ticks(N/36).tickSize(-v,0),d3.transition(_.select(".nv-y1.nv-axis")).style("opacity",L.length?1:0).call(i),s.scale(y).ticks(N/36).tickSize(L.length?0:-v,0),_.select(".nv-y2.nv-axis").style("opacity",A.length?1:0).attr("transform","translate("+v+",0)"),d3.transition(_.select(".nv-y2.nv-axis")).call(s),o.dispatch.on("stateChange",function(e){b=e,S.stateChange(b),T.update()}),S.on("tooltipShow",function(e){d&&x(e,c.parentNode)}),S.on("changeState",function(t){typeof t.disabled!="undefined"&&(e.forEach(function(e,n){e.disabled=t.disabled[n]}),b.disabled=t.disabled),T.update()})}),T}var t=e.models.line(),n=e.models.historicalBar(),r=e.models.axis(),i=e.models.axis(),s=e.models.axis(),o=e.models.legend(),u={top:30,right:60,bottom:50,left:60},a=null,f=null,l=function(e){return e.x},c=function(e){return e.y},h=e.utils.defaultColor(),p=!0,d=!0,v=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},m,g,y,b={},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");n.padData(!0),t.clipEdge(!1).padData(!0),r.orient("bottom").tickPadding(7).highlightZero(!1),i.orient("left"),s.orient("right");var x=function(n,o){var u=n.pos[0]+(o.offsetLeft||0),a=n.pos[1]+(o.offsetTop||0),f=r.tickFormat()(t.x()(n.point,n.pointIndex)),l=(n.series.bar?i:s).tickFormat()(t.y()(n.point,n.pointIndex)),c=v(n.series.key,f,l,n,T);e.tooltip.show([u,a],c,n.value<0?"n":"s",null,o)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top],S.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)}),n.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top],S.tooltipShow(e)}),n.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)}),S.on("tooltipHide",function(){d&&e.tooltip.cleanup()}),T.dispatch=S,T.legend=o,T.lines=t,T.bars=n,T.xAxis=r,T.y1Axis=i,T.y2Axis=s,d3.rebind(T,t,"defined","size","clipVoronoi","interpolate"),T.options=e.utils.optionsFunc.bind(T),T.x=function(e){return arguments.length?(l=e,t.x(e),n.x(e),T):l},T.y=function(e){return arguments.length?(c=e,t.y(e),n.y(e),T):c},T.margin=function(e){return arguments.length?(u.top=typeof e.top!="undefined"?e.top:u.top,u.right=typeof e.right!="undefined"?e.right:u.right,u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom,u.left=typeof e.left!="undefined"?e.left:u.left,T):u},T.width=function(e){return arguments.length?(a=e,T):a},T.height=function(e){return arguments.length?(f=e,T):f},T.color=function(t){return arguments.length?(h=e.utils.getColor(t),o.color(h),T):h},T.showLegend=function(e){return arguments.length?(p=e,T):p},T.tooltips=function(e){return arguments.length?(d=e,T):d},T.tooltipContent=function(e){return arguments.length?(v=e,T):v},T.state=function(e){return arguments.length?(b=e,T):b},T.defaultState=function(e){return arguments.length?(w=e,T):w},T.noData=function(e){return arguments.length?(E=e,T):E},T},e.models.lineWithFocusChart=function(){"use strict";function k(e){return e.each(function(e){function U(e){var t=+(e=="e"),n=t?1:-1,r=M/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"Z"+"M"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)}function z(){a.empty()||a.extent(w),I.data([a.empty()?g.domain():w]).each(function(e,t){var n=g(e[0])-v.range()[0],r=v.range()[1]-g(e[1]);d3.select(this).select(".left").attr("width",n<0?0:n),d3.select(this).select(".right").attr("x",g(e[1])).attr("width",r<0?0:r)})}function W(){w=a.empty()?null:a.extent();var n=a.empty()?g.domain():a.extent();if(Math.abs(n[0]-n[1])<=1)return;T.brush({extent:n,brush:a}),z();var s=H.select(".nv-focus .nv-linesWrap").datum(e.filter(function(e){return!e.disabled}).map(function(e,r){return{key:e.key,values:e.values.filter(function(e,r){return t.x()(e,r)>=n[0]&&t.x()(e,r)<=n[1]})}}));s.transition().duration(N).call(t),H.select(".nv-focus .nv-x.nv-axis").transition().duration(N).call(r),H.select(".nv-focus .nv-y.nv-axis").transition().duration(N).call(i)}var S=d3.select(this),L=this,A=(h||parseInt(S.style("width"))||960)-f.left-f.right,O=(p||parseInt(S.style("height"))||400)-f.top-f.bottom-d,M=d-l.top-l.bottom;k.update=function(){S.transition().duration(N).call(k)},k.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var _=S.selectAll(".nv-noData").data([x]);return _.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),_.attr("x",f.left+A/2).attr("y",f.top+O/2).text(function(e){return e}),k}S.selectAll(".nv-noData").remove(),v=t.xScale(),m=t.yScale(),g=n.xScale(),y=n.yScale();var D=S.selectAll("g.nv-wrap.nv-lineWithFocusChart").data([e]),P=D.enter().append("g").attr("class","nvd3 nv-wrap nv-lineWithFocusChart").append("g"),H=D.select("g");P.append("g").attr("class","nv-legendWrap");var B=P.append("g").attr("class","nv-focus");B.append("g").attr("class","nv-x nv-axis"),B.append("g").attr("class","nv-y nv-axis"),B.append("g").attr("class","nv-linesWrap");var j=P.append("g").attr("class","nv-context");j.append("g").attr("class","nv-x nv-axis"),j.append("g").attr("class","nv-y nv-axis"),j.append("g").attr("class","nv-linesWrap"),j.append("g").attr("class","nv-brushBackground"),j.append("g").attr("class","nv-x nv-brush"),b&&(u.width(A),H.select(".nv-legendWrap").datum(e).call(u),f.top!=u.height()&&(f.top=u.height(),O=(p||parseInt(S.style("height"))||400)-f.top-f.bottom-d),H.select(".nv-legendWrap").attr("transform","translate(0,"+ -f.top+")")),D.attr("transform","translate("+f.left+","+f.top+")"),t.width(A).height(O).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),n.defined(t.defined()).width(A).height(M).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),H.select(".nv-context").attr("transform","translate(0,"+(O+f.bottom+l.top)+")");var F=H.select(".nv-context .nv-linesWrap").datum(e.filter(function(e){return!e.disabled}));d3.transition(F).call(n),r.scale(v).ticks(A/100).tickSize(-O,0),i.scale(m).ticks(O/36).tickSize(-A,0),H.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+O+")"),a.x(g).on("brush",function(){var e=k.transitionDuration();k.transitionDuration(0),W(),k.transitionDuration(e)}),w&&a.extent(w);var I=H.select(".nv-brushBackground").selectAll("g").data([w||a.extent()]),q=I.enter().append("g");q.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",M),q.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",M);var R=H.select(".nv-x.nv-brush").call(a);R.selectAll("rect").attr("height",M),R.selectAll(".resize").append("path").attr("d",U),W(),s.scale(g).ticks(A/100).tickSize(-M,0),H.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")"),d3.transition(H.select(".nv-context .nv-x.nv-axis")).call(s),o.scale(y).ticks(M/36).tickSize(-A,0),d3.transition(H.select(".nv-context .nv-y.nv-axis")).call(o),H.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")"),u.dispatch.on("stateChange",function(e){k.update()}),T.on("tooltipShow",function(e){E&&C(e,L.parentNode)})}),k}var t=e.models.line(),n=e.models.line(),r=e.models.axis(),i=e.models.axis(),s=e.models.axis(),o=e.models.axis(),u=e.models.legend(),a=d3.svg.brush(),f={top:30,right:30,bottom:30,left:60},l={top:0,right:30,bottom:20,left:60},c=e.utils.defaultColor(),h=null,p=null,d=100,v,m,g,y,b=!0,w=null,E=!0,S=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},x="No Data Available.",T=d3.dispatch("tooltipShow","tooltipHide","brush"),N=250;t.clipEdge(!0),n.interactive(!1),r.orient("bottom").tickPadding(5),i.orient("left"),s.orient("bottom").tickPadding(5),o.orient("left");var C=function(n,s){var o=n.pos[0]+(s.offsetLeft||0),u=n.pos[1]+(s.offsetTop||0),a=r.tickFormat()(t.x()(n.point,n.pointIndex)),f=i.tickFormat()(t.y()(n.point,n.pointIndex)),l=S(n.series.key,a,f,n,k);e.tooltip.show([o,u],l,null,null,s)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+f.left,e.pos[1]+f.top],T.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)}),T.on("tooltipHide",function(){E&&e.tooltip.cleanup()}),k.dispatch=T,k.legend=u,k.lines=t,k.lines2=n,k.xAxis=r,k.yAxis=i,k.x2Axis=s,k.y2Axis=o,d3.rebind(k,t,"defined","isArea","size","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","id"),k.options=e.utils.optionsFunc.bind(k),k.x=function(e){return arguments.length?(t.x(e),n.x(e),k):t.x},k.y=function(e){return arguments.length?(t.y(e),n.y(e),k):t.y},k.margin=function(e){return arguments.length?(f.top=typeof e.top!="undefined"?e.top:f.top,f.right=typeof e.right!="undefined"?e.right:f.right,f.bottom=typeof e.bottom!="undefined"?e.bottom:f.bottom,f.left=typeof e.left!="undefined"?e.left:f.left,k):f},k.margin2=function(e){return arguments.length?(l=e,k):l},k.width=function(e){return arguments.length?(h=e,k):h},k.height=function(e){return arguments.length?(p=e,k):p},k.height2=function(e){return arguments.length?(d=e,k):d},k.color=function(t){return arguments.length?(c=e.utils.getColor(t),u.color(c),k):c},k.showLegend=function(e){return arguments.length?(b=e,k):b},k.tooltips=function(e){return arguments.length?(E=e,k):E},k.tooltipContent=function(e){return arguments.length?(S=e,k):S},k.interpolate=function(e){return arguments.length?(t.interpolate(e),n.interpolate(e),k):t.interpolate()},k.noData=function(e){return arguments.length?(x=e,k):x},k.xTickFormat=function(e){return arguments.length?(r.tickFormat(e),s.tickFormat(e),k):r.tickFormat()},k.yTickFormat=function(e){return arguments.length?(i.tickFormat(e),o.tickFormat(e),k):i.tickFormat()},k.brushExtent=function(e){return arguments.length?(w=e,k):w},k.transitionDuration=function(e){return arguments.length?(N=e,k):N},k},e.models.linePlusBarWithFocusChart=function(){"use strict";function B(e){return e.each(function(e){function nt(e){var t=+(e=="e"),n=t?1:-1,r=q/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"Z"+"M"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)}function rt(){h.empty()||h.extent(x),Z.data([h.empty()?k.domain():x]).each(function(e,t){var n=k(e[0])-k.range()[0],r=k.range()[1]-k(e[1]);d3.select(this).select(".left").attr("width",n<0?0:n),d3.select(this).select(".right").attr("x",k(e[1])).attr("width",r<0?0:r)})}function it(){x=h.empty()?null:h.extent(),S=h.empty()?k.domain():h.extent(),D.brush({extent:S,brush:h}),rt(),r.width(F).height(I).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar})),t.width(F).height(I).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));var n=J.select(".nv-focus .nv-barsWrap").datum(U.length?U.map(function(e,t){return{key:e.key,values:e.values.filter(function(e,t){return r.x()(e,t)>=S[0]&&r.x()(e,t)<=S[1]})}}):[{values:[]}]),i=J.select(".nv-focus .nv-linesWrap").datum(z[0].disabled?[{values:[]}]:z.map(function(e,n){return{key:e.key,values:e.values.filter(function(e,n){return t.x()(e,n)>=S[0]&&t.x()(e,n)<=S[1]})}}));U.length?C=r.xScale():C=t.xScale(),s.scale(C).ticks(F/100).tickSize(-I,0),s.domain([Math.ceil(S[0]),Math.floor(S[1])]),J.select(".nv-x.nv-axis").transition().duration(P).call(s),n.transition().duration(P).call(r),i.transition().duration(P).call(t),J.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+L.range()[0]+")"),u.scale(L).ticks(I/36).tickSize(-F,0),J.select(".nv-focus .nv-y1.nv-axis").style("opacity",U.length?1:0),a.scale(A).ticks(I/36).tickSize(U.length?0:-F,0),J.select(".nv-focus .nv-y2.nv-axis").style("opacity",z.length?1:0).attr("transform","translate("+C.range()[1]+",0)"),J.select(".nv-focus .nv-y1.nv-axis").transition().duration(P).call(u),J.select(".nv-focus .nv-y2.nv-axis").transition().duration(P).call(a)}var N=d3.select(this),j=this,F=(v||parseInt(N.style("width"))||960)-p.left-p.right,I=(m||parseInt(N.style("height"))||400)-p.top-p.bottom-g,q=g-d.top-d.bottom;B.update=function(){N.transition().duration(P).call(B)},B.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var R=N.selectAll(".nv-noData").data([_]);return R.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),R.attr("x",p.left+F/2).attr("y",p.top+I/2).text(function(e){return e}),B}N.selectAll(".nv-noData").remove();var U=e.filter(function(e){return!e.disabled&&e.bar}),z=e.filter(function(e){return!e.bar});C=r.xScale(),k=o.scale(),L=r.yScale(),A=t.yScale(),O=i.yScale(),M=n.yScale();var W=e.filter(function(e){return!e.disabled&&e.bar}).map(function(e){return e.values.map(function(e,t){return{x:y(e,t),y:b(e,t)}})}),X=e.filter(function(e){return!e.disabled&&!e.bar}).map(function(e){return e.values.map(function(e,t){return{x:y(e,t),y:b(e,t)}})});C.range([0,F]),k.domain(d3.extent(d3.merge(W.concat(X)),function(e){return e.x})).range([0,F]);var V=N.selectAll("g.nv-wrap.nv-linePlusBar").data([e]),$=V.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),J=V.select("g");$.append("g").attr("class","nv-legendWrap");var K=$.append("g").attr("class","nv-focus");K.append("g").attr("class","nv-x nv-axis"),K.append("g").attr("class","nv-y1 nv-axis"),K.append("g").attr("class","nv-y2 nv-axis"),K.append("g").attr("class","nv-barsWrap"),K.append("g").attr("class","nv-linesWrap");var Q=$.append("g").attr("class","nv-context");Q.append("g").attr("class","nv-x nv-axis"),Q.append("g").attr("class","nv-y1 nv-axis"),Q.append("g").attr("class","nv-y2 nv-axis"),Q.append("g").attr("class","nv-barsWrap"),Q.append("g").attr("class","nv-linesWrap"),Q.append("g").attr("class","nv-brushBackground"),Q.append("g").attr("class","nv-x nv-brush"),E&&(c.width(F/2),J.select(".nv-legendWrap").datum(e.map(function(e){return e.originalKey=e.originalKey===undefined?e.key:e.originalKey,e.key=e.originalKey+(e.bar?" (left axis)":" (right axis)"),e})).call(c),p.top!=c.height()&&(p.top=c.height(),I=(m||parseInt(N.style("height"))||400)-p.top-p.bottom-g),J.select(".nv-legendWrap").attr("transform","translate("+F/2+","+ -p.top+")")),V.attr("transform","translate("+p.left+","+p.top+")"),i.width(F).height(q).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar})),n.width(F).height(q).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));var G=J.select(".nv-context .nv-barsWrap").datum(U.length?U:[{values:[]}]),Y=J.select(".nv-context .nv-linesWrap").datum(z[0].disabled?[{values:[]}]:z);J.select(".nv-context").attr("transform","translate(0,"+(I+p.bottom+d.top)+")"),G.transition().call(i),Y.transition().call(n),h.x(k).on("brush",it),x&&h.extent(x);var Z=J.select(".nv-brushBackground").selectAll("g").data([x||h.extent()]),et=Z.enter().append("g");et.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",q),et.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",q);var tt=J.select(".nv-x.nv-brush").call(h);tt.selectAll("rect").attr("height",q),tt.selectAll(".resize").append("path").attr("d",nt),o.ticks(F/100).tickSize(-q,0),J.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+O.range()[0]+")"),J.select(".nv-context .nv-x.nv-axis").transition().call(o),f.scale(O).ticks(q/36).tickSize(-F,0),J.select(".nv-context .nv-y1.nv-axis").style("opacity",U.length?1:0).attr("transform","translate(0,"+k.range()[0]+")"),J.select(".nv-context .nv-y1.nv-axis").transition().call(f),l.scale(M).ticks(q/36).tickSize(U.length?0:-F,0),J.select(".nv-context .nv-y2.nv-axis").style("opacity",z.length?1:0).attr("transform","translate("+k.range()[1]+",0)"),J.select(".nv-context .nv-y2.nv-axis").transition().call(l),c.dispatch.on("stateChange",function(e){B.update()}),D.on("tooltipShow",function(e){T&&H(e,j.parentNode)}),it()}),B}var t=e.models.line(),n=e.models.line(),r=e.models.historicalBar(),i=e.models.historicalBar(),s=e.models.axis(),o=e.models.axis(),u=e.models.axis(),a=e.models.axis(),f=e.models.axis(),l=e.models.axis(),c=e.models.legend(),h=d3.svg.brush(),p={top:30,right:30,bottom:30,left:60},d={top:0,right:30,bottom:20,left:60},v=null,m=null,g=100,y=function(e){return e.x},b=function(e){return e.y},w=e.utils.defaultColor(),E=!0,S,x=null,T=!0,N=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},C,k,L,A,O,M,_="No Data Available.",D=d3.dispatch("tooltipShow","tooltipHide","brush"),P=0;t.clipEdge(!0),n.interactive(!1),s.orient("bottom").tickPadding(5),u.orient("left"),a.orient("right"),o.orient("bottom").tickPadding(5),f.orient("left"),l.orient("right");var H=function(n,r){S&&(n.pointIndex+=Math.ceil(S[0]));var i=n.pos[0]+(r.offsetLeft||0),o=n.pos[1]+(r.offsetTop||0),f=s.tickFormat()(t.x()(n.point,n.pointIndex)),l=(n.series.bar?u:a).tickFormat()(t.y()(n.point,n.pointIndex)),c=N(n.series.key,f,l,n,B);e.tooltip.show([i,o],c,n.value<0?"n":"s",null,r)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+p.left,e.pos[1]+p.top],D.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){D.tooltipHide(e)}),r.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+p.left,e.pos[1]+p.top],D.tooltipShow(e)}),r.dispatch.on("elementMouseout.tooltip",function(e){D.tooltipHide(e)}),D.on("tooltipHide",function(){T&&e.tooltip.cleanup()}),B.dispatch=D,B.legend=c,B.lines=t,B.lines2=n,B.bars=r,B.bars2=i,B.xAxis=s,B.x2Axis=o,B.y1Axis=u,B.y2Axis=a,B.y3Axis=f,B.y4Axis=l,d3.rebind(B,t,"defined","size","clipVoronoi","interpolate"),B.options=e.utils.optionsFunc.bind(B),B.x=function(e){return arguments.length?(y=e,t.x(e),r.x(e),B):y},B.y=function(e){return arguments.length?(b=e,t.y(e),r.y(e),B):b},B.margin=function(e){return arguments.length?(p.top=typeof e.top!="undefined"?e.top:p.top,p.right=typeof e.right!="undefined"?e.right:p.right,p.bottom=typeof e.bottom!="undefined"?e.bottom:p.bottom,p.left=typeof e.left!="undefined"?e.left:p.left,B):p},B.width=function(e){return arguments.length?(v=e,B):v},B.height=function(e){return arguments.length?(m=e,B):m},B.color=function(t){return arguments.length?(w=e.utils.getColor(t),c.color(w),B):w},B.showLegend=function(e){return arguments.length?(E=e,B):E},B.tooltips=function(e){return arguments.length?(T=e,B):T},B.tooltipContent=function(e){return arguments.length?(N=e,B):N},B.noData=function(e){return arguments.length?(_=e,B):_},B.brushExtent=function(e){return arguments.length?(x=e,B):x},B},e.models.multiBar=function(){"use strict";function N(e){return e.each(function(e){var N=n-t.left-t.right,C=r-t.top-t.bottom,k=d3.select(this);p&&e.length&&(p=[{values:e[0].values.map(function(e){return{x:e.x,y:0,series:e.series,size:.01}})}]),c&&(e=d3.layout.stack().offset("zero").values(function(e){return e.values}).y(a)(!e.length&&p?p:e)),e=e.map(function(e,t){return e.values=e.values.map(function(e){return e.series=t,e}),e}),c&&e[0].values.map(function(t,n){var r=0,i=0;e.map(function(e){var t=e.values[n];t.size=Math.abs(t.y),t.y<0?(t.y1=i,i-=t.size):(t.y1=t.size+r,r+=t.size)})});var L=g&&y?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0,y1:e.y1}})});i.domain(g||d3.merge(L).map(function(e){return e.x})).rangeBands(b||[0,N],E),s.domain(y||d3.extent(d3.merge(L).map(function(e){return c?e.y>0?e.y1:e.y1+e.y:e.y}).concat(f))).range(w||[C,0]),i.domain()[0]===i.domain()[1]&&(i.domain()[0]?i.domain([i.domain()[0]-i.domain()[0]*.01,i.domain()[1]+i.domain()[1]*.01]):i.domain([-1,1])),s.domain()[0]===s.domain()[1]&&(s.domain()[0]?s.domain([s.domain()[0]+s.domain()[0]*.01,s.domain()[1]-s.domain()[1]*.01]):s.domain([-1,1])),x=x||i,T=T||s;var A=k.selectAll("g.nv-wrap.nv-multibar").data([e]),O=A.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar"),M=O.append("defs"),_=O.append("g"),D=A.select("g");_.append("g").attr("class","nv-groups"),A.attr("transform","translate("+t.left+","+t.top+")"),M.append("clipPath").attr("id","nv-edge-clip-"+o).append("rect"),A.select("#nv-edge-clip-"+o+" rect").attr("width",N).attr("height",C),D.attr("clip-path",l?"url(#nv-edge-clip-"+o+")":"");var P=A.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e,t){return t});P.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),P.exit().transition().selectAll("rect.nv-bar").delay(function(t,n){return n*m/e[0].values.length}).attr("y",function(e){return c?T(e.y0):T(0)}).attr("height",0).remove(),P.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return h(e,t)}).style("stroke",function(e,t){return h(e,t)}),P.transition().style("stroke-opacity",1).style("fill-opacity",.75);var H=P.selectAll("rect.nv-bar").data(function(t){return p&&!e.length?p.values:t.values});H.exit().remove();var B=H.enter().append("rect").attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(t,n,r){return c?0:r*i.rangeBand()/e.length}).attr("y",function(e){return T(c?e.y0:0)}).attr("height",0).attr("width",i.rangeBand()/(c?1:e.length)).attr("transform",function(e,t){return"translate("+i(u(e,t))+",0)"});H.style("fill",function(e,t,n){return h(e,n,t)}).style("stroke",function(e,t,n){return h(e,n,t)}).on("mouseover",function(t,n){d3.select(this).classed("hover",!0),S.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",!1),S.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){S.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(t,n){S.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event}),d3.event.stopPropagation()}),H.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).transition().attr("transform",function(e,t){return"translate("+i(u(e,t))+",0)"}),d&&(v||(v=e.map(function(){return!0})),H.style("fill",function(e,t,n){return d3.rgb(d(e,t)).darker(v.map(function(e,t){return t}).filter(function(e,t){return!v[t]})[n]).toString()}).style("stroke",function(e,t,n){return d3.rgb(d(e,t)).darker(v.map(function(e,t){return t}).filter(function(e,t){return!v[t]})[n]).toString()})),c?H.transition().delay(function(t,n){return n*m/e[0].values.length}).attr("y",function(e,t){return s(c?e.y1:0)}).attr("height",function(e,t){return Math.max(Math.abs(s(e.y+(c?e.y0:0))-s(c?e.y0:0)),1)}).attr("x",function(t,n){return c?0:t.series*i.rangeBand()/e.length}).attr("width",i.rangeBand()/(c?1:e.length)):H.transition().delay(function(t,n){return n*m/e[0].values.length}).attr("x",function(t,n){return t.series*i.rangeBand()/e.length}).attr("width",i.rangeBand()/e.length).attr("y",function(e,t){return a(e,t)<0?s(0):s(0)-s(a(e,t))<1?s(0)-1:s(a(e,t))||0}).attr("height",function(e,t){return Math.max(Math.abs(s(a(e,t))-s(0)),1)||0}),x=i.copy(),T=s
.copy()}),N}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=d3.scale.ordinal(),s=d3.scale.linear(),o=Math.floor(Math.random()*1e4),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=!0,c=!1,h=e.utils.defaultColor(),p=!1,d=null,v,m=1200,g,y,b,w,E=.1,S=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),x,T;return N.dispatch=S,N.options=e.utils.optionsFunc.bind(N),N.x=function(e){return arguments.length?(u=e,N):u},N.y=function(e){return arguments.length?(a=e,N):a},N.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,N):t},N.width=function(e){return arguments.length?(n=e,N):n},N.height=function(e){return arguments.length?(r=e,N):r},N.xScale=function(e){return arguments.length?(i=e,N):i},N.yScale=function(e){return arguments.length?(s=e,N):s},N.xDomain=function(e){return arguments.length?(g=e,N):g},N.yDomain=function(e){return arguments.length?(y=e,N):y},N.xRange=function(e){return arguments.length?(b=e,N):b},N.yRange=function(e){return arguments.length?(w=e,N):w},N.forceY=function(e){return arguments.length?(f=e,N):f},N.stacked=function(e){return arguments.length?(c=e,N):c},N.clipEdge=function(e){return arguments.length?(l=e,N):l},N.color=function(t){return arguments.length?(h=e.utils.getColor(t),N):h},N.barColor=function(t){return arguments.length?(d=e.utils.getColor(t),N):d},N.disabled=function(e){return arguments.length?(v=e,N):v},N.id=function(e){return arguments.length?(o=e,N):o},N.hideable=function(e){return arguments.length?(p=e,N):p},N.delay=function(e){return arguments.length?(m=e,N):m},N.groupSpacing=function(e){return arguments.length?(E=e,N):E},N},e.models.multiBarChart=function(){"use strict";function A(e){return e.each(function(e){var b=d3.select(this),O=this,M=(u||parseInt(b.style("width"))||960)-o.left-o.right,_=(a||parseInt(b.style("height"))||400)-o.top-o.bottom;A.update=function(){b.transition().duration(k).call(A)},A.container=this,S.disabled=e.map(function(e){return!!e.disabled});if(!x){var D;x={};for(D in S)S[D]instanceof Array?x[D]=S[D].slice(0):x[D]=S[D]}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var P=b.selectAll(".nv-noData").data([T]);return P.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),P.attr("x",o.left+M/2).attr("y",o.top+_/2).text(function(e){return e}),A}b.selectAll(".nv-noData").remove(),w=t.xScale(),E=t.yScale();var H=b.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([e]),B=H.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g"),j=H.select("g");B.append("g").attr("class","nv-x nv-axis"),B.append("g").attr("class","nv-y nv-axis"),B.append("g").attr("class","nv-barsWrap"),B.append("g").attr("class","nv-legendWrap"),B.append("g").attr("class","nv-controlsWrap"),c&&(i.width(M-C()),t.barColor()&&e.forEach(function(e,t){e.color=d3.rgb("#ccc").darker(t*1.5).toString()}),j.select(".nv-legendWrap").datum(e).call(i),o.top!=i.height()&&(o.top=i.height(),_=(a||parseInt(b.style("height"))||400)-o.top-o.bottom),j.select(".nv-legendWrap").attr("transform","translate("+C()+","+ -o.top+")"));if(l){var F=[{key:"Grouped",disabled:t.stacked()},{key:"Stacked",disabled:!t.stacked()}];s.width(C()).color(["#444","#444","#444"]),j.select(".nv-controlsWrap").datum(F).attr("transform","translate(0,"+ -o.top+")").call(s)}H.attr("transform","translate("+o.left+","+o.top+")"),d&&j.select(".nv-y.nv-axis").attr("transform","translate("+M+",0)"),t.disabled(e.map(function(e){return e.disabled})).width(M).height(_).color(e.map(function(e,t){return e.color||f(e,t)}).filter(function(t,n){return!e[n].disabled}));var I=j.select(".nv-barsWrap").datum(e.filter(function(e){return!e.disabled}));I.transition().call(t);if(h){n.scale(w).ticks(M/100).tickSize(-_,0),j.select(".nv-x.nv-axis").attr("transform","translate(0,"+E.range()[0]+")"),j.select(".nv-x.nv-axis").transition().call(n);var q=j.select(".nv-x.nv-axis > g").selectAll("g");q.selectAll("line, text").style("opacity",1);if(m){var R=function(e,t){return"translate("+e+","+t+")"},U=5,z=17;q.selectAll("text").attr("transform",function(e,t,n){return R(0,n%2==0?U:z)});var W=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;j.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(e,t){return R(0,t===0||W%2!==0?z:U)})}v&&q.filter(function(t,n){return n%Math.ceil(e[0].values.length/(M/100))!==0}).selectAll("text, line").style("opacity",0),g&&q.selectAll(".tick text").attr("transform","rotate("+g+" 0,0)").style("text-anchor",g>0?"start":"end"),j.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}p&&(r.scale(E).ticks(_/36).tickSize(-M,0),j.select(".nv-y.nv-axis").transition().call(r)),i.dispatch.on("stateChange",function(e){S=e,N.stateChange(S),A.update()}),s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;F=F.map(function(e){return e.disabled=!0,e}),e.disabled=!1;switch(e.key){case"Grouped":t.stacked(!1);break;case"Stacked":t.stacked(!0)}S.stacked=t.stacked(),N.stateChange(S),A.update()}),N.on("tooltipShow",function(e){y&&L(e,O.parentNode)}),N.on("changeState",function(n){typeof n.disabled!="undefined"&&(e.forEach(function(e,t){e.disabled=n.disabled[t]}),S.disabled=n.disabled),typeof n.stacked!="undefined"&&(t.stacked(n.stacked),S.stacked=n.stacked),A.update()})}),A}var t=e.models.multiBar(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o={top:30,right:20,bottom:50,left:60},u=null,a=null,f=e.utils.defaultColor(),l=!0,c=!0,h=!0,p=!0,d=!1,v=!0,m=!1,g=0,y=!0,b=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" on "+t+"</p>"},w,E,S={stacked:!1},x=null,T="No Data Available.",N=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),C=function(){return l?180:0},k=250;t.stacked(!1),n.orient("bottom").tickPadding(7).highlightZero(!0).showMaxMin(!1).tickFormat(function(e){return e}),r.orient(d?"right":"left").tickFormat(d3.format(",.1f")),s.updateState(!1);var L=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=b(i.series.key,a,f,i,A);e.tooltip.show([o,u],l,i.value<0?"n":"s",null,s)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top],N.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){N.tooltipHide(e)}),N.on("tooltipHide",function(){y&&e.tooltip.cleanup()}),A.dispatch=N,A.multibar=t,A.legend=i,A.xAxis=n,A.yAxis=r,d3.rebind(A,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","clipEdge","id","stacked","delay","barColor","groupSpacing"),A.options=e.utils.optionsFunc.bind(A),A.margin=function(e){return arguments.length?(o.top=typeof e.top!="undefined"?e.top:o.top,o.right=typeof e.right!="undefined"?e.right:o.right,o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom,o.left=typeof e.left!="undefined"?e.left:o.left,A):o},A.width=function(e){return arguments.length?(u=e,A):u},A.height=function(e){return arguments.length?(a=e,A):a},A.color=function(t){return arguments.length?(f=e.utils.getColor(t),i.color(f),A):f},A.showControls=function(e){return arguments.length?(l=e,A):l},A.showLegend=function(e){return arguments.length?(c=e,A):c},A.showXAxis=function(e){return arguments.length?(h=e,A):h},A.showYAxis=function(e){return arguments.length?(p=e,A):p},A.rightAlignYAxis=function(e){return arguments.length?(d=e,r.orient(e?"right":"left"),A):d},A.reduceXTicks=function(e){return arguments.length?(v=e,A):v},A.rotateLabels=function(e){return arguments.length?(g=e,A):g},A.staggerLabels=function(e){return arguments.length?(m=e,A):m},A.tooltip=function(e){return arguments.length?(b=e,A):b},A.tooltips=function(e){return arguments.length?(y=e,A):y},A.tooltipContent=function(e){return arguments.length?(b=e,A):b},A.state=function(e){return arguments.length?(S=e,A):S},A.defaultState=function(e){return arguments.length?(x=e,A):x},A.noData=function(e){return arguments.length?(T=e,A):T},A.transitionDuration=function(e){return arguments.length?(k=e,A):k},A},e.models.multiBarHorizontal=function(){"use strict";function N(e){return e.each(function(e){var i=n-t.left-t.right,g=r-t.top-t.bottom,N=d3.select(this);p&&(e=d3.layout.stack().offset("zero").values(function(e){return e.values}).y(a)(e)),e=e.map(function(e,t){return e.values=e.values.map(function(e){return e.series=t,e}),e}),p&&e[0].values.map(function(t,n){var r=0,i=0;e.map(function(e){var t=e.values[n];t.size=Math.abs(t.y),t.y<0?(t.y1=i-t.size,i-=t.size):(t.y1=r,r+=t.size)})});var C=y&&b?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0,y1:e.y1}})});s.domain(y||d3.merge(C).map(function(e){return e.x})).rangeBands(w||[0,g],.1),o.domain(b||d3.extent(d3.merge(C).map(function(e){return p?e.y>0?e.y1+e.y:e.y1:e.y}).concat(f))),d&&!p?o.range(E||[o.domain()[0]<0?v:0,i-(o.domain()[1]>0?v:0)]):o.range(E||[0,i]),x=x||s,T=T||d3.scale.linear().domain(o.domain()).range([o(0),o(0)]);var k=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([e]),L=k.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal"),A=L.append("defs"),O=L.append("g"),M=k.select("g");O.append("g").attr("class","nv-groups"),k.attr("transform","translate("+t.left+","+t.top+")");var _=k.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e,t){return t});_.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),_.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),_.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return l(e,t)}).style("stroke",function(e,t){return l(e,t)}),_.transition().style("stroke-opacity",1).style("fill-opacity",.75);var D=_.selectAll("g.nv-bar").data(function(e){return e.values});D.exit().remove();var P=D.enter().append("g").attr("transform",function(t,n,r){return"translate("+T(p?t.y0:0)+","+(p?0:r*s.rangeBand()/e.length+s(u(t,n)))+")"});P.append("rect").attr("width",0).attr("height",s.rangeBand()/(p?1:e.length)),D.on("mouseover",function(t,n){d3.select(this).classed("hover",!0),S.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[o(a(t,n)+(p?t.y0:0)),s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",!1),S.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){S.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length,o(a(t,n)+(p?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(t,n){S.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length,o(a(t,n)+(p?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event}),d3.event.stopPropagation()}),P.append("text"),d&&!p?(D.select("text").attr("text-anchor",function(e,t){return a(e,t)<0?"end":"start"}).attr("y",s.rangeBand()/(e.length*2)).attr("dy",".32em").text(function(e,t){return m(a(e,t))}),D.transition().select("text").attr("x",function(e,t){return a(e,t)<0?-4:o(a(e,t))-o(0)+4})):D.selectAll("text").text(""),D.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}),c&&(h||(h=e.map(function(){return!0})),D.style("fill",function(e,t,n){return d3.rgb(c(e,t)).darker(h.map(function(e,t){return t}).filter(function(e,t){return!h[t]})[n]).toString()}).style("stroke",function(e,t,n){return d3.rgb(c(e,t)).darker(h.map(function(e,t){return t}).filter(function(e,t){return!h[t]})[n]).toString()})),p?D.transition().attr("transform",function(e,t){return"translate("+o(e.y1)+","+s(u(e,t))+")"}).select("rect").attr("width",function(e,t){return Math.abs(o(a(e,t)+e.y0)-o(e.y0))}).attr("height",s.rangeBand()):D.transition().attr("transform",function(t,n){return"translate("+(a(t,n)<0?o(a(t,n)):o(0))+","+(t.series*s.rangeBand()/e.length+s(u(t,n)))+")"}).select("rect").attr("height",s.rangeBand()/e.length).attr("width",function(e,t){return Math.max(Math.abs(o(a(e,t))-o(0)),1)}),x=s.copy(),T=o.copy()}),N}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.ordinal(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=e.utils.defaultColor(),c=null,h,p=!1,d=!1,v=60,m=d3.format(",.2f"),g=1200,y,b,w,E,S=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),x,T;return N.dispatch=S,N.options=e.utils.optionsFunc.bind(N),N.x=function(e){return arguments.length?(u=e,N):u},N.y=function(e){return arguments.length?(a=e,N):a},N.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,N):t},N.width=function(e){return arguments.length?(n=e,N):n},N.height=function(e){return arguments.length?(r=e,N):r},N.xScale=function(e){return arguments.length?(s=e,N):s},N.yScale=function(e){return arguments.length?(o=e,N):o},N.xDomain=function(e){return arguments.length?(y=e,N):y},N.yDomain=function(e){return arguments.length?(b=e,N):b},N.xRange=function(e){return arguments.length?(w=e,N):w},N.yRange=function(e){return arguments.length?(E=e,N):E},N.forceY=function(e){return arguments.length?(f=e,N):f},N.stacked=function(e){return arguments.length?(p=e,N):p},N.color=function(t){return arguments.length?(l=e.utils.getColor(t),N):l},N.barColor=function(t){return arguments.length?(c=e.utils.getColor(t),N):c},N.disabled=function(e){return arguments.length?(h=e,N):h},N.id=function(e){return arguments.length?(i=e,N):i},N.delay=function(e){return arguments.length?(g=e,N):g},N.showValues=function(e){return arguments.length?(d=e,N):d},N.valueFormat=function(e){return arguments.length?(m=e,N):m},N.valuePadding=function(e){return arguments.length?(v=e,N):v},N},e.models.multiBarHorizontalChart=function(){"use strict";function T(e){return e.each(function(h){var d=d3.select(this),N=this,C=(u||parseInt(d.style("width"))||960)-o.left-o.right,k=(a||parseInt(d.style("height"))||400)-o.top-o.bottom;T.update=function(){d.transition().duration(S).call(T)},T.container=this,g.disabled=h.map(function(e){return!!e.disabled});if(!y){var L;y={};for(L in g)g[L]instanceof Array?y[L]=g[L].slice(0):y[L]=g[L]}if(!h||!h.length||!h.filter(function(e){return e.values.length}).length){var A=d.selectAll(".nv-noData").data([b]);return A.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),A.attr("x",o.left+C/2).attr("y",o.top+k/2).text(function(e){return e}),T}d.selectAll(".nv-noData").remove(),v=t.xScale(),m=t.yScale();var O=d.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([h]),M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g"),_=O.select("g");M.append("g").attr("class","nv-x nv-axis"),M.append("g").attr("class","nv-y nv-axis"),M.append("g").attr("class","nv-barsWrap"),M.append("g").attr("class","nv-legendWrap"),M.append("g").attr("class","nv-controlsWrap"),c&&(i.width(C-E()),t.barColor()&&h.forEach(function(e,t){e.color=d3.rgb("#ccc").darker(t*1.5).toString()}),_.select(".nv-legendWrap").datum(h).call(i),o.top!=i.height()&&(o.top=i.height(),k=(a||parseInt(d.style("height"))||400)-o.top-o.bottom),_.select(".nv-legendWrap").attr("transform","translate("+E()+","+ -o.top+")"));if(l){var D=[{key:"Grouped",disabled:t.stacked()},{key:"Stacked",disabled:!t.stacked()}];s.width(E()).color(["#444","#444","#444"]),_.select(".nv-controlsWrap").datum(D).attr("transform","translate(0,"+ -o.top+")").call(s)}O.attr("transform","translate("+o.left+","+o.top+")"),t.disabled(h.map(function(e){return e.disabled})).width(C).height(k).color(h.map(function(e,t){return e.color||f(e,t)}).filter(function(e,t){return!h[t].disabled}));var P=_.select(".nv-barsWrap").datum(h.filter(function(e){return!e.disabled}));P.transition().call(t),n.scale(v).ticks(k/24).tickSize(-C,0),_.select(".nv-x.nv-axis").transition().call(n);var H=_.select(".nv-x.nv-axis").selectAll("g");H.selectAll("line, text").style("opacity",1),r.scale(m).ticks(C/100).tickSize(-k,0),_.select(".nv-y.nv-axis").attr("transform","translate(0,"+k+")"),_.select(".nv-y.nv-axis").transition().call(r),i.dispatch.on("stateChange",function(e){g=e,w.stateChange(g),T.update()}),s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;D=D.map(function(e){return e.disabled=!0,e}),e.disabled=!1;switch(e.key){case"Grouped":t.stacked(!1);break;case"Stacked":t.stacked(!0)}g.stacked=t.stacked(),w.stateChange(g),T.update()}),w.on("tooltipShow",function(e){p&&x(e,N.parentNode)}),w.on("changeState",function(n){typeof n.disabled!="undefined"&&(h.forEach(function(e,t){e.disabled=n.disabled[t]}),g.disabled=n.disabled),typeof n.stacked!="undefined"&&(t.stacked(n.stacked),g.stacked=n.stacked),e.call(T)})}),T}var t=e.models.multiBarHorizontal(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend().height(30),s=e.models.legend().height(30),o={top:30,right:20,bottom:50,left:60},u=null,a=null,f=e.utils.defaultColor(),l=!0,c=!0,h=!1,p=!0,d=function(e,t,n,r,i){return"<h3>"+e+" - "+t+"</h3>"+"<p>"+n+"</p>"},v,m,g={stacked:h},y=null,b="No Data Available.",w=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),E=function(){return l?180:0},S=250;t.stacked(h),n.orient("left").tickPadding(5).highlightZero(!1).showMaxMin(!1).tickFormat(function(e){return e}),r.orient("bottom").tickFormat(d3.format(",.1f")),s.updateState(!1);var x=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=d(i.series.key,a,f,i,T);e.tooltip.show([o,u],l,i.value<0?"e":"w",null,s)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top],w.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){w.tooltipHide(e)}),w.on("tooltipHide",function(){p&&e.tooltip.cleanup()}),T.dispatch=w,T.multibar=t,T.legend=i,T.xAxis=n,T.yAxis=r,d3.rebind(T,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","clipEdge","id","delay","showValues","valueFormat","stacked","barColor"),T.options=e.utils.optionsFunc.bind(T),T.margin=function(e){return arguments.length?(o.top=typeof e.top!="undefined"?e.top:o.top,o.right=typeof e.right!="undefined"?e.right:o.right,o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom,o.left=typeof e.left!="undefined"?e.left:o.left,T):o},T.width=function(e){return arguments.length?(u=e,T):u},T.height=function(e){return arguments.length?(a=e,T):a},T.color=function(t){return arguments.length?(f=e.utils.getColor(t),i.color(f),T):f},T.showControls=function(e){return arguments.length?(l=e,T):l},T.showLegend=function(e){return arguments.length?(c=e,T):c},T.tooltip=function(e){return arguments.length?(d=e,T):d},T.tooltips=function(e){return arguments.length?(p=e,T):p},T.tooltipContent=function(e){return arguments.length?(d=e,T):d},T.state=function(e){return arguments.length?(g=e,T):g},T.defaultState=function(e){return arguments.length?(y=e,T):y},T.noData=function(e){return arguments.length?(b=e,T):b},T.transitionDuration=function(e){return arguments.length?(S=e,T):S},T},e.models.multiChart=function(){"use strict";function C(e){return e.each(function(e){var u=d3.select(this),f=this;C.update=function(){u.transition().call(C)},C.container=this;var k=(r||parseInt(u.style("width"))||960)-t.left-t.right,L=(i||parseInt(u.style("height"))||400)-t.top-t.bottom,A=e.filter(function(e){return!e.disabled&&e.type=="line"&&e.yAxis==1}),O=e.filter(function(e){return!e.disabled&&e.type=="line"&&e.yAxis==2}),M=e.filter(function(e){return!e.disabled&&e.type=="bar"&&e.yAxis==1}),_=e.filter(function(e){return!e.disabled&&e.type=="bar"&&e.yAxis==2}),D=e.filter(function(e){return!e.disabled&&e.type=="area"&&e.yAxis==1}),P=e.filter(function(e){return!e.disabled&&e.type=="area"&&e.yAxis==2}),H=e.filter(function(e){return!e.disabled&&e.yAxis==1}).map(function(e){return e.values.map(function(e,t){return{x:e.x,y:e.y}})}),B=e.filter(function(e){return!e.disabled&&e.yAxis==2}).map(function(e){return e.values.map(function(e,t){return{x:e.x,y:e.y}})});a.domain(d3.extent(d3.merge(H.concat(B)),function(e){return e.x})).range([0,k]);var j=u.selectAll("g.wrap.multiChart").data([e]),F=j.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");F.append("g").attr("class","x axis"),F.append("g").attr("class","y1 axis"),F.append("g").attr("class","y2 axis"),F.append("g").attr("class","lines1Wrap"),F.append("g").attr("class","lines2Wrap"),F.append("g").attr("class","bars1Wrap"),F.append("g").attr("class","bars2Wrap"),F.append("g").attr("class","stack1Wrap"),F.append("g").attr("class","stack2Wrap"),F.append("g").attr("class","legendWrap");var I=j.select("g");s&&(x.width(k/2),I.select(".legendWrap").datum(e.map(function(e){return e.originalKey=e.originalKey===undefined?e.key:e.originalKey,e.key=e.originalKey+(e.yAxis==1?"":" (right axis)"),e})).call(x),t.top!=x.height()&&(t.top=x.height(),L=(i||parseInt(u.style("height"))||400)-t.top-t.bottom),I.select(".legendWrap").attr("transform","translate("+k/2+","+ -t.top+")")),d.width(k).height(L).interpolate("monotone").color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="line"})),v.width(k).height(L).interpolate("monotone").color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="line"})),m.width(k).height(L).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="bar"})),g.width(k).height(L).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="bar"})),y.width(k).height(L).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="area"})),b.width(k).height(L).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="area"})),I.attr("transform","translate("+t.left+","+t.top+")");var q=I.select(".lines1Wrap").datum(A),R=I.select(".bars1Wrap").datum(M),U=I.select(".stack1Wrap").datum(D),z=I.select(".lines2Wrap").datum(O),W=I.select(".bars2Wrap").datum(_),X=I.select(".stack2Wrap").datum(P),V=D.length?D.map(function(e){return e.values}).reduce(function(e,t){return e.map(function(e,n){return{x:e.x,y:e.y+t[n].y}})}).concat([{x:0,y:0}]):[],$=P.length?P.map(function(e){return e.values}).reduce(function(e,t){return e.map(function(e,n){return{x:e.x,y:e.y+t[n].y}})}).concat([{x:0,y:0}]):[];h.domain(l||d3.extent(d3.merge(H).concat(V),function(e){return e.y})).range([0,L]),p.domain(c||d3.extent(d3.merge(B).concat($),function(e){return e.y})).range([0,L]),d.yDomain(h.domain()),m.yDomain(h.domain()),y.yDomain(h.domain()),v.yDomain(p.domain()),g.yDomain(p.domain()),b.yDomain(p.domain()),D.length&&d3.transition(U).call(y),P.length&&d3.transition(X).call(b),M.length&&d3.transition(R).call(m),_.length&&d3.transition(W).call(g),A.length&&d3.transition(q).call(d),O.length&&d3.transition(z).call(v),w.ticks(k/100).tickSize(-L,0),I.select(".x.axis").attr("transform","translate(0,"+L+")"),d3.transition(I.select(".x.axis")).call(w),E.ticks(L/36).tickSize(-k,0),d3.transition(I.select(".y1.axis")).call(E),S.ticks(L/36).tickSize(-k,0),d3.transition(I.select(".y2.axis")).call(S),I.select(".y2.axis").style("opacity",B.length?1:0).attr("transform","translate("+a.range()[1]+",0)"),x.dispatch.on("stateChange",function(e){C.update()}),T.on("tooltipShow",function(e){o&&N(e,f.parentNode)})}),C}var t={top:30,right:20,bottom:50,left:60},n=d3.scale.category20().range(),r=null,i=null,s=!0,o=!0,u=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},a,f,l,c,a=d3.scale.linear(),h=d3.scale.linear(),p=d3.scale.linear(),d=e.models.line().yScale(h),v=e.models.line().yScale(p),m=e.models.multiBar().stacked(!1).yScale(h),g=e.models.multiBar().stacked(!1).yScale(p),y=e.models.stackedArea().yScale(h),b=e.models.stackedArea().yScale(p),w=e.models.axis().scale(a).orient("bottom").tickPadding(5),E=e.models.axis().scale(h).orient("left"),S=e.models.axis().scale(p).orient("right"),x=e.models.legend().height(30),T=d3.dispatch("tooltipShow","tooltipHide"),N=function(t,n){var r=t.pos[0]+(n.offsetLeft||0),i=t.pos[1]+(n.offsetTop||0),s=w.tickFormat()(d.x()(t.point,t.pointIndex)),o=(t.series.yAxis==2?S:E).tickFormat()(d.y()(t.point,t.pointIndex)),a=u(t.series.key,s,o,t,C);e.tooltip.show([r,i],a,undefined,undefined,n.offsetParent)};return d.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),d.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)}),v.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),v.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)}),m.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),m.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)}),g.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),g.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)}),y.dispatch.on("tooltipShow",function(e){if(!Math.round(y.y()(e.point)*100))return setTimeout(function(){d3.selectAll(".point.hover").classed("hover",!1)},0),!1;e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),y.dispatch.on("tooltipHide",function(e){T.tooltipHide(e)}),b.dispatch.on("tooltipShow",function(e){if(!Math.round(b.y()(e.point)*100))return setTimeout(function(){d3.selectAll(".point.hover").classed("hover",!1)},0),!1;e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),b.dispatch.on("tooltipHide",function(e){T.tooltipHide(e)}),d.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),d.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)}),v.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],T.tooltipShow(e)}),v.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)}),T.on("tooltipHide",function(){o&&e.tooltip.cleanup()}),C.dispatch=T,C.lines1=d,C.lines2=v,C.bars1=m,C.bars2=g,C.stack1=y,C.stack2=b,C.xAxis=w,C.yAxis1=E,C.yAxis2=S,C.options=e.utils.optionsFunc.bind(C),C.x=function(e){return arguments.length?(getX=e,d.x(e),m.x(e),C):getX},C.y=function(e){return arguments.length?(getY=e,d.y(e),m.y(e),C):getY},C.yDomain1=function(e){return arguments.length?(l=e,C):l},C.yDomain2=function(e){return arguments.length?(c=e,C):c},C.margin=function(e){return arguments.length?(t=e,C):t},C.width=function(e){return arguments.length?(r=e,C):r},C.height=function(e){return arguments.length?(i=e,C):i},C.color=function(e){return arguments.length?(n=e,x.color(e),C):n},C.showLegend=function(e){return arguments.length?(s=e,C):s},C.tooltips=function(e){return arguments.length?(o=e,C):o},C.tooltipContent=function(e){return arguments.length?(u=e,C):u},C},e.models.ohlcBar=function(){"use strict";function x(e){return e.each(function(e){var g=n-t.left-t.right,x=r-t.top-t.bottom,T=d3.select(this);s.domain(y||d3.extent(e[0].values.map(u).concat(p))),v?s.range(w||[g*.5/e[0].values.length,g*(e[0].values.length-.5)/e[0].values.length]):s.range(w||[0,g]),o.domain(b||[d3.min(e[0].values.map(h).concat(d)),d3.max(e[0].values.map(c).concat(d))]).range(E||[x,0]);if(s.domain()[0]===s.domain()[1]||o.domain()[0]===o.domain()[1])singlePoint=!0;s.domain()[0]===s.domain()[1]&&(s.domain()[0]?s.domain([s.domain()[0]-s.domain()[0]*.01,s.domain()[1]+s.domain()[1]*.01]):s.domain([-1,1])),o.domain()[0]===o.domain()[1]&&(o.domain()[0]?o.domain([o.domain()[0]+o.domain()[0]*.01,o.domain()[1]-o.domain()[1]*.01]):o.domain([-1,1]));var N=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([e[0].values]),C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar"),k=C.append("defs"),L=C.append("g"),A=N.select("g");L.append("g").attr("class","nv-ticks"),N.attr("transform","translate("+t.left+","+t.top+")"),T.on("click",function(e,t){S.chartClick({data:e,index:t,pos:d3.event,id:i})}),k.append("clipPath").attr("id","nv-chart-clip-path-"+i).append("rect"),N.select("#nv-chart-clip-path-"+i+" rect").attr("width",g).attr("height",x),A.attr("clip-path",m?"url(#nv-chart-clip-path-"+i+")":"");var O=N.select(".nv-ticks").selectAll(".nv-tick").data(function(e){return e});O.exit().remove();var M=O.enter().append("path").attr("class",function(e,t,n){return(f(e,t)>l(e,t)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+t}).attr("d",function(t,n){var r=g/e[0].values.length*.9;return"m0,0l0,"+(o(f(t,n))-o(c(t,n)))+"l"+ -r/2+",0l"+r/2+",0l0,"+(o(h(t,n))-o(f(t,n)))+"l0,"+(o(l(t,n))-o(h(t,n)))+"l"+r/2+",0l"+ -r/2+",0z"}).attr("transform",function(e,t){return"translate("+s(u(e,t))+","+o(c(e,t))+")"}).on("mouseover",function(t,n){d3.select(this).classed("hover",!0),S.elementMouseover({point:t,series:e[0],pos:[s(u(t,n)),o(a(t,n))],pointIndex:n,seriesIndex:0,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",!1),S.elementMouseout({point:t,series:e[0],pointIndex:n,seriesIndex:0,e:d3.event})}).on("click",function(e,t){S.elementClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i}),d3.event.stopPropagation()}).on("dblclick",function(e,t){S.elementDblClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i}),d3.event.stopPropagation()});O.attr("class",function(e,t,n){return(f(e,t)>l(e,t)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+t}),d3.transition(O).attr("transform",function(e,t){return"translate("+s(u(e,t))+","+o(c(e,t))+")"}).attr("d",function(t,n){var r=g/e[0].values.length*.9;return"m0,0l0,"+(o(f(t,n))-o(c(t,n)))+"l"+ -r/2+",0l"+r/2+",0l0,"+(o(h(t,n))-o(f(t,n)))+"l0,"+(o(l(t,n))-o(h(t,n)))+"l"+r/2+",0l"+ -r/2+",0z"})}),x}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=function(e){return e.open},l=function(e){return e.close},c=function(e){return e.high},h=function(e){return e.low},p=[],d=[],v=!1,m=!0,g=e.utils.defaultColor(),y,b,w,E,S=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return x.dispatch=S,x.options=e.utils.optionsFunc.bind(x),x.x=function(e){return arguments.length?(u=e,x):u},x.y=function(e){return arguments.length?(a=e,x):a},x.open=function(e){return arguments.length?(f=e,x):f},x.close=function(e){return arguments.length?(l=e,x):l},x.high=function(e){return arguments.length?(c=e,x):c},x.low=function(e){return arguments.length?(h=e,x):h},x.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,x):t},x.width=function(e){return arguments.length?(n=e,x):n},x.height=function(e){return arguments.length?(r=e,x):r},x.xScale=function(e){return arguments.length?(s=e,x):s},x.yScale=function(e){return arguments.length?(o=e,x):o},x.xDomain=function(e){return arguments.length?(y=e,x):y},x.yDomain=function(e){return arguments.length?(b=e,x):b},x.xRange=function(e){return arguments.length?(w=e,x):w},x.yRange=function(e){return arguments.length?(E=e,x):E},x.forceX=function(e){return arguments.length?(p=e,x):p},x.forceY=function(e){return arguments.length?(d=e,x):d},x.padData=function(e){return arguments.length?(v=e,x):v},x.clipEdge=function(e){return arguments.length?(m=e,x):m},x.color=function(t){return arguments.length?(g=e.utils.getColor(t),x):g},x.id=function(e){return arguments.length?(i=e,x):i},x},e.models.pie=function(){"use strict";function E(e){return e.each(function(e){function P(e){var t=(e.startAngle+e.endAngle)*90/Math.PI-90;return t>90?t-180:t}function H(e){e.endAngle=isNaN(e.endAngle)?0:e.endAngle,e.startAngle=isNaN(e.startAngle)?0:e.startAngle,v||(e.innerRadius=0);var t=d3.interpolate(this._current,e);return this._current=t(0),function(
e){return L(t(e))}}function B(e){e.innerRadius=0;var t=d3.interpolate({startAngle:0,endAngle:0},e);return function(e){return L(t(e))}}var o=n-t.left-t.right,f=r-t.top-t.bottom,E=Math.min(o,f)/2,S=E-E/5,x=d3.select(this),T=x.selectAll(".nv-wrap.nv-pie").data(e),N=T.enter().append("g").attr("class","nvd3 nv-wrap nv-pie nv-chart-"+u),C=N.append("g"),k=T.select("g");C.append("g").attr("class","nv-pie"),T.attr("transform","translate("+t.left+","+t.top+")"),k.select(".nv-pie").attr("transform","translate("+o/2+","+f/2+")"),x.on("click",function(e,t){w.chartClick({data:e,index:t,pos:d3.event,id:u})});var L=d3.svg.arc().outerRadius(S);g&&L.startAngle(g),y&&L.endAngle(y),v&&L.innerRadius(E*b);var A=d3.layout.pie().sort(null).value(function(e){return e.disabled?0:s(e)}),O=T.select(".nv-pie").selectAll(".nv-slice").data(A);O.exit().remove();var M=O.enter().append("g").attr("class","nv-slice").on("mouseover",function(e,t){d3.select(this).classed("hover",!0),w.elementMouseover({label:i(e.data),value:s(e.data),point:e.data,pointIndex:t,pos:[d3.event.pageX,d3.event.pageY],id:u})}).on("mouseout",function(e,t){d3.select(this).classed("hover",!1),w.elementMouseout({label:i(e.data),value:s(e.data),point:e.data,index:t,id:u})}).on("click",function(e,t){w.elementClick({label:i(e.data),value:s(e.data),point:e.data,index:t,pos:d3.event,id:u}),d3.event.stopPropagation()}).on("dblclick",function(e,t){w.elementDblClick({label:i(e.data),value:s(e.data),point:e.data,index:t,pos:d3.event,id:u}),d3.event.stopPropagation()});O.attr("fill",function(e,t){return a(e,t)}).attr("stroke",function(e,t){return a(e,t)});var _=M.append("path").each(function(e){this._current=e});d3.transition(O.select("path")).attr("d",L).attrTween("d",H);if(l){var D=d3.svg.arc().innerRadius(0);c&&(D=L),h&&(D=d3.svg.arc().outerRadius(L.outerRadius())),M.append("g").classed("nv-label",!0).each(function(e,t){var n=d3.select(this);n.attr("transform",function(e){if(m){e.outerRadius=S+10,e.innerRadius=S+15;var t=(e.startAngle+e.endAngle)/2*(180/Math.PI);return(e.startAngle+e.endAngle)/2<Math.PI?t-=90:t+=90,"translate("+D.centroid(e)+") rotate("+t+")"}return e.outerRadius=E+10,e.innerRadius=E+15,"translate("+D.centroid(e)+")"}),n.append("rect").style("stroke","#fff").style("fill","#fff").attr("rx",3).attr("ry",3),n.append("text").style("text-anchor",m?(e.startAngle+e.endAngle)/2<Math.PI?"start":"end":"middle").style("fill","#000")}),O.select(".nv-label").transition().attr("transform",function(e){if(m){e.outerRadius=S+10,e.innerRadius=S+15;var t=(e.startAngle+e.endAngle)/2*(180/Math.PI);return(e.startAngle+e.endAngle)/2<Math.PI?t-=90:t+=90,"translate("+D.centroid(e)+") rotate("+t+")"}return e.outerRadius=E+10,e.innerRadius=E+15,"translate("+D.centroid(e)+")"}),O.each(function(e,t){var n=d3.select(this);n.select(".nv-label text").style("text-anchor",m?(e.startAngle+e.endAngle)/2<Math.PI?"start":"end":"middle").text(function(e,t){var n=(e.endAngle-e.startAngle)/(2*Math.PI),r={key:i(e.data),value:s(e.data),percent:d3.format("%")(n)};return e.value&&n>d?r[p]:""});var r=n.select("text").node().getBBox();n.select(".nv-label rect").attr("width",r.width+10).attr("height",r.height+10).attr("transform",function(){return"translate("+[r.x-5,r.y-5]+")"})})}}),E}var t={top:0,right:0,bottom:0,left:0},n=500,r=500,i=function(e){return e.x},s=function(e){return e.y},o=function(e){return e.description},u=Math.floor(Math.random()*1e4),a=e.utils.defaultColor(),f=d3.format(",.2f"),l=!0,c=!0,h=!1,p="key",d=.02,v=!1,m=!1,g=!1,y=!1,b=.5,w=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return E.dispatch=w,E.options=e.utils.optionsFunc.bind(E),E.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,E):t},E.width=function(e){return arguments.length?(n=e,E):n},E.height=function(e){return arguments.length?(r=e,E):r},E.values=function(t){return e.log("pie.values() is no longer supported."),E},E.x=function(e){return arguments.length?(i=e,E):i},E.y=function(e){return arguments.length?(s=d3.functor(e),E):s},E.description=function(e){return arguments.length?(o=e,E):o},E.showLabels=function(e){return arguments.length?(l=e,E):l},E.labelSunbeamLayout=function(e){return arguments.length?(m=e,E):m},E.donutLabelsOutside=function(e){return arguments.length?(h=e,E):h},E.pieLabelsOutside=function(e){return arguments.length?(c=e,E):c},E.labelType=function(e){return arguments.length?(p=e,p=p||"key",E):p},E.donut=function(e){return arguments.length?(v=e,E):v},E.donutRatio=function(e){return arguments.length?(b=e,E):b},E.startAngle=function(e){return arguments.length?(g=e,E):g},E.endAngle=function(e){return arguments.length?(y=e,E):y},E.id=function(e){return arguments.length?(u=e,E):u},E.color=function(t){return arguments.length?(a=e.utils.getColor(t),E):a},E.valueFormat=function(e){return arguments.length?(f=e,E):f},E.labelThreshold=function(e){return arguments.length?(d=e,E):d},E},e.models.pieChart=function(){"use strict";function v(e){return e.each(function(e){var u=d3.select(this),a=this,f=(i||parseInt(u.style("width"))||960)-r.left-r.right,d=(s||parseInt(u.style("height"))||400)-r.top-r.bottom;v.update=function(){u.transition().call(v)},v.container=this,l.disabled=e.map(function(e){return!!e.disabled});if(!c){var m;c={};for(m in l)l[m]instanceof Array?c[m]=l[m].slice(0):c[m]=l[m]}if(!e||!e.length){var g=u.selectAll(".nv-noData").data([h]);return g.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),g.attr("x",r.left+f/2).attr("y",r.top+d/2).text(function(e){return e}),v}u.selectAll(".nv-noData").remove();var y=u.selectAll("g.nv-wrap.nv-pieChart").data([e]),b=y.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g"),w=y.select("g");b.append("g").attr("class","nv-pieWrap"),b.append("g").attr("class","nv-legendWrap"),o&&(n.width(f).key(t.x()),y.select(".nv-legendWrap").datum(e).call(n),r.top!=n.height()&&(r.top=n.height(),d=(s||parseInt(u.style("height"))||400)-r.top-r.bottom),y.select(".nv-legendWrap").attr("transform","translate(0,"+ -r.top+")")),y.attr("transform","translate("+r.left+","+r.top+")"),t.width(f).height(d);var E=w.select(".nv-pieWrap").datum([e]);d3.transition(E).call(t),n.dispatch.on("stateChange",function(e){l=e,p.stateChange(l),v.update()}),t.dispatch.on("elementMouseout.tooltip",function(e){p.tooltipHide(e)}),p.on("changeState",function(t){typeof t.disabled!="undefined"&&(e.forEach(function(e,n){e.disabled=t.disabled[n]}),l.disabled=t.disabled),v.update()})}),v}var t=e.models.pie(),n=e.models.legend(),r={top:30,right:20,bottom:20,left:20},i=null,s=null,o=!0,u=e.utils.defaultColor(),a=!0,f=function(e,t,n,r){return"<h3>"+e+"</h3>"+"<p>"+t+"</p>"},l={},c=null,h="No Data Available.",p=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),d=function(n,r){var i=t.description()(n.point)||t.x()(n.point),s=n.pos[0]+(r&&r.offsetLeft||0),o=n.pos[1]+(r&&r.offsetTop||0),u=t.valueFormat()(t.y()(n.point)),a=f(i,u,n,v);e.tooltip.show([s,o],a,n.value<0?"n":"s",null,r)};return t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+r.left,e.pos[1]+r.top],p.tooltipShow(e)}),p.on("tooltipShow",function(e){a&&d(e)}),p.on("tooltipHide",function(){a&&e.tooltip.cleanup()}),v.legend=n,v.dispatch=p,v.pie=t,d3.rebind(v,t,"valueFormat","values","x","y","description","id","showLabels","donutLabelsOutside","pieLabelsOutside","labelType","donut","donutRatio","labelThreshold"),v.options=e.utils.optionsFunc.bind(v),v.margin=function(e){return arguments.length?(r.top=typeof e.top!="undefined"?e.top:r.top,r.right=typeof e.right!="undefined"?e.right:r.right,r.bottom=typeof e.bottom!="undefined"?e.bottom:r.bottom,r.left=typeof e.left!="undefined"?e.left:r.left,v):r},v.width=function(e){return arguments.length?(i=e,v):i},v.height=function(e){return arguments.length?(s=e,v):s},v.color=function(r){return arguments.length?(u=e.utils.getColor(r),n.color(u),t.color(u),v):u},v.showLegend=function(e){return arguments.length?(o=e,v):o},v.tooltips=function(e){return arguments.length?(a=e,v):a},v.tooltipContent=function(e){return arguments.length?(f=e,v):f},v.state=function(e){return arguments.length?(l=e,v):l},v.defaultState=function(e){return arguments.length?(c=e,v):c},v.noData=function(e){return arguments.length?(h=e,v):h},v},e.models.scatter=function(){"use strict";function I(q){return q.each(function(I){function Q(){if(!g)return!1;var e,i=d3.merge(I.map(function(e,t){return e.values.map(function(e,n){var r=f(e,n),i=l(e,n);return[o(r)+Math.random()*1e-7,u(i)+Math.random()*1e-7,t,n,e]}).filter(function(e,t){return b(e[4],t)})}));if(D===!0){if(x){var a=X.select("defs").selectAll(".nv-point-clips").data([s]).enter();a.append("clipPath").attr("class","nv-point-clips").attr("id","nv-points-clip-"+s);var c=X.select("#nv-points-clip-"+s).selectAll("circle").data(i);c.enter().append("circle").attr("r",T),c.exit().remove(),c.attr("cx",function(e){return e[0]}).attr("cy",function(e){return e[1]}),X.select(".nv-point-paths").attr("clip-path","url(#nv-points-clip-"+s+")")}i.length&&(i.push([o.range()[0]-20,u.range()[0]-20,null,null]),i.push([o.range()[1]+20,u.range()[1]+20,null,null]),i.push([o.range()[0]-20,u.range()[0]+20,null,null]),i.push([o.range()[1]+20,u.range()[1]-20,null,null]));var h=d3.geom.polygon([[-10,-10],[-10,r+10],[n+10,r+10],[n+10,-10]]),p=d3.geom.voronoi(i).map(function(e,t){return{data:h.clip(e),series:i[t][2],point:i[t][3]}}),d=X.select(".nv-point-paths").selectAll("path").data(p);d.enter().append("path").attr("class",function(e,t){return"nv-path-"+t}),d.exit().remove(),d.attr("d",function(e){return e.data.length===0?"M 0 0":"M"+e.data.join("L")+"Z"});var v=function(e,n){if(F)return 0;var r=I[e.series];if(typeof r=="undefined")return;var i=r.values[e.point];n({point:i,series:r,pos:[o(f(i,e.point))+t.left,u(l(i,e.point))+t.top],seriesIndex:e.series,pointIndex:e.point})};d.on("click",function(e){v(e,_.elementClick)}).on("mouseover",function(e){v(e,_.elementMouseover)}).on("mouseout",function(e,t){v(e,_.elementMouseout)})}else X.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",function(e,n){if(F||!I[e.series])return 0;var r=I[e.series],i=r.values[n];_.elementClick({point:i,series:r,pos:[o(f(i,n))+t.left,u(l(i,n))+t.top],seriesIndex:e.series,pointIndex:n})}).on("mouseover",function(e,n){if(F||!I[e.series])return 0;var r=I[e.series],i=r.values[n];_.elementMouseover({point:i,series:r,pos:[o(f(i,n))+t.left,u(l(i,n))+t.top],seriesIndex:e.series,pointIndex:n})}).on("mouseout",function(e,t){if(F||!I[e.series])return 0;var n=I[e.series],r=n.values[t];_.elementMouseout({point:r,series:n,seriesIndex:e.series,pointIndex:t})});F=!1}var q=n-t.left-t.right,R=r-t.top-t.bottom,U=d3.select(this);I=I.map(function(e,t){return e.values=e.values.map(function(e){return e.series=t,e}),e});var W=N&&C&&A?[]:d3.merge(I.map(function(e){return e.values.map(function(e,t){return{x:f(e,t),y:l(e,t),size:c(e,t)}})}));o.domain(N||d3.extent(W.map(function(e){return e.x}).concat(d))),w&&I[0]?o.range(k||[(q*E+q)/(2*I[0].values.length),q-q*(1+E)/(2*I[0].values.length)]):o.range(k||[0,q]),u.domain(C||d3.extent(W.map(function(e){return e.y}).concat(v))).range(L||[R,0]),a.domain(A||d3.extent(W.map(function(e){return e.size}).concat(m))).range(O||[16,256]);if(o.domain()[0]===o.domain()[1]||u.domain()[0]===u.domain()[1])M=!0;o.domain()[0]===o.domain()[1]&&(o.domain()[0]?o.domain([o.domain()[0]-o.domain()[0]*.01,o.domain()[1]+o.domain()[1]*.01]):o.domain([-1,1])),u.domain()[0]===u.domain()[1]&&(u.domain()[0]?u.domain([u.domain()[0]-u.domain()[0]*.01,u.domain()[1]+u.domain()[1]*.01]):u.domain([-1,1])),isNaN(o.domain()[0])&&o.domain([-1,1]),isNaN(u.domain()[0])&&u.domain([-1,1]),P=P||o,H=H||u,B=B||a;var X=U.selectAll("g.nv-wrap.nv-scatter").data([I]),V=X.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+s+(M?" nv-single-point":"")),$=V.append("defs"),J=V.append("g"),K=X.select("g");J.append("g").attr("class","nv-groups"),J.append("g").attr("class","nv-point-paths"),X.attr("transform","translate("+t.left+","+t.top+")"),$.append("clipPath").attr("id","nv-edge-clip-"+s).append("rect"),X.select("#nv-edge-clip-"+s+" rect").attr("width",q).attr("height",R),K.attr("clip-path",S?"url(#nv-edge-clip-"+s+")":""),F=!0;var G=X.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});G.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),G.exit().remove(),G.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}),G.transition().style("fill",function(e,t){return i(e,t)}).style("stroke",function(e,t){return i(e,t)}).style("stroke-opacity",1).style("fill-opacity",.5);if(p){var Y=G.selectAll("circle.nv-point").data(function(e){return e.values},y);Y.enter().append("circle").style("fill",function(e,t){return e.color}).style("stroke",function(e,t){return e.color}).attr("cx",function(t,n){return e.utils.NaNtoZero(P(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(H(l(t,n)))}).attr("r",function(e,t){return Math.sqrt(a(c(e,t))/Math.PI)}),Y.exit().remove(),G.exit().selectAll("path.nv-point").transition().attr("cx",function(t,n){return e.utils.NaNtoZero(o(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(u(l(t,n)))}).remove(),Y.each(function(e,t){d3.select(this).classed("nv-point",!0).classed("nv-point-"+t,!0).classed("hover",!1)}),Y.transition().attr("cx",function(t,n){return e.utils.NaNtoZero(o(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(u(l(t,n)))}).attr("r",function(e,t){return Math.sqrt(a(c(e,t))/Math.PI)})}else{var Y=G.selectAll("path.nv-point").data(function(e){return e.values});Y.enter().append("path").style("fill",function(e,t){return e.color}).style("stroke",function(e,t){return e.color}).attr("transform",function(e,t){return"translate("+P(f(e,t))+","+H(l(e,t))+")"}).attr("d",d3.svg.symbol().type(h).size(function(e,t){return a(c(e,t))})),Y.exit().remove(),G.exit().selectAll("path.nv-point").transition().attr("transform",function(e,t){return"translate("+o(f(e,t))+","+u(l(e,t))+")"}).remove(),Y.each(function(e,t){d3.select(this).classed("nv-point",!0).classed("nv-point-"+t,!0).classed("hover",!1)}),Y.transition().attr("transform",function(e,t){return"translate("+o(f(e,t))+","+u(l(e,t))+")"}).attr("d",d3.svg.symbol().type(h).size(function(e,t){return a(c(e,t))}))}clearTimeout(j),j=setTimeout(Q,300),P=o.copy(),H=u.copy(),B=a.copy()}),I}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e5),o=d3.scale.linear(),u=d3.scale.linear(),a=d3.scale.linear(),f=function(e){return e.x},l=function(e){return e.y},c=function(e){return e.size||1},h=function(e){return e.shape||"circle"},p=!0,d=[],v=[],m=[],g=!0,y=null,b=function(e){return!e.notActive},w=!1,E=.1,S=!1,x=!0,T=function(){return 25},N=null,C=null,k=null,L=null,A=null,O=null,M=!1,_=d3.dispatch("elementClick","elementMouseover","elementMouseout"),D=!0,P,H,B,j,F=!1;return I.clearHighlights=function(){d3.selectAll(".nv-chart-"+s+" .nv-point.hover").classed("hover",!1)},I.highlightPoint=function(e,t,n){d3.select(".nv-chart-"+s+" .nv-series-"+e+" .nv-point-"+t).classed("hover",n)},_.on("elementMouseover.point",function(e){g&&I.highlightPoint(e.seriesIndex,e.pointIndex,!0)}),_.on("elementMouseout.point",function(e){g&&I.highlightPoint(e.seriesIndex,e.pointIndex,!1)}),I.dispatch=_,I.options=e.utils.optionsFunc.bind(I),I.x=function(e){return arguments.length?(f=d3.functor(e),I):f},I.y=function(e){return arguments.length?(l=d3.functor(e),I):l},I.size=function(e){return arguments.length?(c=d3.functor(e),I):c},I.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,I):t},I.width=function(e){return arguments.length?(n=e,I):n},I.height=function(e){return arguments.length?(r=e,I):r},I.xScale=function(e){return arguments.length?(o=e,I):o},I.yScale=function(e){return arguments.length?(u=e,I):u},I.zScale=function(e){return arguments.length?(a=e,I):a},I.xDomain=function(e){return arguments.length?(N=e,I):N},I.yDomain=function(e){return arguments.length?(C=e,I):C},I.sizeDomain=function(e){return arguments.length?(A=e,I):A},I.xRange=function(e){return arguments.length?(k=e,I):k},I.yRange=function(e){return arguments.length?(L=e,I):L},I.sizeRange=function(e){return arguments.length?(O=e,I):O},I.forceX=function(e){return arguments.length?(d=e,I):d},I.forceY=function(e){return arguments.length?(v=e,I):v},I.forceSize=function(e){return arguments.length?(m=e,I):m},I.interactive=function(e){return arguments.length?(g=e,I):g},I.pointKey=function(e){return arguments.length?(y=e,I):y},I.pointActive=function(e){return arguments.length?(b=e,I):b},I.padData=function(e){return arguments.length?(w=e,I):w},I.padDataOuter=function(e){return arguments.length?(E=e,I):E},I.clipEdge=function(e){return arguments.length?(S=e,I):S},I.clipVoronoi=function(e){return arguments.length?(x=e,I):x},I.useVoronoi=function(e){return arguments.length?(D=e,D===!1&&(x=!1),I):D},I.clipRadius=function(e){return arguments.length?(T=e,I):T},I.color=function(t){return arguments.length?(i=e.utils.getColor(t),I):i},I.shape=function(e){return arguments.length?(h=e,I):h},I.onlyCircles=function(e){return arguments.length?(p=e,I):p},I.id=function(e){return arguments.length?(s=e,I):s},I.singlePoint=function(e){return arguments.length?(M=e,I):M},I},e.models.scatterChart=function(){"use strict";function F(e){return e.each(function(e){function K(){if(T)return X.select(".nv-point-paths").style("pointer-events","all"),!1;X.select(".nv-point-paths").style("pointer-events","none");var i=d3.mouse(this);h.distortion(x).focus(i[0]),p.distortion(x).focus(i[1]),X.select(".nv-scatterWrap").call(t),b&&X.select(".nv-x.nv-axis").call(n),w&&X.select(".nv-y.nv-axis").call(r),X.select(".nv-distributionX").datum(e.filter(function(e){return!e.disabled})).call(o),X.select(".nv-distributionY").datum(e.filter(function(e){return!e.disabled})).call(u)}var C=d3.select(this),k=this,L=(f||parseInt(C.style("width"))||960)-a.left-a.right,I=(l||parseInt(C.style("height"))||400)-a.top-a.bottom;F.update=function(){C.transition().duration(D).call(F)},F.container=this,A.disabled=e.map(function(e){return!!e.disabled});if(!O){var q;O={};for(q in A)A[q]instanceof Array?O[q]=A[q].slice(0):O[q]=A[q]}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var R=C.selectAll(".nv-noData").data([_]);return R.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),R.attr("x",a.left+L/2).attr("y",a.top+I/2).text(function(e){return e}),F}C.selectAll(".nv-noData").remove(),P=P||h,H=H||p;var U=C.selectAll("g.nv-wrap.nv-scatterChart").data([e]),z=U.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+t.id()),W=z.append("g"),X=U.select("g");W.append("rect").attr("class","nvd3 nv-background"),W.append("g").attr("class","nv-x nv-axis"),W.append("g").attr("class","nv-y nv-axis"),W.append("g").attr("class","nv-scatterWrap"),W.append("g").attr("class","nv-distWrap"),W.append("g").attr("class","nv-legendWrap"),W.append("g").attr("class","nv-controlsWrap");if(y){var V=S?L/2:L;i.width(V),U.select(".nv-legendWrap").datum(e).call(i),a.top!=i.height()&&(a.top=i.height(),I=(l||parseInt(C.style("height"))||400)-a.top-a.bottom),U.select(".nv-legendWrap").attr("transform","translate("+(L-V)+","+ -a.top+")")}S&&(s.width(180).color(["#444"]),X.select(".nv-controlsWrap").datum(j).attr("transform","translate(0,"+ -a.top+")").call(s)),U.attr("transform","translate("+a.left+","+a.top+")"),E&&X.select(".nv-y.nv-axis").attr("transform","translate("+L+",0)"),t.width(L).height(I).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),d!==0&&t.xDomain(null),v!==0&&t.yDomain(null),U.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t);if(d!==0){var $=h.domain()[1]-h.domain()[0];t.xDomain([h.domain()[0]-d*$,h.domain()[1]+d*$])}if(v!==0){var J=p.domain()[1]-p.domain()[0];t.yDomain([p.domain()[0]-v*J,p.domain()[1]+v*J])}(v!==0||d!==0)&&U.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t),b&&(n.scale(h).ticks(n.ticks()&&n.ticks().length?n.ticks():L/100).tickSize(-I,0),X.select(".nv-x.nv-axis").attr("transform","translate(0,"+p.range()[0]+")").call(n)),w&&(r.scale(p).ticks(r.ticks()&&r.ticks().length?r.ticks():I/36).tickSize(-L,0),X.select(".nv-y.nv-axis").call(r)),m&&(o.getData(t.x()).scale(h).width(L).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),W.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),X.select(".nv-distributionX").attr("transform","translate(0,"+p.range()[0]+")").datum(e.filter(function(e){return!e.disabled})).call(o)),g&&(u.getData(t.y()).scale(p).width(I).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),W.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),X.select(".nv-distributionY").attr("transform","translate("+(E?L:-u.size())+",0)").datum(e.filter(function(e){return!e.disabled})).call(u)),d3.fisheye&&(X.select(".nv-background").attr("width",L).attr("height",I),X.select(".nv-background").on("mousemove",K),X.select(".nv-background").on("click",function(){T=!T}),t.dispatch.on("elementClick.freezeFisheye",function(){T=!T})),s.dispatch.on("legendClick",function(e,i){e.disabled=!e.disabled,x=e.disabled?0:2.5,X.select(".nv-background").style("pointer-events",e.disabled?"none":"all"),X.select(".nv-point-paths").style("pointer-events",e.disabled?"all":"none"),e.disabled?(h.distortion(x).focus(0),p.distortion(x).focus(0),X.select(".nv-scatterWrap").call(t),X.select(".nv-x.nv-axis").call(n),X.select(".nv-y.nv-axis").call(r)):T=!1,F.update()}),i.dispatch.on("stateChange",function(e){A.disabled=e.disabled,M.stateChange(A),F.update()}),t.dispatch.on("elementMouseover.tooltip",function(e){d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",function(t,n){return e.pos[1]-I}),d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",e.pos[0]+o.size()),e.pos=[e.pos[0]+a.left,e.pos[1]+a.top],M.tooltipShow(e)}),M.on("tooltipShow",function(e){N&&B(e,k.parentNode)}),M.on("changeState",function(t){typeof t.disabled!="undefined"&&(e.forEach(function(e,n){e.disabled=t.disabled[n]}),A.disabled=t.disabled),F.update()}),P=h.copy(),H=p.copy()}),F}var t=e.models.scatter(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.models.distribution(),u=e.models.distribution(),a={top:30,right:20,bottom:50,left:75},f=null,l=null,c=e.utils.defaultColor(),h=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.xScale(),p=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.yScale(),d=0,v=0,m=!1,g=!1,y=!0,b=!0,w=!0,E=!1,S=!!d3.fisheye,x=0,T=!1,N=!0,C=function(e,t,n){return"<strong>"+t+"</strong>"},k=function(e,t,n){return"<strong>"+n+"</strong>"},L=null,A={},O=null,M=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),_="No Data Available.",D=250;t.xScale(h).yScale(p),n.orient("bottom").tickPadding(10),r.orient(E?"right":"left").tickPadding(10),o.axis("x"),u.axis("y"),s.updateState(!1);var P,H,B=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),f=i.pos[0]+(s.offsetLeft||0),l=p.range()[0]+a.top+(s.offsetTop||0),c=h.range()[0]+a.left+(s.offsetLeft||0),d=i.pos[1]+(s.offsetTop||0),v=n.tickFormat()(t.x()(i.point,i.pointIndex)),m=r.tickFormat()(t.y()(i.point,i.pointIndex));C!=null&&e.tooltip.show([f,l],C(i.series.key,v,m,i,F),"n",1,s,"x-nvtooltip"),k!=null&&e.tooltip.show([c,d],k(i.series.key,v,m,i,F),"e",1,s,"y-nvtooltip"),L!=null&&e.tooltip.show([o,u],L(i.series.key,v,m,i,F),i.value<0?"n":"s",null,s)},j=[{key:"Magnify",disabled:!0}];return t.dispatch.on("elementMouseout.tooltip",function(e){M.tooltipHide(e),d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",0),d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",u.size())}),M.on("tooltipHide",function(){N&&e.tooltip.cleanup()}),F.dispatch=M,F.scatter=t,F.legend=i,F.controls=s,F.xAxis=n,F.yAxis=r,F.distX=o,F.distY=u,d3.rebind(F,t,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi"),F.options=e.utils.optionsFunc.bind(F),F.margin=function(e){return arguments.length?(a.top=typeof e.top!="undefined"?e.top:a.top,a.right=typeof e.right!="undefined"?e.right:a.right,a.bottom=typeof e.bottom!="undefined"?e.bottom:a.bottom,a.left=typeof e.left!="undefined"?e.left:a.left,F):a},F.width=function(e){return arguments.length?(f=e,F):f},F.height=function(e){return arguments.length?(l=e,F):l},F.color=function(t){return arguments.length?(c=e.utils.getColor(t),i.color(c),o.color(c),u.color(c),F):c},F.showDistX=function(e){return arguments.length?(m=e,F):m},F.showDistY=function(e){return arguments.length?(g=e,F):g},F.showControls=function(e){return arguments.length?(S=e,F):S},F.showLegend=function(e){return arguments.length?(y=e,F):y},F.showXAxis=function(e){return arguments.length?(b=e,F):b},F.showYAxis=function(e){return arguments.length?(w=e,F):w},F.rightAlignYAxis=function(e){return arguments.length?(E=e,r.orient(e?"right":"left"),F):E},F.fisheye=function(e){return arguments.length?(x=e,F):x},F.xPadding=function(e){return arguments.length?(d=e,F):d},F.yPadding=function(e){return arguments.length?(v=e,F):v},F.tooltips=function(e){return arguments.length?(N=e,F):N},F.tooltipContent=function(e){return arguments.length?(L=e,F):L},F.tooltipXContent=function(e){return arguments.length?(C=e,F):C},F.tooltipYContent=function(e){return arguments.length?(k=e,F):k},F.state=function(e){return arguments.length?(A=e,F):A},F.defaultState=function(e){return arguments.length?(O=e,F):O},F.noData=function(e){return arguments.length?(_=e,F):_},F.transitionDuration=function(e){return arguments.length?(D=e,F):D},F},e.models.scatterPlusLineChart=function(){"use strict";function B(e){return e.each(function(e){function $(){if(S)return z.select(".nv-point-paths").style("pointer-events","all"),!1;z.select(".nv-point-paths").style("pointer-events","none");var i=d3.mouse(this);h.distortion(E).focus(i[0]),p.distortion(E).focus(i[1]),z.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t),g&&z.select(".nv-x.nv-axis").call(n),y&&z.select(".nv-y.nv-axis").call(r),z.select(".nv-distributionX").datum(e.filter(function(e){return!e.disabled})).call(o),z.select(".nv-distributionY").datum(e.filter(function(e){return!e.disabled})).call(u)}var T=d3.select(this),N=this,C=(f||parseInt(T.style("width"))||960)-a.left-a.right,j=(l||parseInt(T.style("height"))||400)-a.top-a.bottom;B.update=function(){T.transition().duration(M).call(B)},B.container=this,k.disabled=e.map(function(e){return!!e.disabled});if(!L){var F;L={};for(F in k)k[F]instanceof Array?L[F]=k[F].slice(0):L[F]=k[F]}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var I=T.selectAll(".nv-noData").data([O]);return I.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),I.attr("x",a.left+C/2).attr("y",a.top+j/2).text(function(e){return e}),B}T.selectAll(".nv-noData").remove(),h=t.xScale(),p=t.yScale(),_=_||h,D=D||p;var q=T.selectAll("g.nv-wrap.nv-scatterChart").data([e]),R=q.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+t.id()),U=R.append("g"),z=q.select("g");U.append("rect").attr("class","nvd3 nv-background").style("pointer-events","none"),U.append("g").attr("class","nv-x nv-axis"),U.append("g").attr("class","nv-y nv-axis"),U.append("g").attr("class","nv-scatterWrap"),U.append("g").attr("class","nv-regressionLinesWrap"),U.append("g").attr("class","nv-distWrap"),U.append("g").attr("class","nv-legendWrap"),U.append("g").attr("class","nv-controlsWrap"),q.attr("transform","translate("+a.left+","+a.top+")"),b&&z.select(".nv-y.nv-axis").attr("transform","translate("+C+",0)"),m&&(i.width(C/2),q.select(".nv-legendWrap").datum(e).call(i),a.top!=i.height()&&(a.top=i.height(),j=(l||parseInt(T.style("height"))||400)-a.top-a.bottom),q.select(".nv-legendWrap").attr("transform","translate("+C/2+","+ -a.top+")")),w&&(s.width(180).color(["#444"]),z.select(".nv-controlsWrap").datum(H).attr("transform","translate(0,"+ -a.top+")").call(s)),t.width(C).height(j).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),q.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t),q.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+t.id()+")");var W=q.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(e){return e});W.enter().append("g").attr("class","nv-regLines");var X=W.selectAll(".nv-regLine").data(function(e){return[e]}),V=X.enter().append("line").attr("class","nv-regLine").style("stroke-opacity",0);X.transition().attr("x1",h.range()[0]).attr("x2",h.range()[1]).attr("y1",function(e,t){return p(h.domain()[0]*e.slope+e.intercept)}).attr("y2",function(e,t){return p(h.domain()[1]*e.slope+e.intercept)}).style("stroke",function(e,t,n){return c(e,n)}).style("stroke-opacity",function(e,t){return e.disabled||typeof e.slope=="undefined"||typeof e.intercept=="undefined"?0:1}),g&&(n.scale(h).ticks(n.ticks()?n.ticks():C/100).tickSize(-j,0),z.select(".nv-x.nv-axis").attr("transform","translate(0,"+p.range()[0]+")").call(n)),y&&(r.scale(p).ticks(r.ticks()?r.ticks():j/36).tickSize(-C,0),z.select(".nv-y.nv-axis").call(r)),d&&(o.getData(t.x()).scale(h).width(C).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),U.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),z.select(".nv-distributionX").attr("transform","translate(0,"+p.range()[0]+")").datum(e.filter(function(e){return!e.disabled})).call(o)),v&&(u.getData(t.y()).scale(p).width(j).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled})),U.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),z.select(".nv-distributionY").attr("transform","translate("+(b?C:-u.size())+",0)").datum(e.filter(function(e){return!e.disabled})).call(u)),d3.fisheye&&(z.select(".nv-background").attr("width",C).attr("height",j),z.select(".nv-background").on("mousemove",$),z.select(".nv-background").on("click",function(){S=!S}),t.dispatch.on("elementClick.freezeFisheye",function(){S=!S})),s.dispatch.on("legendClick",function(e,i){e.disabled=!e.disabled,E=e.disabled?0:2.5,z.select(".nv-background").style("pointer-events",e.disabled?"none":"all"),z.select(".nv-point-paths").style("pointer-events",e.disabled?"all":"none"),e.disabled?(h.distortion(E).focus(0),p.distortion(E).focus(0),z.select(".nv-scatterWrap").call(t),z.select(".nv-x.nv-axis").call(n),z.select(".nv-y.nv-axis").call(r)):S=!1,B.update()}),i.dispatch.on("stateChange",function(e){k=e,A.stateChange(k),B.update()}),t.dispatch.on("elementMouseover.tooltip",function(e){d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",e.pos[1]-j),d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",e.pos[0]+o.size()),e.pos=[e.pos[0]+a.left,e.pos[1]+a.top],A.tooltipShow(e)}),A.on("tooltipShow",function(e){x&&P(e,N.parentNode)}),A.on("changeState",function(t){typeof t.disabled!="undefined"&&(e.forEach(function(e,n){e.disabled=t.disabled[n]}),k.disabled=t.disabled),B.update()}),_=h.copy(),D=p.copy()}),B}var t=e.models.scatter(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.models.distribution(),u=e.models.distribution(),a={top:30,right:20,bottom:50,left:75},f=null,l=null,c=e.utils.defaultColor(),h=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.xScale(),p=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.yScale(),d=!1,v=!1,m=!0,g=!0,y=!0,b=!1,w=!!d3.fisheye,E=0,S=!1,x=!0,T=function(e,t,n){return"<strong>"+t+"</strong>"},N=function(e,t,n){return"<strong>"+n+"</strong>"},C=function(e,t,n,r){return"<h3>"+e+"</h3>"+"<p>"+r+"</p>"},k={},L=null,A=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"
),O="No Data Available.",M=250;t.xScale(h).yScale(p),n.orient("bottom").tickPadding(10),r.orient(b?"right":"left").tickPadding(10),o.axis("x"),u.axis("y"),s.updateState(!1);var _,D,P=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),f=i.pos[0]+(s.offsetLeft||0),l=p.range()[0]+a.top+(s.offsetTop||0),c=h.range()[0]+a.left+(s.offsetLeft||0),d=i.pos[1]+(s.offsetTop||0),v=n.tickFormat()(t.x()(i.point,i.pointIndex)),m=r.tickFormat()(t.y()(i.point,i.pointIndex));T!=null&&e.tooltip.show([f,l],T(i.series.key,v,m,i,B),"n",1,s,"x-nvtooltip"),N!=null&&e.tooltip.show([c,d],N(i.series.key,v,m,i,B),"e",1,s,"y-nvtooltip"),C!=null&&e.tooltip.show([o,u],C(i.series.key,v,m,i.point.tooltip,i,B),i.value<0?"n":"s",null,s)},H=[{key:"Magnify",disabled:!0}];return t.dispatch.on("elementMouseout.tooltip",function(e){A.tooltipHide(e),d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",0),d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",u.size())}),A.on("tooltipHide",function(){x&&e.tooltip.cleanup()}),B.dispatch=A,B.scatter=t,B.legend=i,B.controls=s,B.xAxis=n,B.yAxis=r,B.distX=o,B.distY=u,d3.rebind(B,t,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi"),B.options=e.utils.optionsFunc.bind(B),B.margin=function(e){return arguments.length?(a.top=typeof e.top!="undefined"?e.top:a.top,a.right=typeof e.right!="undefined"?e.right:a.right,a.bottom=typeof e.bottom!="undefined"?e.bottom:a.bottom,a.left=typeof e.left!="undefined"?e.left:a.left,B):a},B.width=function(e){return arguments.length?(f=e,B):f},B.height=function(e){return arguments.length?(l=e,B):l},B.color=function(t){return arguments.length?(c=e.utils.getColor(t),i.color(c),o.color(c),u.color(c),B):c},B.showDistX=function(e){return arguments.length?(d=e,B):d},B.showDistY=function(e){return arguments.length?(v=e,B):v},B.showControls=function(e){return arguments.length?(w=e,B):w},B.showLegend=function(e){return arguments.length?(m=e,B):m},B.showXAxis=function(e){return arguments.length?(g=e,B):g},B.showYAxis=function(e){return arguments.length?(y=e,B):y},B.rightAlignYAxis=function(e){return arguments.length?(b=e,r.orient(e?"right":"left"),B):b},B.fisheye=function(e){return arguments.length?(E=e,B):E},B.tooltips=function(e){return arguments.length?(x=e,B):x},B.tooltipContent=function(e){return arguments.length?(C=e,B):C},B.tooltipXContent=function(e){return arguments.length?(T=e,B):T},B.tooltipYContent=function(e){return arguments.length?(N=e,B):N},B.state=function(e){return arguments.length?(k=e,B):k},B.defaultState=function(e){return arguments.length?(L=e,B):L},B.noData=function(e){return arguments.length?(O=e,B):O},B.transitionDuration=function(e){return arguments.length?(M=e,B):M},B},e.models.sparkline=function(){"use strict";function d(e){return e.each(function(e){var i=n-t.left-t.right,d=r-t.top-t.bottom,v=d3.select(this);s.domain(l||d3.extent(e,u)).range(h||[0,i]),o.domain(c||d3.extent(e,a)).range(p||[d,0]);var m=v.selectAll("g.nv-wrap.nv-sparkline").data([e]),g=m.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline"),b=g.append("g"),w=m.select("g");m.attr("transform","translate("+t.left+","+t.top+")");var E=m.selectAll("path").data(function(e){return[e]});E.enter().append("path"),E.exit().remove(),E.style("stroke",function(e,t){return e.color||f(e,t)}).attr("d",d3.svg.line().x(function(e,t){return s(u(e,t))}).y(function(e,t){return o(a(e,t))}));var S=m.selectAll("circle.nv-point").data(function(e){function n(t){if(t!=-1){var n=e[t];return n.pointIndex=t,n}return null}var t=e.map(function(e,t){return a(e,t)}),r=n(t.lastIndexOf(o.domain()[1])),i=n(t.indexOf(o.domain()[0])),s=n(t.length-1);return[i,r,s].filter(function(e){return e!=null})});S.enter().append("circle"),S.exit().remove(),S.attr("cx",function(e,t){return s(u(e,e.pointIndex))}).attr("cy",function(e,t){return o(a(e,e.pointIndex))}).attr("r",2).attr("class",function(e,t){return u(e,e.pointIndex)==s.domain()[1]?"nv-point nv-currentValue":a(e,e.pointIndex)==o.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})}),d}var t={top:2,right:0,bottom:2,left:0},n=400,r=32,i=!0,s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=e.utils.getColor(["#000"]),l,c,h,p;return d.options=e.utils.optionsFunc.bind(d),d.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,d):t},d.width=function(e){return arguments.length?(n=e,d):n},d.height=function(e){return arguments.length?(r=e,d):r},d.x=function(e){return arguments.length?(u=d3.functor(e),d):u},d.y=function(e){return arguments.length?(a=d3.functor(e),d):a},d.xScale=function(e){return arguments.length?(s=e,d):s},d.yScale=function(e){return arguments.length?(o=e,d):o},d.xDomain=function(e){return arguments.length?(l=e,d):l},d.yDomain=function(e){return arguments.length?(c=e,d):c},d.xRange=function(e){return arguments.length?(h=e,d):h},d.yRange=function(e){return arguments.length?(p=e,d):p},d.animate=function(e){return arguments.length?(i=e,d):i},d.color=function(t){return arguments.length?(f=e.utils.getColor(t),d):f},d},e.models.sparklinePlus=function(){"use strict";function v(e){return e.each(function(c){function O(){if(a)return;var e=C.selectAll(".nv-hoverValue").data(u),r=e.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);e.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove(),e.attr("transform",function(e){return"translate("+s(t.x()(c[e],e))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1);if(!u.length)return;r.append("line").attr("x1",0).attr("y1",-n.top).attr("x2",0).attr("y2",b),r.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-n.top).attr("text-anchor","end").attr("dy",".9em"),C.select(".nv-hoverValue .nv-xValue").text(f(t.x()(c[u[0]],u[0]))),r.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-n.top).attr("text-anchor","start").attr("dy",".9em"),C.select(".nv-hoverValue .nv-yValue").text(l(t.y()(c[u[0]],u[0])))}function M(){function r(e,n){var r=Math.abs(t.x()(e[0],0)-n),i=0;for(var s=0;s<e.length;s++)Math.abs(t.x()(e[s],s)-n)<r&&(r=Math.abs(t.x()(e[s],s)-n),i=s);return i}if(a)return;var e=d3.mouse(this)[0]-n.left;u=[r(c,Math.round(s.invert(e)))],O()}var m=d3.select(this),g=(r||parseInt(m.style("width"))||960)-n.left-n.right,b=(i||parseInt(m.style("height"))||400)-n.top-n.bottom;v.update=function(){v(e)},v.container=this;if(!c||!c.length){var w=m.selectAll(".nv-noData").data([d]);return w.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),w.attr("x",n.left+g/2).attr("y",n.top+b/2).text(function(e){return e}),v}m.selectAll(".nv-noData").remove();var E=t.y()(c[c.length-1],c.length-1);s=t.xScale(),o=t.yScale();var S=m.selectAll("g.nv-wrap.nv-sparklineplus").data([c]),T=S.enter().append("g").attr("class","nvd3 nv-wrap nv-sparklineplus"),N=T.append("g"),C=S.select("g");N.append("g").attr("class","nv-sparklineWrap"),N.append("g").attr("class","nv-valueWrap"),N.append("g").attr("class","nv-hoverArea"),S.attr("transform","translate("+n.left+","+n.top+")");var k=C.select(".nv-sparklineWrap");t.width(g).height(b),k.call(t);var L=C.select(".nv-valueWrap"),A=L.selectAll(".nv-currentValue").data([E]);A.enter().append("text").attr("class","nv-currentValue").attr("dx",p?-8:8).attr("dy",".9em").style("text-anchor",p?"end":"start"),A.attr("x",g+(p?n.right:0)).attr("y",h?function(e){return o(e)}:0).style("fill",t.color()(c[c.length-1],c.length-1)).text(l(E)),N.select(".nv-hoverArea").append("rect").on("mousemove",M).on("click",function(){a=!a}).on("mouseout",function(){u=[],O()}),C.select(".nv-hoverArea rect").attr("transform",function(e){return"translate("+ -n.left+","+ -n.top+")"}).attr("width",g+n.left+n.right).attr("height",b+n.top)}),v}var t=e.models.sparkline(),n={top:15,right:100,bottom:10,left:50},r=null,i=null,s,o,u=[],a=!1,f=d3.format(",r"),l=d3.format(",.2f"),c=!0,h=!0,p=!1,d="No Data Available.";return v.sparkline=t,d3.rebind(v,t,"x","y","xScale","yScale","color"),v.options=e.utils.optionsFunc.bind(v),v.margin=function(e){return arguments.length?(n.top=typeof e.top!="undefined"?e.top:n.top,n.right=typeof e.right!="undefined"?e.right:n.right,n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom,n.left=typeof e.left!="undefined"?e.left:n.left,v):n},v.width=function(e){return arguments.length?(r=e,v):r},v.height=function(e){return arguments.length?(i=e,v):i},v.xTickFormat=function(e){return arguments.length?(f=e,v):f},v.yTickFormat=function(e){return arguments.length?(l=e,v):l},v.showValue=function(e){return arguments.length?(c=e,v):c},v.alignValue=function(e){return arguments.length?(h=e,v):h},v.rightAlignValue=function(e){return arguments.length?(p=e,v):p},v.noData=function(e){return arguments.length?(d=e,v):d},v},e.models.stackedArea=function(){"use strict";function g(e){return e.each(function(e){var a=n-t.left-t.right,g=r-t.top-t.bottom,b=d3.select(this);p=v.xScale(),d=v.yScale(),e=e.map(function(e,t){return e.seriesIndex=t,e.values=e.values.map(function(e,n){return e.index=n,e.seriesIndex=t,e}),e});var w=e.filter(function(e){return!e.disabled});e=d3.layout.stack().order(l).offset(f).values(function(e){return e.values}).x(o).y(u).out(function(e,t,n){var r=u(e)===0?0:n;e.display={y:r,y0:t}})(w);var E=b.selectAll("g.nv-wrap.nv-stackedarea").data([e]),S=E.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedarea"),T=S.append("defs"),N=S.append("g"),C=E.select("g");N.append("g").attr("class","nv-areaWrap"),N.append("g").attr("class","nv-scatterWrap"),E.attr("transform","translate("+t.left+","+t.top+")"),v.width(a).height(g).x(o).y(function(e){return e.display.y+e.display.y0}).forceY([0]).color(e.map(function(e,t){return e.color||i(e,e.seriesIndex)}));var k=C.select(".nv-scatterWrap").datum(e);k.call(v),T.append("clipPath").attr("id","nv-edge-clip-"+s).append("rect"),E.select("#nv-edge-clip-"+s+" rect").attr("width",a).attr("height",g),C.attr("clip-path",h?"url(#nv-edge-clip-"+s+")":"");var L=d3.svg.area().x(function(e,t){return p(o(e,t))}).y0(function(e){return d(e.display.y0)}).y1(function(e){return d(e.display.y+e.display.y0)}).interpolate(c),A=d3.svg.area().x(function(e,t){return p(o(e,t))}).y0(function(e){return d(e.display.y0)}).y1(function(e){return d(e.display.y0)}),O=C.select(".nv-areaWrap").selectAll("path.nv-area").data(function(e){return e});O.enter().append("path").attr("class",function(e,t){return"nv-area nv-area-"+t}).attr("d",function(e,t){return A(e.values,e.seriesIndex)}).on("mouseover",function(e,t){d3.select(this).classed("hover",!0),m.areaMouseover({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t})}).on("mouseout",function(e,t){d3.select(this).classed("hover",!1),m.areaMouseout({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t})}).on("click",function(e,t){d3.select(this).classed("hover",!1),m.areaClick({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t})}),O.exit().transition().attr("d",function(e,t){return A(e.values,t)}).remove(),O.style("fill",function(e,t){return e.color||i(e,e.seriesIndex)}).style("stroke",function(e,t){return e.color||i(e,e.seriesIndex)}),O.transition().attr("d",function(e,t){return L(e.values,t)}),v.dispatch.on("elementMouseover.area",function(e){C.select(".nv-chart-"+s+" .nv-area-"+e.seriesIndex).classed("hover",!0)}),v.dispatch.on("elementMouseout.area",function(e){C.select(".nv-chart-"+s+" .nv-area-"+e.seriesIndex).classed("hover",!1)})}),g}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e5),o=function(e){return e.x},u=function(e){return e.y},a="stack",f="zero",l="default",c="linear",h=!1,p,d,v=e.models.scatter(),m=d3.dispatch("tooltipShow","tooltipHide","areaClick","areaMouseover","areaMouseout");return v.size(2.2).sizeDomain([2.2,2.2]),v.dispatch.on("elementClick.area",function(e){m.areaClick(e)}),v.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],m.tooltipShow(e)}),v.dispatch.on("elementMouseout.tooltip",function(e){m.tooltipHide(e)}),g.dispatch=m,g.scatter=v,d3.rebind(g,v,"interactive","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","forceX","forceY","forceSize","clipVoronoi","useVoronoi","clipRadius","highlightPoint","clearHighlights"),g.options=e.utils.optionsFunc.bind(g),g.x=function(e){return arguments.length?(o=d3.functor(e),g):o},g.y=function(e){return arguments.length?(u=d3.functor(e),g):u},g.margin=function(e){return arguments.length?(t.top=typeof e.top!="undefined"?e.top:t.top,t.right=typeof e.right!="undefined"?e.right:t.right,t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom,t.left=typeof e.left!="undefined"?e.left:t.left,g):t},g.width=function(e){return arguments.length?(n=e,g):n},g.height=function(e){return arguments.length?(r=e,g):r},g.clipEdge=function(e){return arguments.length?(h=e,g):h},g.color=function(t){return arguments.length?(i=e.utils.getColor(t),g):i},g.offset=function(e){return arguments.length?(f=e,g):f},g.order=function(e){return arguments.length?(l=e,g):l},g.style=function(e){if(!arguments.length)return a;a=e;switch(a){case"stack":g.offset("zero"),g.order("default");break;case"stream":g.offset("wiggle"),g.order("inside-out");break;case"stream-center":g.offset("silhouette"),g.order("inside-out");break;case"expand":g.offset("expand"),g.order("default")}return g},g.interpolate=function(e){return arguments.length?(c=e,g):c},g},e.models.stackedAreaChart=function(){"use strict";function O(y){return y.each(function(y){var M=d3.select(this),_=this,D=(a||parseInt(M.style("width"))||960)-u.left-u.right,P=(f||parseInt(M.style("height"))||400)-u.top-u.bottom;O.update=function(){M.transition().duration(L).call(O)},O.container=this,S.disabled=y.map(function(e){return!!e.disabled});if(!x){var H;x={};for(H in S)S[H]instanceof Array?x[H]=S[H].slice(0):x[H]=S[H]}if(!y||!y.length||!y.filter(function(e){return e.values.length}).length){var B=M.selectAll(".nv-noData").data([T]);return B.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),B.attr("x",u.left+D/2).attr("y",u.top+P/2).text(function(e){return e}),O}M.selectAll(".nv-noData").remove(),b=t.xScale(),w=t.yScale();var j=M.selectAll("g.nv-wrap.nv-stackedAreaChart").data([y]),F=j.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g"),I=j.select("g");F.append("rect").style("opacity",0),F.append("g").attr("class","nv-x nv-axis"),F.append("g").attr("class","nv-y nv-axis"),F.append("g").attr("class","nv-stackedWrap"),F.append("g").attr("class","nv-legendWrap"),F.append("g").attr("class","nv-controlsWrap"),F.append("g").attr("class","nv-interactive"),I.select("rect").attr("width",D).attr("height",P);if(h){var q=c?D-C:D;i.width(q),I.select(".nv-legendWrap").datum(y).call(i),u.top!=i.height()&&(u.top=i.height(),P=(f||parseInt(M.style("height"))||400)-u.top-u.bottom),I.select(".nv-legendWrap").attr("transform","translate("+(D-q)+","+ -u.top+")")}if(c){var R=[{key:"Stacked",disabled:t.offset()!="zero"},{key:"Stream",disabled:t.offset()!="wiggle"},{key:"Expanded",disabled:t.offset()!="expand"}];C=k.length/3*260,R=R.filter(function(e){return k.indexOf(e.key)>-1}),s.width(C).color(["#444","#444","#444"]),I.select(".nv-controlsWrap").datum(R).call(s),u.top!=Math.max(s.height(),i.height())&&(u.top=Math.max(s.height(),i.height()),P=(f||parseInt(M.style("height"))||400)-u.top-u.bottom),I.select(".nv-controlsWrap").attr("transform","translate(0,"+ -u.top+")")}j.attr("transform","translate("+u.left+","+u.top+")"),v&&I.select(".nv-y.nv-axis").attr("transform","translate("+D+",0)"),m&&(o.width(D).height(P).margin({left:u.left,top:u.top}).svgContainer(M).xScale(b),j.select(".nv-interactive").call(o)),t.width(D).height(P);var U=I.select(".nv-stackedWrap").datum(y);U.transition().call(t),p&&(n.scale(b).ticks(D/100).tickSize(-P,0),I.select(".nv-x.nv-axis").attr("transform","translate(0,"+P+")"),I.select(".nv-x.nv-axis").transition().duration(0).call(n)),d&&(r.scale(w).ticks(t.offset()=="wiggle"?0:P/36).tickSize(-D,0).setTickFormat(t.offset()=="expand"?d3.format("%"):E),I.select(".nv-y.nv-axis").transition().duration(0).call(r)),t.dispatch.on("areaClick.toggle",function(e){y.filter(function(e){return!e.disabled}).length===1?y=y.map(function(e){return e.disabled=!1,e}):y=y.map(function(t,n){return t.disabled=n!=e.seriesIndex,t}),S.disabled=y.map(function(e){return!!e.disabled}),N.stateChange(S),O.update()}),i.dispatch.on("stateChange",function(e){S.disabled=e.disabled,N.stateChange(S),O.update()}),s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;R=R.map(function(e){return e.disabled=!0,e}),e.disabled=!1;switch(e.key){case"Stacked":t.style("stack");break;case"Stream":t.style("stream");break;case"Expanded":t.style("expand")}S.style=t.style(),N.stateChange(S),O.update()}),o.dispatch.on("elementMousemove",function(i){t.clearHighlights();var s,a,f,c=[];y.filter(function(e,t){return e.seriesIndex=t,!e.disabled}).forEach(function(n,r){a=e.interactiveBisect(n.values,i.pointXValue,O.x()),t.highlightPoint(r,a,!0);var o=n.values[a];if(typeof o=="undefined")return;typeof s=="undefined"&&(s=o),typeof f=="undefined"&&(f=O.xScale()(O.x()(o,a))),c.push({key:n.key,value:O.y()(o,a),color:l(n,n.seriesIndex)})});var h=n.tickFormat()(O.x()(s,a));o.tooltip.position({left:f+u.left,top:i.mouseY+u.top}).chartContainer(_.parentNode).enabled(g).valueFormatter(function(e,t){return r.tickFormat()(e)}).data({value:h,series:c})(),o.renderGuideLine(f)}),o.dispatch.on("elementMouseout",function(e){N.tooltipHide(),t.clearHighlights()}),N.on("tooltipShow",function(e){g&&A(e,_.parentNode)}),N.on("changeState",function(e){typeof e.disabled!="undefined"&&(y.forEach(function(t,n){t.disabled=e.disabled[n]}),S.disabled=e.disabled),typeof e.style!="undefined"&&t.style(e.style),O.update()})}),O}var t=e.models.stackedArea(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.interactiveGuideline(),u={top:30,right:25,bottom:50,left:60},a=null,f=null,l=e.utils.defaultColor(),c=!0,h=!0,p=!0,d=!0,v=!1,m=!1,g=!0,y=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" on "+t+"</p>"},b,w,E=d3.format(",.2f"),S={style:t.style()},x=null,T="No Data Available.",N=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),C=250,k=["Stacked","Stream","Expanded"],L=250;n.orient("bottom").tickPadding(7),r.orient(v?"right":"left"),s.updateState(!1);var A=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=y(i.series.key,a,f,i,O);e.tooltip.show([o,u],l,i.value<0?"n":"s",null,s)};return t.dispatch.on("tooltipShow",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top],N.tooltipShow(e)}),t.dispatch.on("tooltipHide",function(e){N.tooltipHide(e)}),N.on("tooltipHide",function(){g&&e.tooltip.cleanup()}),O.dispatch=N,O.stacked=t,O.legend=i,O.controls=s,O.xAxis=n,O.yAxis=r,O.interactiveLayer=o,d3.rebind(O,t,"x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","sizeDomain","interactive","useVoronoi","offset","order","style","clipEdge","forceX","forceY","forceSize","interpolate"),O.options=e.utils.optionsFunc.bind(O),O.margin=function(e){return arguments.length?(u.top=typeof e.top!="undefined"?e.top:u.top,u.right=typeof e.right!="undefined"?e.right:u.right,u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom,u.left=typeof e.left!="undefined"?e.left:u.left,O):u},O.width=function(e){return arguments.length?(a=e,O):a},O.height=function(e){return arguments.length?(f=e,O):f},O.color=function(n){return arguments.length?(l=e.utils.getColor(n),i.color(l),t.color(l),O):l},O.showControls=function(e){return arguments.length?(c=e,O):c},O.showLegend=function(e){return arguments.length?(h=e,O):h},O.showXAxis=function(e){return arguments.length?(p=e,O):p},O.showYAxis=function(e){return arguments.length?(d=e,O):d},O.rightAlignYAxis=function(e){return arguments.length?(v=e,r.orient(e?"right":"left"),O):v},O.useInteractiveGuideline=function(e){return arguments.length?(m=e,e===!0&&(O.interactive(!1),O.useVoronoi(!1)),O):m},O.tooltip=function(e){return arguments.length?(y=e,O):y},O.tooltips=function(e){return arguments.length?(g=e,O):g},O.tooltipContent=function(e){return arguments.length?(y=e,O):y},O.state=function(e){return arguments.length?(S=e,O):S},O.defaultState=function(e){return arguments.length?(x=e,O):x},O.noData=function(e){return arguments.length?(T=e,O):T},O.transitionDuration=function(e){return arguments.length?(L=e,O):L},O.controlsData=function(e){return arguments.length?(k=e,O):k},r.setTickFormat=r.tickFormat,r.tickFormat=function(e){return arguments.length?(E=e,r):E},O}})();
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='http://dimplejs.org/dist/dimple.v1.min.js' type='text/javascript'></script>
<style>
.rChart {
display: block;
margin-left: auto;
margin-right: auto;
width: 800px;
height: 270px;
}
</style>
</head>
<body>
<div id='chart322014917ab9' class='rChart dimple'></div>
<script type="text/javascript">
(function(){
var opts = {
"dom": "chart322014917ab9",
"width": 800,
"height": 270,
"x": "x",
"y": "y",
"groups": "x",
"type": "line",
"id": "chart322014917ab9"
},
data = [{"x":1,"y":0},{"x":2,"y":0.519755344280593},{"x":3,"y":0.852804496150694},{"x":4,"y":1.0521228241893},{"x":5,"y":1.19259400101479},{"x":6,"y":1.30014078784558},{"x":7,"y":1.38677446135416},{"x":8,"y":1.45901407744181},{"x":9,"y":1.5207781907028},{"x":10,"y":1.57459830134575},{"x":11,"y":1.62220034944506},{"x":12,"y":1.66481138797494},{"x":13,"y":1.70333354714968},{"x":14,"y":1.7384485625712},{"x":15,"y":1.77068358359484},{"x":16,"y":1.80045423931022},{"x":17,"y":1.82809375632312},{"x":18,"y":1.85387320299365},{"x":19,"y":1.87801590836746},{"x":20,"y":1.9007079511812},{"x":21,"y":1.92210593347019},{"x":22,"y":1.94234283787593},{"x":23,"y":1.96153250688207},{"x":24,"y":1.97977311416156},{"x":25,"y":1.99714988746736},{"x":26,"y":2.01373726799518},{"x":27,"y":2.02960064008598},{"x":28,"y":2.04479772954574},{"x":29,"y":2.05937974366711},{"x":30,"y":2.07339230794995},{"x":31,"y":2.08687624136121},{"x":32,"y":2.09986820228938},{"x":33,"y":2.11240123013782},{"x":34,"y":2.12450520207801},{"x":35,"y":2.1362072203641},{"x":36,"y":2.14753194245347},{"x":37,"y":2.15850186373753},{"x":38,"y":2.16913756078662},{"x":39,"y":2.17945790152052},{"x":40,"y":2.18948022753717},{"x":41,"y":2.19922051289386},{"x":42,"y":2.20869350288387},{"x":43,"y":2.21791283574688},{"x":44,"y":2.2268911497611},{"x":45,"y":2.2356401777664},{"x":46,"y":2.24417083084101},{"x":47,"y":2.2524932725859},{"x":48,"y":2.26061698524928},{"x":49,"y":2.26855082873938},{"x":50,"y":2.27630309342035},{"x":51,"y":2.28388154745803},{"x":52,"y":2.29129347937433},{"x":53,"y":2.29854573637821},{"x":54,"y":2.30564475896464},{"x":55,"y":2.3125966122073},{"x":56,"y":2.31940701411583},{"x":57,"y":2.32608136138038},{"x":58,"y":2.33262475278631},{"x":59,"y":2.33904201054619},{"x":60,"y":2.34533769976701},{"x":61,"y":2.35151614624379},{"x":62,"y":2.35758145274893},{"x":63,"y":2.36353751396645},{"x":64,"y":2.36938803020401},{"x":65,"y":2.37513652000004},{"x":66,"y":2.38078633173091},{"x":67,"y":2.38634065431133},{"x":68,"y":2.39180252707143},{"x":69,"y":2.39717484888506},{"x":70,"y":2.40246038661611},{"x":71,"y":2.40766178294298},{"x":72,"y":2.41278156361493},{"x":73,"y":2.41782214418915},{"x":74,"y":2.42278583629208},{"x":75,"y":2.42767485344482},{"x":76,"y":2.43249131648827},{"x":77,"y":2.43723725864043},{"x":78,"y":2.44191463021535},{"x":79,"y":2.44652530303035},{"x":80,"y":2.45107107452589},{"x":81,"y":2.45555367162003},{"x":82,"y":2.45997475431798},{"x":83,"y":2.46433591909465},{"x":84,"y":2.46863870206753},{"x":85,"y":2.47288458197488},{"x":86,"y":2.47707498297353},{"x":87,"y":2.48121127726919},{"x":88,"y":2.48529478759093},{"x":89,"y":2.48932678952103},{"x":90,"y":2.49330851368997},{"x":91,"y":2.49724114784578},{"x":92,"y":2.50112583880645},{"x":93,"y":2.50496369430297},{"x":94,"y":2.5087557847204},{"x":95,"y":2.51250314474359},{"x":96,"y":2.51620677491373},{"x":97,"y":2.5198676431014},{"x":98,"y":2.52348668590152},{"x":99,"y":2.52706480995499},{"x":100,"y":2.53060289320168},{"x":101,"y":2.53410178606884},{"x":102,"y":2.53756231259907},{"x":103,"y":2.54098527152129},{"x":104,"y":2.54437143726828},{"x":105,"y":2.54772156094384},{"x":106,"y":2.55103637124254},{"x":107,"y":2.55431657532488},{"x":108,"y":2.55756285965032},{"x":109,"y":2.56077589077065},{"x":110,"y":2.5639563160859},{"x":111,"y":2.56710476456497},{"x":112,"y":2.57022184743274},{"x":113,"y":2.57330815882572},{"x":114,"y":2.57636427641784},{"x":115,"y":2.579390762018},{"x":116,"y":2.58238816214083},{"x":117,"y":2.58535700855229},{"x":118,"y":2.58829781879115},{"x":119,"y":2.5912110966678},{"x":120,"y":2.59409733274153},{"x":121,"y":2.59695700477729},{"x":122,"y":2.59979057818311},{"x":123,"y":2.60259850642904},{"x":124,"y":2.60538123144861},{"x":125,"y":2.60813918402358},{"x":126,"y":2.61087278415296},{"x":127,"y":2.61358244140692},{"x":128,"y":2.61626855526633},{"x":129,"y":2.61893151544876},{"x":130,"y":2.62157170222143},{"x":131,"y":2.6241894867018},{"x":132,"y":2.62678523114634},{"x":133,"y":2.6293592892281},{"x":134,"y":2.63191200630351},{"x":135,"y":2.63444371966899},{"x":136,"y":2.63695475880778},{"x":137,"y":2.63944544562737},{"x":138,"y":2.64191609468816},{"x":139,"y":2.64436701342349},{"x":140,"y":2.64679850235155},{"x":141,"y":2.64921085527959},{"x":142,"y":2.65160435950063},{"x":143,"y":2.653979295983},{"x":144,"y":2.65633593955318},{"x":145,"y":2.65867455907206},{"x":146,"y":2.66099541760494},{"x":147,"y":2.66329877258556},{"x":148,"y":2.66558487597443},{"x":149,"y":2.6678539744116},{"x":150,"y":2.67010630936423},{"x":151,"y":2.67234211726906},{"x":152,"y":2.67456162967007},{"x":153,"y":2.67676507335142},{"x":154,"y":2.67895267046602},{"x":155,"y":2.68112463865974},{"x":156,"y":2.68328119119155},{"x":157,"y":2.68542253704965},{"x":158,"y":2.68754888106388},{"x":159,"y":2.68966042401439},{"x":160,"y":2.69175736273686},{"x":161,"y":2.69383989022431},{"x":162,"y":2.69590819572569},{"x":163,"y":2.69796246484134},{"x":164,"y":2.7000028796154},{"x":165,"y":2.7020296186254},{"x":166,"y":2.70404285706897},{"x":167,"y":2.70604276684798},{"x":168,"y":2.70802951664999},{"x":169,"y":2.71000327202725},{"x":170,"y":2.71196419547333},{"x":171,"y":2.71391244649742},{"x":172,"y":2.71584818169632},{"x":173,"y":2.71777155482444},{"x":174,"y":2.71968271686156},{"x":175,"y":2.7215818160787},{"x":176,"y":2.72346899810198},{"x":177,"y":2.72534440597473},{"x":178,"y":2.72720818021766},{"x":179,"y":2.72906045888737},{"x":180,"y":2.73090137763324},{"x":181,"y":2.73273106975252},{"x":182,"y":2.73454966624407},{"x":183,"y":2.73635729586041},{"x":184,"y":2.73815408515844},{"x":185,"y":2.73994015854866},{"x":186,"y":2.74171563834304},{"x":187,"y":2.74348064480161},{"x":188,"y":2.74523529617776},{"x":189,"y":2.74697970876221},{"x":190,"y":2.74871399692595},{"x":191,"y":2.75043827316188},{"x":192,"y":2.75215264812541},{"x":193,"y":2.75385723067395},{"x":194,"y":2.75555212790532},{"x":195,"y":2.75723744519521},{"x":196,"y":2.75891328623361},{"x":197,"y":2.76057975306025},{"x":198,"y":2.76223694609927},{"x":199,"y":2.76388496419273},{"x":200,"y":2.76552390463355},{"x":201,"y":2.76715386319737},{"x":202,"y":2.76877493417376},{"x":203,"y":2.7703872103965},{"x":204,"y":2.77199078327322},{"x":205,"y":2.77358574281419},{"x":206,"y":2.77517217766049},{"x":207,"y":2.77675017511137},{"x":208,"y":2.77831982115103},{"x":209,"y":2.77988120047467},{"x":210,"y":2.78143439651396},{"x":211,"y":2.7829794914618},{"x":212,"y":2.7845165662966},{"x":213,"y":2.78604570080586},{"x":214,"y":2.78756697360923},{"x":215,"y":2.78908046218103},{"x":216,"y":2.79058624287224},{"x":217,"y":2.79208439093192},{"x":218,"y":2.7935749805281},{"x":219,"y":2.79505808476836},{"x":220,"y":2.79653377571965},{"x":221,"y":2.79800212442788},{"x":222,"y":2.79946320093698},{"x":223,"y":2.80091707430746},{"x":224,"y":2.8023638126346},{"x":225,"y":2.80380348306624},{"x":226,"y":2.80523615182015},{"x":227,"y":2.80666188420095},{"x":228,"y":2.80808074461675},{"x":229,"y":2.80949279659531},{"x":230,"y":2.81089810279992},{"x":231,"y":2.81229672504488},{"x":232,"y":2.81368872431067},{"x":233,"y":2.81507416075874},{"x":234,"y":2.81645309374602},{"x":235,"y":2.81782558183909},{"x":236,"y":2.81919168282801},{"x":237,"y":2.82055145373995},{"x":238,"y":2.82190495085238},{"x":239,"y":2.82325222970613},{"x":240,"y":2.82459334511802},{"x":241,"y":2.82592835119336},{"x":242,"y":2.82725730133805},{"x":243,"y":2.82858024827057},{"x":244,"y":2.82989724403358},{"x":245,"y":2.83120834000533},{"x":246,"y":2.8325135869109},{"x":247,"y":2.83381303483306},{"x":248,"y":2.83510673322304},{"x":249,"y":2.83639473091103},{"x":250,"y":2.83767707611642},{"x":251,"y":2.83895381645788},{"x":252,"y":2.84022499896324},{"x":253,"y":2.84149067007915},{"x":254,"y":2.84275087568048},{"x":255,"y":2.84400566107972},{"x":256,"y":2.84525507103596},{"x":257,"y":2.84649914976385},{"x":258,"y":2.84773794094228},{"x":259,"y":2.84897148772299},{"x":260,"y":2.85019983273896},{"x":261,"y":2.85142301811253},{"x":262,"y":2.85264108546363},{"x":263,"y":2.85385407591749},{"x":264,"y":2.85506203011254},{"x":265,"y":2.85626498820795},{"x":266,"y":2.85746298989104},{"x":267,"y":2.85865607438466},{"x":268,"y":2.85984428045432},{"x":269,"y":2.86102764641522},{"x":270,"y":2.86220621013911},{"x":271,"y":2.86338000906116},{"x":272,"y":2.86454908018648},{"x":273,"y":2.86571346009671},{"x":274,"y":2.86687318495633},{"x":275,"y":2.86802829051907},{"x":276,"y":2.86917881213391},{"x":277,"y":2.87032478475118},{"x":278,"y":2.87146624292851},{"x":279,"y":2.87260322083664},{"x":280,"y":2.87373575226509},{"x":281,"y":2.87486387062782},{"x":282,"y":2.87598760896871},{"x":283,"y":2.87710699996696},{"x":284,"y":2.87822207594239},{"x":285,"y":2.87933286886068},{"x":286,"y":2.88043941033849},{"x":287,"y":2.88154173164842},{"x":288,"y":2.88263986372403},{"x":289,"y":2.88373383716461},{"x":290,"y":2.88482368224007},{"x":291,"y":2.88590942889541},{"x":292,"y":2.88699110675552},{"x":293,"y":2.88806874512959},{"x":294,"y":2.88914237301556},{"x":295,"y":2.89021201910452},{"x":296,"y":2.89127771178492},{"x":297,"y":2.89233947914683},{"x":298,"y":2.89339734898606},{"x":299,"y":2.89445134880828},{"x":300,"y":2.89550150583289},{"x":301,"y":2.89654784699706},{"x":302,"y":2.89759039895958},{"x":303,"y":2.8986291881046},{"x":304,"y":2.8996642405454},{"x":305,"y":2.90069558212804},{"x":306,"y":2.90172323843501},{"x":307,"y":2.90274723478868},{"x":308,"y":2.90376759625492},{"x":309,"y":2.90478434764641},{"x":310,"y":2.90579751352608},{"x":311,"y":2.90680711821042},{"x":312,"y":2.90781318577268},{"x":313,"y":2.9088157400462},{"x":314,"y":2.90981480462744},{"x":315,"y":2.91081040287916},{"x":316,"y":2.91180255793343},{"x":317,"y":2.91279129269471},{"x":318,"y":2.91377662984268},{"x":319,"y":2.91475859183527},{"x":320,"y":2.91573720091148},{"x":321,"y":2.91671247909417},{"x":322,"y":2.91768444819283},{"x":323,"y":2.91865312980636},{"x":324,"y":2.9196185453257},{"x":325,"y":2.9205807159365},{"x":326,"y":2.92153966262173},{"x":327,"y":2.9224954061642},{"x":328,"y":2.92344796714908},{"x":329,"y":2.92439736596643},{"x":330,"y":2.9253436228136},{"x":331,"y":2.92628675769763},{"x":332,"y":2.92722679043766},{"x":333,"y":2.9281637406672},{"x":334,"y":2.92909762783646},{"x":335,"y":2.93002847121458},{"x":336,"y":2.9309562898919},{"x":337,"y":2.93188110278213},{"x":338,"y":2.93280292862445},{"x":339,"y":2.93372178598575},{"x":340,"y":2.93463769326263},{"x":341,"y":2.93555066868344},{"x":342,"y":2.93646073031044},{"x":343,"y":2.93736789604163},{"x":344,"y":2.93827218361288},{"x":345,"y":2.93917361059975},{"x":346,"y":2.94007219441944},{"x":347,"y":2.94096795233273},{"x":348,"y":2.94186090144571},{"x":349,"y":2.94275105871175},{"x":350,"y":2.94363844093321},{"x":351,"y":2.9445230647632},{"x":352,"y":2.9454049467074},{"x":353,"y":2.94628410312578},{"x":354,"y":2.9471605502342},{"x":355,"y":2.94803430410622},{"x":356,"y":2.94890538067464},{"x":357,"y":2.94977379573315},{"x":358,"y":2.95063956493801},{"x":359,"y":2.95150270380954},{"x":360,"y":2.95236322773368},{"x":361,"y":2.95322115196362},{"x":362,"y":2.95407649162117},{"x":363,"y":2.95492926169837},{"x":364,"y":2.95577947705892},{"x":365,"y":2.95662715243964},{"x":366,"y":2.95747230245185},{"x":367,"y":2.95831494158284},{"x":368,"y":2.95915508419727},{"x":369,"y":2.95999274453845},{"x":370,"y":2.9608279367298},{"x":371,"y":2.96166067477611},{"x":372,"y":2.96249097256491},{"x":373,"y":2.9633188438677},{"x":374,"y":2.96414430234129},{"x":375,"y":2.96496736152902},{"x":376,"y":2.96578803486205},{"x":377,"y":2.96660633566053},{"x":378,"y":2.96742227713488},{"x":379,"y":2.96823587238689},{"x":380,"y":2.96904713441098},{"x":381,"y":2.96985607609535},{"x":382,"y":2.97066271022307},{"x":383,"y":2.9714670494733},{"x":384,"y":2.97226910642233},{"x":385,"y":2.97306889354471},{"x":386,"y":2.97386642321435},{"x":387,"y":2.97466170770558},{"x":388,"y":2.97545475919417},{"x":389,"y":2.97624558975846},{"x":390,"y":2.97703421138031},{"x":391,"y":2.97782063594618},{"x":392,"y":2.97860487524809},{"x":393,"y":2.97938694098458},{"x":394,"y":2.98016684476177},{"x":395,"y":2.98094459809429},{"x":396,"y":2.98172021240624},{"x":397,"y":2.98249369903207},{"x":398,"y":2.98326506921756},{"x":399,"y":2.9840343341208},{"x":400,"y":2.98480150481294},{"x":401,"y":2.98556659227922},{"x":402,"y":2.98632960741978},{"x":403,"y":2.98709056105058},{"x":404,"y":2.98784946390419},{"x":405,"y":2.98860632663068},{"x":406,"y":2.98936115979848},{"x":407,"y":2.99011397389518},{"x":408,"y":2.99086477932831},{"x":409,"y":2.99161358642625},{"x":410,"y":2.9923604054389},{"x":411,"y":2.99310524653853},{"x":412,"y":2.99384811982062},{"x":413,"y":2.9945890353045},{"x":414,"y":2.99532800293418},{"x":415,"y":2.99606503257907},{"x":416,"y":2.99680013403479},{"x":417,"y":2.99753331702378},{"x":418,"y":2.99826459119611},{"x":419,"y":2.9989939661302},{"x":420,"y":2.99972145133344},{"x":421,"y":3.00044705624296},{"x":422,"y":3.00117079022629},{"x":423,"y":3.001892662582},{"x":424,"y":3.00261268254052},{"x":425,"y":3.00333085926454},{"x":426,"y":3.00404720184994},{"x":427,"y":3.00476171932623},{"x":428,"y":3.00547442065732},{"x":429,"y":3.00618531474206},{"x":430,"y":3.00689441041492},{"x":431,"y":3.0076017164466},{"x":432,"y":3.00830724154459},{"x":433,"y":3.00901099435383},{"x":434,"y":3.00971298345729},{"x":435,"y":3.01041321737653},{"x":436,"y":3.01111170457228},{"x":437,"y":3.01180845344509},{"x":438,"y":3.01250347233578},{"x":439,"y":3.01319676952606},{"x":440,"y":3.0138883532391},{"x":441,"y":3.01457823164009},{"x":442,"y":3.01526641283667},{"x":443,"y":3.0159529048796},{"x":444,"y":3.01663771576323},{"x":445,"y":3.01732085342598},{"x":446,"y":3.01800232575092},{"x":447,"y":3.01868214056629},{"x":448,"y":3.01936030564594},{"x":449,"y":3.02003682870985},{"x":450,"y":3.02071171742469},{"x":451,"y":3.02138497940419},{"x":452,"y":3.0220566222097},{"x":453,"y":3.02272665335067},{"x":454,"y":3.02339508028511},{"x":455,"y":3.02406191041999},{"x":456,"y":3.02472715111184},{"x":457,"y":3.02539080966702},{"x":458,"y":3.02605289334238},{"x":459,"y":3.02671340934552},{"x":460,"y":3.02737236483536},{"x":461,"y":3.02802976692246},{"x":462,"y":3.0286856226696},{"x":463,"y":3.02933993909202},{"x":464,"y":3.02999272315802},{"x":465,"y":3.03064398178928},{"x":466,"y":3.03129372186124},{"x":467,"y":3.03194195020362},{"x":468,"y":3.03258867360075},{"x":469,"y":3.03323389879192},{"x":470,"y":3.03387763247187},{"x":471,"y":3.03451988129116},{"x":472,"y":3.03516065185651},{"x":473,"y":3.03579995073121},{"x":474,"y":3.0364377844355},{"x":475,"y":3.03707415944694},{"x":476,"y":3.03770908220077},{"x":477,"y":3.03834255909027},{"x":478,"y":3.0389745964672},{"x":479,"y":3.039605200642},{"x":480,"y":3.04023437788427},{"x":481,"y":3.04086213442312},{"x":482,"y":3.04148847644742},{"x":483,"y":3.04211341010624},{"x":484,"y":3.04273694150919},{"x":485,"y":3.04335907672661},{"x":486,"y":3.04397982179012},{"x":487,"y":3.04459918269276},{"x":488,"y":3.04521716538941},{"x":489,"y":3.04583377579716},{"x":490,"y":3.04644901979545},{"x":491,"y":3.04706290322657},{"x":492,"y":3.04767543189586},{"x":493,"y":3.04828661157214},{"x":494,"y":3.04889644798778},{"x":495,"y":3.04950494683928},{"x":496,"y":3.05011211378738},{"x":497,"y":3.05071795445746},{"x":498,"y":3.05132247443974},{"x":499,"y":3.05192567928965},{"x":500,"y":3.05252757452808},{"x":501,"y":3.05312816564165},{"x":502,"y":3.05372745808308},{"x":503,"y":3.05432545727126},{"x":504,"y":3.05492216859183},{"x":505,"y":3.05551759739712},{"x":506,"y":3.05611174900675},{"x":507,"y":3.0567046287076},{"x":508,"y":3.05729624175426},{"x":509,"y":3.05788659336924},{"x":510,"y":3.05847568874321},{"x":511,"y":3.0590635330353},{"x":512,"y":3.05965013137328},{"x":513,"y":3.0602354888539},{"x":514,"y":3.06081961054309},{"x":515,"y":3.06140250147619},{"x":516,"y":3.06198416665822},{"x":517,"y":3.06256461106416},{"x":518,"y":3.06314383963907},{"x":519,"y":3.06372185729847},{"x":520,"y":3.06429866892848},{"x":521,"y":3.06487427938606},{"x":522,"y":3.06544869349931},{"x":523,"y":3.0660219160676},{"x":524,"y":3.06659395186187},{"x":525,"y":3.0671648056248},{"x":526,"y":3.06773448207108},{"x":527,"y":3.06830298588757},{"x":528,"y":3.06887032173361},{"x":529,"y":3.06943649424109},{"x":530,"y":3.07000150801484},{"x":531,"y":3.07056536763266},{"x":532,"y":3.0711280776457},{"x":533,"y":3.07168964257853},{"x":534,"y":3.07225006692939},{"x":535,"y":3.07280935517044},{"x":536,"y":3.07336751174788},{"x":537,"y":3.07392454108222},{"x":538,"y":3.07448044756845},{"x":539,"y":3.07503523557616},{"x":540,"y":3.07558890944991},{"x":541,"y":3.07614147350924},{"x":542,"y":3.07669293204893},{"x":543,"y":3.07724328933925},{"x":544,"y":3.077792549626},{"x":545,"y":3.07834071713089},{"x":546,"y":3.07888779605149},{"x":547,"y":3.07943379056165},{"x":548,"y":3.07997870481149},{"x":549,"y":3.08052254292767},{"x":550,"y":3.08106530901354},{"x":551,"y":3.08160700714931},{"x":552,"y":3.08214764139227},{"x":553,"y":3.0826872157769},{"x":554,"y":3.08322573431503},{"x":555,"y":3.08376320099611},{"x":556,"y":3.08429961978724},{"x":557,"y":3.08483499463341},{"x":558,"y":3.0853693294577},{"x":559,"y":3.08590262816135},{"x":560,"y":3.08643489462394},{"x":561,"y":3.08696613270365},{"x":562,"y":3.08749634623729},{"x":563,"y":3.08802553904049},{"x":564,"y":3.08855371490796},{"x":565,"y":3.08908087761341},{"x":566,"y":3.08960703090997},{"x":567,"y":3.09013217853015},{"x":568,"y":3.09065632418607},{"x":569,"y":3.09117947156964},{"x":570,"y":3.09170162435253},{"x":571,"y":3.0922227861866},{"x":572,"y":3.09274296070374},{"x":573,"y":3.09326215151628},{"x":574,"y":3.09378036221696},{"x":575,"y":3.09429759637905},{"x":576,"y":3.09481385755667},{"x":577,"y":3.09532914928478},{"x":578,"y":3.09584347507932},{"x":579,"y":3.09635683843738},{"x":580,"y":3.09686924283735},{"x":581,"y":3.09738069173902},{"x":582,"y":3.09789118858376},{"x":583,"y":3.09840073679452},{"x":584,"y":3.09890933977618},{"x":585,"y":3.09941700091542},{"x":586,"y":3.09992372358107},{"x":587,"y":3.10042951112412},{"x":588,"y":3.10093436687783},{"x":589,"y":3.10143829415794},{"x":590,"y":3.10194129626271},{"x":591,"y":3.1024433764731},{"x":592,"y":3.10294453805287},{"x":593,"y":3.10344478424863},{"x":594,"y":3.10394411829009},{"x":595,"y":3.10444254339008},{"x":596,"y":3.10494006274472},{"x":597,"y":3.1054366795335},{"x":598,"y":3.10593239691936},{"x":599,"y":3.10642721804891},{"x":600,"y":3.10692114605249},{"x":601,"y":3.1074141840442},{"x":602,"y":3.10790633512215},{"x":603,"y":3.10839760236843},{"x":604,"y":3.10888798884939},{"x":605,"y":3.10937749761556},{"x":606,"y":3.10986613170192},{"x":607,"y":3.11035389412786},{"x":608,"y":3.11084078789737},{"x":609,"y":3.11132681599917},{"x":610,"y":3.11181198140676},{"x":611,"y":3.1122962870785},{"x":612,"y":3.11277973595779},{"x":613,"y":3.11326233097311},{"x":614,"y":3.11374407503811},{"x":615,"y":3.11422497105176},{"x":616,"y":3.11470502189845},{"x":617,"y":3.11518423044805},{"x":618,"y":3.11566259955596},{"x":619,"y":3.11614013206335},{"x":620,"y":3.1166168307971},{"x":621,"y":3.11709269856997},{"x":622,"y":3.11756773818076},{"x":623,"y":3.11804195241423},{"x":624,"y":3.11851534404138},{"x":625,"y":3.11898791581935},{"x":626,"y":3.11945967049171},{"x":627,"y":3.11993061078837},{"x":628,"y":3.12040073942581},{"x":629,"y":3.1208700591071},{"x":630,"y":3.12133857252197},{"x":631,"y":3.12180628234697},{"x":632,"y":3.1222731912454},{"x":633,"y":3.12273930186764},{"x":634,"y":3.12320461685101},{"x":635,"y":3.12366913882},{"x":636,"y":3.12413287038622},{"x":637,"y":3.12459581414866},{"x":638,"y":3.12505797269357},{"x":639,"y":3.12551934859469},{"x":640,"y":3.12597994441328},{"x":641,"y":3.12643976269821},{"x":642,"y":3.12689880598602},{"x":643,"y":3.12735707680099},{"x":644,"y":3.12781457765529},{"x":645,"y":3.12827131104897},{"x":646,"y":3.12872727947007},{"x":647,"y":3.12918248539471},{"x":648,"y":3.12963693128717},{"x":649,"y":3.1300906195999},{"x":650,"y":3.1305435527737},{"x":651,"y":3.1309957332377},{"x":652,"y":3.13144716340949},{"x":653,"y":3.13189784569518},{"x":654,"y":3.13234778248942},{"x":655,"y":3.13279697617562},{"x":656,"y":3.1332454291258},{"x":657,"y":3.13369314370087},{"x":658,"y":3.13414012225052},{"x":659,"y":3.13458636711347},{"x":660,"y":3.13503188061743},{"x":661,"y":3.1354766650791},{"x":662,"y":3.13592072280443},{"x":663,"y":3.13636405608853},{"x":664,"y":3.1368066672158},{"x":665,"y":3.13724855845998},{"x":666,"y":3.13768973208422},{"x":667,"y":3.13813019034115},{"x":668,"y":3.13856993547293},{"x":669,"y":3.13900896971132},{"x":670,"y":3.13944729527777},{"x":671,"y":3.13988491438344},{"x":672,"y":3.14032182922931},{"x":673,"y":3.14075804200618},{"x":674,"y":3.14119355489478},{"x":675,"y":3.14162837006583},{"x":676,"y":3.14206248968011},{"x":677,"y":3.14249591588844},{"x":678,"y":3.14292865083188},{"x":679,"y":3.1433606966416},{"x":680,"y":3.14379205543917},{"x":681,"y":3.14422272933642},{"x":682,"y":3.14465272043559},{"x":683,"y":3.14508203082942},{"x":684,"y":3.1455106626011},{"x":685,"y":3.14593861782444},{"x":686,"y":3.14636589856379},{"x":687,"y":3.14679250687428},{"x":688,"y":3.14721844480174},{"x":689,"y":3.14764371438275},{"x":690,"y":3.14806831764479},{"x":691,"y":3.14849225660622},{"x":692,"y":3.14891553327636},{"x":693,"y":3.14933814965552},{"x":694,"y":3.14976010773514},{"x":695,"y":3.15018140949766},{"x":696,"y":3.15060205691678},{"x":697,"y":3.15102205195733},{"x":698,"y":3.15144139657556},{"x":699,"y":3.15186009271886},{"x":700,"y":3.15227814232614},{"x":701,"y":3.15269554732766},{"x":702,"y":3.15311230964518},{"x":703,"y":3.15352843119196},{"x":704,"y":3.15394391387281},{"x":705,"y":3.15435875958424},{"x":706,"y":3.15477297021437},{"x":707,"y":3.15518654764303},{"x":708,"y":3.15559949374194},{"x":709,"y":3.15601181037441},{"x":710,"y":3.15642349939584},{"x":711,"y":3.15683456265338},{"x":712,"y":3.15724500198619},{"x":713,"y":3.15765481922547},{"x":714,"y":3.15806401619441},{"x":715,"y":3.15847259470837},{"x":716,"y":3.15888055657472},{"x":717,"y":3.15928790359314},{"x":718,"y":3.15969463755546},{"x":719,"y":3.16010076024585},{"x":720,"y":3.16050627344076},{"x":721,"y":3.16091117890896},{"x":722,"y":3.16131547841168},{"x":723,"y":3.1617191737026},{"x":724,"y":3.16212226652788},{"x":725,"y":3.16252475862616},{"x":726,"y":3.16292665172875},{"x":727,"y":3.16332794755955},{"x":728,"y":3.16372864783501},{"x":729,"y":3.16412875426447},{"x":730,"y":3.16452826854981},{"x":731,"y":3.1649271923859},{"x":732,"y":3.16532552746024},{"x":733,"y":3.16572327545331},{"x":734,"y":3.16612043803844},{"x":735,"y":3.16651701688197},{"x":736,"y":3.1669130136431},{"x":737,"y":3.1673084299742},{"x":738,"y":3.16770326752057},{"x":739,"y":3.16809752792069},{"x":740,"y":3.16849121280611},{"x":741,"y":3.16888432380166},{"x":742,"y":3.16927686252529},{"x":743,"y":3.16966883058818},{"x":744,"y":3.17006022959489},{"x":745,"y":3.17045106114322},{"x":746,"y":3.17084132682443},{"x":747,"y":3.17123102822306},{"x":748,"y":3.17162016691715},{"x":749,"y":3.17200874447819},{"x":750,"y":3.17239676247119},{"x":751,"y":3.17278422245474},{"x":752,"y":3.17317112598088},{"x":753,"y":3.17355747459538},{"x":754,"y":3.1739432698376},{"x":755,"y":3.17432851324062},{"x":756,"y":3.1747132063312},{"x":757,"y":3.17509735062986},{"x":758,"y":3.17548094765095},{"x":759,"y":3.1758639989025},{"x":760,"y":3.17624650588653},{"x":761,"y":3.1766284700989},{"x":762,"y":3.17700989302933},{"x":763,"y":3.17739077616159},{"x":764,"y":3.17777112097338},{"x":765,"y":3.17815092893634},{"x":766,"y":3.17853020151634},{"x":767,"y":3.17890894017312},{"x":768,"y":3.17928714636061},{"x":769,"y":3.17966482152702},{"x":770,"y":3.18004196711448},{"x":771,"y":3.18041858455948},{"x":772,"y":3.18079467529272},{"x":773,"y":3.18117024073918},{"x":774,"y":3.18154528231805},{"x":775,"y":3.18191980144298},{"x":776,"y":3.18229379952184},{"x":777,"y":3.18266727795699},{"x":778,"y":3.18304023814514},{"x":779,"y":3.18341268147745},{"x":780,"y":3.18378460933957},{"x":781,"y":3.18415602311162},{"x":782,"y":3.18452692416836},{"x":783,"y":3.18489731387898},{"x":784,"y":3.18526719360729},{"x":785,"y":3.18563656471175},{"x":786,"y":3.18600542854546},{"x":787,"y":3.18637378645615},{"x":788,"y":3.18674163978629},{"x":789,"y":3.18710898987311},{"x":790,"y":3.18747583804849},{"x":791,"y":3.18784218563918},{"x":792,"y":3.18820803396672},{"x":793,"y":3.18857338434748},{"x":794,"y":3.18893823809272},{"x":795,"y":3.18930259650851},{"x":796,"y":3.18966646089591},{"x":797,"y":3.1900298325509},{"x":798,"y":3.19039271276445},{"x":799,"y":3.19075510282248},{"x":800,"y":3.191117004006},{"x":801,"y":3.1914784175909},{"x":802,"y":3.19183934484841},{"x":803,"y":3.19219978704457},{"x":804,"y":3.19255974544076},{"x":805,"y":3.1929192212934},{"x":806,"y":3.19327821585409},{"x":807,"y":3.19363673036961},{"x":808,"y":3.19399476608204},{"x":809,"y":3.19435232422864},{"x":810,"y":3.19470940604188},{"x":811,"y":3.19506601274967},{"x":812,"y":3.1954221455751},{"x":813,"y":3.19577780573668},{"x":814,"y":3.1961329944482},{"x":815,"y":3.196487712919},{"x":816,"y":3.19684196235359},{"x":817,"y":3.19719574395212},{"x":818,"y":3.19754905891008},{"x":819,"y":3.19790190841853},{"x":820,"y":3.1982542936639},{"x":821,"y":3.19860621582827},{"x":822,"y":3.19895767608917},{"x":823,"y":3.1993086756198},{"x":824,"y":3.19965921558882},{"x":825,"y":3.20000929716059},{"x":826,"y":3.2003589214951},{"x":827,"y":3.20070808974801},{"x":828,"y":3.20105680307059},{"x":829,"y":3.20140506260981},{"x":830,"y":3.20175286950847},{"x":831,"y":3.20210022490497},{"x":832,"y":3.20244712993354},{"x":833,"y":3.20279358572423},{"x":834,"y":3.20313959340281},{"x":835,"y":3.20348515409094},{"x":836,"y":3.20383026890607},{"x":837,"y":3.20417493896156},{"x":838,"y":3.20451916536663},{"x":839,"y":3.20486294922639},{"x":840,"y":3.20520629164196},{"x":841,"y":3.20554919371026},{"x":842,"y":3.20589165652432},{"x":843,"y":3.20623368117308},{"x":844,"y":3.20657526874145},{"x":845,"y":3.20691642031046},{"x":846,"y":3.20725713695713},{"x":847,"y":3.20759741975445},{"x":848,"y":3.2079372697717},{"x":849,"y":3.20827668807406},{"x":850,"y":3.20861567572291},{"x":851,"y":3.20895423377586},{"x":852,"y":3.20929236328647},{"x":853,"y":3.20963006530464},{"x":854,"y":3.20996734087641},{"x":855,"y":3.21030419104396},{"x":856,"y":3.21064061684588},{"x":857,"y":3.21097661931684},{"x":858,"y":3.2113121994878},{"x":859,"y":3.21164735838612},{"x":860,"y":3.21198209703527},{"x":861,"y":3.21231641645521},{"x":862,"y":3.21265031766211},{"x":863,"y":3.21298380166862},{"x":864,"y":3.21331686948367},{"x":865,"y":3.21364952211258},{"x":866,"y":3.21398176055708},{"x":867,"y":3.21431358581538},{"x":868,"y":3.21464499888206},{"x":869,"y":3.21497600074818},{"x":870,"y":3.2153065924013},{"x":871,"y":3.21563677482539},{"x":872,"y":3.215966549001},{"x":873,"y":3.2162959159052},{"x":874,"y":3.21662487651153},{"x":875,"y":3.21695343179014},{"x":876,"y":3.2172815827078},{"x":877,"y":3.21760933022774},{"x":878,"y":3.2179366753099},{"x":879,"y":3.21826361891079},{"x":880,"y":3.21859016198353},{"x":881,"y":3.21891630547799},{"x":882,"y":3.21924205034055},{"x":883,"y":3.21956739751441},{"x":884,"y":3.21989234793946},{"x":885,"y":3.22021690255215},{"x":886,"y":3.22054106228586},{"x":887,"y":3.22086482807055},{"x":888,"y":3.22118820083305},{"x":889,"y":3.22151118149687},{"x":890,"y":3.22183377098236},{"x":891,"y":3.22215597020674},{"x":892,"y":3.22247778008385},{"x":893,"y":3.22279920152456},{"x":894,"y":3.22312023543646},{"x":895,"y":3.22344088272406},{"x":896,"y":3.22376114428878},{"x":897,"y":3.22408102102879},{"x":898,"y":3.22440051383934},{"x":899,"y":3.22471962361244},{"x":900,"y":3.22503835123714},{"x":901,"y":3.22535669759932},{"x":902,"y":3.22567466358202},{"x":903,"y":3.22599225006503},{"x":904,"y":3.22630945792524},{"x":905,"y":3.22662628803653},{"x":906,"y":3.2269427412698},{"x":907,"y":3.22725881849295},{"x":908,"y":3.22757452057098},{"x":909,"y":3.22788984836582},{"x":910,"y":3.22820480273655},{"x":911,"y":3.22851938453941},{"x":912,"y":3.22883359462756},{"x":913,"y":3.22914743385139},{"x":914,"y":3.22946090305842},{"x":915,"y":3.22977400309317},{"x":916,"y":3.23008673479743},{"x":917,"y":3.23039909901018},{"x":918,"y":3.23071109656741},{"x":919,"y":3.23102272830239},{"x":920,"y":3.23133399504562},{"x":921,"y":3.23164489762482},{"x":922,"y":3.23195543686477},{"x":923,"y":3.2322656135877},{"x":924,"y":3.23257542861285},{"x":925,"y":3.23288488275699},{"x":926,"y":3.23319397683394},{"x":927,"y":3.23350271165492},{"x":928,"y":3.23381108802836},{"x":929,"y":3.23411910676005},{"x":930,"y":3.2344267686531},{"x":931,"y":3.23473407450796},{"x":932,"y":3.2350410251224},{"x":933,"y":3.23534762129147},{"x":934,"y":3.23565386380771},{"x":935,"y":3.23595975346102},{"x":936,"y":3.23626529103854},{"x":937,"y":3.23657047732507},{"x":938,"y":3.23687531310253},{"x":939,"y":3.2371797991505},{"x":940,"y":3.23748393624587},{"x":941,"y":3.23778772516296},{"x":942,"y":3.23809116667363},{"x":943,"y":3.23839426154717},{"x":944,"y":3.23869701055027},{"x":945,"y":3.23899941444729},{"x":946,"y":3.23930147399986},{"x":947,"y":3.23960318996733},{"x":948,"y":3.23990456310643},{"x":949,"y":3.24020559417147},{"x":950,"y":3.24050628391434},{"x":951,"y":3.2408066330844},{"x":952,"y":3.24110664242864},{"x":953,"y":3.24140631269159},{"x":954,"y":3.24170564461543},{"x":955,"y":3.24200463893983},{"x":956,"y":3.24230329640213},{"x":957,"y":3.24260161773727},{"x":958,"y":3.24289960367784},{"x":959,"y":3.24319725495402},{"x":960,"y":3.24349457229364},{"x":961,"y":3.24379155642225},{"x":962,"y":3.24408820806299},{"x":963,"y":3.24438452793676},{"x":964,"y":3.24468051676203},{"x":965,"y":3.24497617525504},{"x":966,"y":3.24527150412978},{"x":967,"y":3.24556650409783},{"x":968,"y":3.24586117586855},{"x":969,"y":3.24615552014915},{"x":970,"y":3.24644953764437},{"x":971,"y":3.2467432290569},{"x":972,"y":3.24703659508705},{"x":973,"y":3.24732963643297},{"x":974,"y":3.24762235379063},{"x":975,"y":3.24791474785365},{"x":976,"y":3.24820681931368},{"x":977,"y":3.24849856885992},{"x":978,"y":3.24878999717953},{"x":979,"y":3.24908110495753},{"x":980,"y":3.24937189287672},{"x":981,"y":3.24966236161774},{"x":982,"y":3.24995251185905},{"x":983,"y":3.2502423442771},{"x":984,"y":3.25053185954607},{"x":985,"y":3.25082105833813},{"x":986,"y":3.25110994132328},{"x":987,"y":3.25139850916944},{"x":988,"y":3.25168676254241},{"x":989,"y":3.25197470210597},{"x":990,"y":3.25226232852176},{"x":991,"y":3.2525496424494},{"x":992,"y":3.25283664454641},{"x":993,"y":3.25312333546823},{"x":994,"y":3.25340971586848},{"x":995,"y":3.2536957863984},{"x":996,"y":3.25398154770746},{"x":997,"y":3.25426700044307},{"x":998,"y":3.25455214525056},{"x":999,"y":3.2548369827733},{"x":1000,"y":3.25512151365272}],
xAxis = {
"type": "addMeasureAxis",
"showPercent": false,
"orderBy": "x",
"outputFormat": ",0.0f"
},
yAxis = {
"type": "addMeasureAxis",
"showPercent": false,
"outputFormat": ".2f"
},
zAxis = [],
colorAxis = [],
defaultColors = [],
legend = [];
var svg = dimple.newSvg("#" + opts.id, opts.width, opts.height);
//data = dimple.filterData(data, "Owner", ["Aperture", "Black Mesa"])
var myChart = new dimple.chart(svg, data);
if (opts.bounds) {
myChart.setBounds(opts.bounds.x, opts.bounds.y, opts.bounds.width, opts.bounds.height);//myChart.setBounds(80, 30, 480, 330);
}
//dimple allows use of custom CSS with noFormats
if(opts.noFormats) { myChart.noFormats = opts.noFormats; };
//for markimekko and addAxis also have third parameter measure
//so need to evaluate if measure provided
//x axis
var x;
if(xAxis.measure) {
x = myChart[xAxis.type]("x",opts.x,xAxis.measure);
} else {
x = myChart[xAxis.type]("x", opts.x);
};
if(!(xAxis.type === "addPctAxis")) x.showPercent = xAxis.showPercent;
if (xAxis.orderRule) x.addOrderRule(xAxis.orderRule);
if (xAxis.grouporderRule) x.addGroupOrderRule(xAxis.grouporderRule);
if (xAxis.overrideMin) x.overrideMin = xAxis.overrideMin;
if (xAxis.overrideMax) x.overrideMax = xAxis.overrideMax;
if (xAxis.overrideMax) x.overrideMax = xAxis.overrideMax;
if (xAxis.inputFormat) x.dateParseFormat = xAxis.inputFormat;
if (xAxis.outputFormat) x.tickFormat = xAxis.outputFormat;
//y axis
var y;
if(yAxis.measure) {
y = myChart[yAxis.type]("y",opts.y,yAxis.measure);
} else {
y = myChart[yAxis.type]("y", opts.y);
};
if(!(yAxis.type === "addPctAxis")) y.showPercent = yAxis.showPercent;
if (yAxis.orderRule) y.addOrderRule(yAxis.orderRule);
if (yAxis.grouporderRule) y.addGroupOrderRule(yAxis.grouporderRule);
if (yAxis.overrideMin) y.overrideMin = yAxis.overrideMin;
if (yAxis.overrideMax) y.overrideMax = yAxis.overrideMax;
if (yAxis.inputFormat) y.dateParseFormat = yAxis.inputFormat;
if (yAxis.outputFormat) y.tickFormat = yAxis.outputFormat;
//z for bubbles
var z;
if (!(typeof(zAxis) === 'undefined') && zAxis.type){
if(zAxis.measure) {
z = myChart[zAxis.type]("z",opts.z,zAxis.measure);
} else {
z = myChart[zAxis.type]("z", opts.z);
};
if(!(zAxis.type === "addPctAxis")) z.showPercent = zAxis.showPercent;
if (zAxis.orderRule) z.addOrderRule(zAxis.orderRule);
if (zAxis.overrideMin) z.overrideMin = zAxis.overrideMin;
if (zAxis.overrideMax) z.overrideMax = zAxis.overrideMax;
}
if(d3.keys(colorAxis).length > 0) {
myChart[colorAxis.type](colorAxis.colorSeries,colorAxis.palette) ;
}
//allow manipulation of default colors to use with dimple
if(defaultColors.length) {
defaultColors = defaultColors[0];
if (typeof(defaultColors) == "function") {
//assume this is a d3 scale
//for now loop through first 20 but need a better way to handle
defaultColorsArray = [];
for (var n=0;n<20;n++) {
defaultColorsArray.push(defaultColors(n));
};
defaultColors = defaultColorsArray;
}
defaultColors.forEach(function(d,i) {
defaultColors[i] = new dimple.color(d);
})
myChart.defaultColors = defaultColors;
}
//here need think I need to evaluate group and if missing do null
//as the first argument
//if provided need to use groups from opts
if(opts.hasOwnProperty("groups")) {
var s = myChart.addSeries( opts.groups, dimple.plot[opts.type] );
//series offers an aggregate method that we will also need to check if available
//options available are avg, count, max, min, sum
if (!(typeof(opts.aggregate) === 'undefined')) {
s.aggregate = eval(opts.aggregate);
}
if (!(typeof(opts.lineWeight) === 'undefined')) {
s.lineWeight = eval(opts.lineWeight);
}
if (!(typeof(opts.barGap) === 'undefined')) {
s.barGap = eval(opts.barGap);
}
} else var s = myChart.addSeries( null, dimple.plot[opts.type] );
//unsure if this is best but if legend is provided (not empty) then evaluate
if(d3.keys(legend).length > 0) {
var l =myChart.addLegend();
d3.keys(legend).forEach(function(d){
l[d] = legend[d];
});
}
//quick way to get this going but need to make this cleaner
if(opts.storyboard) {
myChart.setStoryboard(opts.storyboard);
};
//catch all for other options
//these can be provided by dMyChart$chart( ... )
myChart.draw();
})();
</script>
</body>
</html>
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='http://nvd3.org/src/nv.d3.css'>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js' type='text/javascript'></script>
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='./nvd3.min.new.js' type='text/javascript'></script>
<script src='http://nvd3.org/lib/fisheye.js' type='text/javascript'></script>
<style>
.rChart {
display: block;
margin-left: auto;
margin-right: auto;
width: 800px;
height: 270px;
}
</style>
</head>
<body>
<div id='chart322011b932db' class='rChart nvd3'></div>
<script type='text/javascript'>
$(document).ready(function(){
drawchart322011b932db()
});
function drawchart322011b932db(){
var opts = {
"dom": "chart322011b932db",
"width": 800,
"height": 270,
"x": "x",
"y": "minBTL",
"type": "lineChart",
"id": "chart322011b932db"
},
data = [{"x":1,"minBTL":0},{"x":2,"minBTL":0.270145617908238},{"x":3,"minBTL":0.72727550865484},{"x":4,"minBTL":1.10696243718007},{"x":5,"minBTL":1.42228045125646},{"x":6,"minBTL":1.69036606821973},{"x":7,"minBTL":1.92314340666412},{"x":8,"minBTL":2.12872207817337},{"x":9,"minBTL":2.31276630531728},{"x":10,"minBTL":2.47935981060092},{"x":11,"minBTL":2.63153397373969},{"x":12,"minBTL":2.77159695753103},{"x":13,"minBTL":2.90134517284552},{"x":14,"minBTL":3.02220340470587},{"x":15,"minBTL":3.13532035321227},{"x":16,"minBTL":3.24163546785013},{"x":17,"minBTL":3.34192678190756},{"x":18,"minBTL":3.43684585277792},{"x":19,"minBTL":3.52694375208126},{"x":20,"minBTL":3.61269071568343},{"x":21,"minBTL":3.69449121948129},{"x":22,"minBTL":3.77269569984791},{"x":23,"minBTL":3.84760977555507},{"x":24,"minBTL":3.91950158355697},{"x":25,"minBTL":3.98860767301088},{"x":26,"minBTL":4.05513778451269},{"x":27,"minBTL":4.11927875823741},{"x":28,"minBTL":4.1811977547554},{"x":29,"minBTL":4.24104492862642},{"x":30,"minBTL":4.298955662666},{"x":31,"minBTL":4.35505244675789},{"x":32,"minBTL":4.40944646698603},{"x":33,"minBTL":4.46223895708779},{"x":34,"minBTL":4.51352235365651},{"x":35,"minBTL":4.56338128833571},{"x":36,"minBTL":4.61189344385796},{"x":37,"minBTL":4.65913029575838},{"x":38,"minBTL":4.70515775761531},{"x":39,"minBTL":4.75003674450021},{"x":40,"minBTL":4.79382366677624},{"x":41,"minBTL":4.83657086433315},{"x":42,"minBTL":4.87832698968144},{"x":43,"minBTL":4.91913734697076},{"x":44,"minBTL":4.95904419288432},{"x":45,"minBTL":4.9980870044434},{"x":46,"minBTL":5.03630271799763},{"x":47,"minBTL":5.07372594304472},{"x":48,"minBTL":5.11038915399755},{"x":49,"minBTL":5.14632286257413},{"x":50,"minBTL":5.18155577311504},{"x":51,"minBTL":5.21611492281929},{"x":52,"minBTL":5.25002580862332},{"x":53,"minBTL":5.28331250222247},{"x":54,"minBTL":5.31599775454113},{"x":55,"minBTL":5.3481030907927},{"x":56,"minBTL":5.37964889712969},{"x":57,"minBTL":5.41065449976121},{"x":58,"minBTL":5.44113823731138},{"x":59,"minBTL":5.47111752709996},{"x":60,"minBTL":5.50060892594839},{"x":61,"minBTL":5.52962818604527},{"x":62,"minBTL":5.55819030634575},{"x":63,"minBTL":5.58630957992671},{"x":64,"minBTL":5.61399963767404},{"x":65,"minBTL":5.64127348863791},{"x":66,"minBTL":5.66814355735674},{"x":67,"minBTL":5.69462171841904},{"x":68,"minBTL":5.72071932850529},{"x":69,"minBTL":5.7464472561271},{"x":70,"minBTL":5.77181590925963},{"x":71,"minBTL":5.79683526104415},{"x":72,"minBTL":5.82151487372013},{"x":73,"minBTL":5.84586392093143},{"x":74,"minBTL":5.86989120853752},{"x":75,"minBTL":5.89360519404833},{"x":76,"minBTL":5.91701400479082},{"x":77,"minBTL":5.9401254549051},{"x":78,"minBTL":5.96294706125975},{"x":79,"minBTL":5.98548605836775},{"x":80,"minBTL":6.00774941237749},{"x":81,"minBTL":6.02974383420663},{"x":82,"minBTL":6.05147579188183},{"x":83,"minBTL":6.0729515221401},{"x":84,"minBTL":6.09417704134567},{"x":85,"minBTL":6.11515815576907},{"x":86,"minBTL":6.13590047127333},{"x":87,"minBTL":6.15640940244779},{"x":88,"minBTL":6.17669018122663},{"x":89,"minBTL":6.19674786502709},{"x":90,"minBTL":6.21658734443888},{"x":91,"minBTL":6.23621335049412},{"x":92,"minBTL":6.25563046154526},{"x":93,"minBTL":6.27484310977597},{"x":94,"minBTL":6.29385558736806},{"x":95,"minBTL":6.31267205234644},{"x":96,"minBTL":6.33129653412176},{"x":97,"minBTL":6.34973293874939},{"x":98,"minBTL":6.36798505392222},{"x":99,"minBTL":6.38605655371286},{"x":100,"minBTL":6.40395100308073},{"x":101,"minBTL":6.42167186215729},{"x":102,"minBTL":6.43922249032314},{"x":103,"minBTL":6.4566061500881},{"x":104,"minBTL":6.47382601078663},{"x":105,"minBTL":6.49088515209811},{"x":106,"minBTL":6.5077865674023},{"x":107,"minBTL":6.52453316697943},{"x":108,"minBTL":6.54112778106273},{"x":109,"minBTL":6.55757316275221},{"x":110,"minBTL":6.57387199079679},{"x":111,"minBTL":6.59002687225219},{"x":112,"minBTL":6.60604034502056},{"x":113,"minBTL":6.62191488027902},{"x":114,"minBTL":6.63765288480204},{"x":115,"minBTL":6.65325670318378},{"x":116,"minBTL":6.66872861996508},{"x":117,"minBTL":6.68407086167046},{"x":118,"minBTL":6.69928559875901},{"x":119,"minBTL":6.71437494749434},{"x":120,"minBTL":6.72934097173672},{"x":121,"minBTL":6.74418568466184},{"x":122,"minBTL":6.75891105040968},{"x":123,"minBTL":6.7735189856667},{"x":124,"minBTL":6.78801136118466},{"x":125,"minBTL":6.80239000323917},{"x":126,"minBTL":6.81665669503065},{"x":127,"minBTL":6.83081317803057},{"x":128,"minBTL":6.84486115327536},{"x":129,"minBTL":6.85880228261075},{"x":130,"minBTL":6.87263818988818},{"x":131,"minBTL":6.88637046211628},{"x":132,"minBTL":6.90000065056853},{"x":133,"minBTL":6.91353027185008},{"x":134,"minBTL":6.92696080892455},{"x":135,"minBTL":6.9402937121034},{"x":136,"minBTL":6.95353039999897},{"x":137,"minBTL":6.96667226044308},{"x":138,"minBTL":6.97972065137235},{"x":139,"minBTL":6.99267690168226},{"x":140,"minBTL":7.0055423120504},{"x":141,"minBTL":7.01831815573124},{"x":142,"minBTL":7.03100567932275},{"x":143,"minBTL":7.04360610350641},{"x":144,"minBTL":7.05612062376187},{"x":145,"minBTL":7.06855041105702},{"x":146,"minBTL":7.08089661251448},{"x":147,"minBTL":7.09316035205576},{"x":148,"minBTL":7.1053427310236},{"x":149,"minBTL":7.11744482878376},{"x":150,"minBTL":7.12946770330667},{"x":151,"minBTL":7.1414123917301},{"x":152,"minBTL":7.15327991090345},{"x":153,"minBTL":7.16507125791402},{"x":154,"minBTL":7.176787410597},{"x":155,"minBTL":7.18842932802833},{"x":156,"minBTL":7.19999795100233},{"x":157,"minBTL":7.21149420249417},{"x":158,"minBTL":7.22291898810772},{"x":159,"minBTL":7.23427319650925},{"x":160,"minBTL":7.24555769984808},{"x":161,"minBTL":7.2567733541637},{"x":162,"minBTL":7.26792099978092},{"x":163,"minBTL":7.27900146169274},{"x":164,"minBTL":7.29001554993146},{"x":165,"minBTL":7.3009640599289},{"x":166,"minBTL":7.31184777286574},{"x":167,"minBTL":7.32266745601029},{"x":168,"minBTL":7.33342386304756},{"x":169,"minBTL":7.34411773439839},{"x":170,"minBTL":7.3547497975293},{"x":171,"minBTL":7.36532076725359},{"x":172,"minBTL":7.37583134602323},{"x":173,"minBTL":7.38628222421288},{"x":174,"minBTL":7.3966740803955},{"x":175,"minBTL":7.40700758161021},{"x":176,"minBTL":7.41728338362263},{"x":177,"minBTL":7.42750213117776},{"x":178,"minBTL":7.43766445824609},{"x":179,"minBTL":7.44777098826255},{"x":180,"minBTL":7.45782233435915},{"x":181,"minBTL":7.46781909959075},{"x":182,"minBTL":7.47776187715554},{"x":183,"minBTL":7.48765125060849},{"x":184,"minBTL":7.49748779406983},{"x":185,"minBTL":7.50727207242764},{"x":186,"minBTL":7.51700464153476},{"x":187,"minBTL":7.52668604840108},{"x":188,"minBTL":7.5363168313802},{"x":189,"minBTL":7.54589752035132},{"x":190,"minBTL":7.55542863689663},{"x":191,"minBTL":7.5649106944737},{"x":192,"minBTL":7.57434419858373},{"x":193,"minBTL":7.58372964693522},{"x":194,"minBTL":7.59306752960353},{"x":195,"minBTL":7.60235832918661},{"x":196,"minBTL":7.61160252095631},{"x":197,"minBTL":7.62080057300621},{"x":198,"minBTL":7.62995294639583},{"x":199,"minBTL":7.63906009529066},{"x":200,"minBTL":7.64812246709958},{"x":201,"minBTL":7.65714050260815},{"x":202,"minBTL":7.66611463610893},{"x":203,"minBTL":7.67504529552851},{"x":204,"minBTL":7.6839329025517},{"x":205,"minBTL":7.69277787274215},{"x":206,"minBTL":7.70158061566089},{"x":207,"minBTL":7.71034153498104},{"x":208,"minBTL":7.71906102860068},{"x":209,"minBTL":7.72773948875252},{"x":210,"minBTL":7.736377302111},{"x":211,"minBTL":7.744974849897},{"x":212,"minBTL":7.75353250798021},{"x":213,"minBTL":7.76205064697882},{"x":214,"minBTL":7.77052963235692},{"x":215,"minBTL":7.77896982451992},{"x":216,"minBTL":7.78737157890781},{"x":217,"minBTL":7.79573524608566},{"x":218,"minBTL":7.80406117183259},{"x":219,"minBTL":7.81234969722899},{"x":220,"minBTL":7.82060115874079},{"x":221,"minBTL":7.82881588830293},{"x":222,"minBTL":7.83699421340034},{"x":223,"minBTL":7.84513645714707},{"x":224,"minBTL":7.85324293836392},{"x":225,"minBTL":7.86131397165438},{"x":226,"minBTL":7.86934986747874},{"x":227,"minBTL":7.87735093222645},{"x":228,"minBTL":7.88531746828738},{"x":229,"minBTL":7.89324977412095},{"x":230,"minBTL":7.90114814432421},{"x":231,"minBTL":7.90901286969815},{"x":232,"minBTL":7.91684423731303},{"x":233,"minBTL":7.9246425305715},{"x":234,"minBTL":7.93240802927155},{"x":235,"minBTL":7.94014100966679},{"x":236,"minBTL":7.94784174452661},{"x":237,"minBTL":7.95551050319454},{"x":238,"minBTL":7.96314755164516},{"x":239,"minBTL":7.97075315254062},{"x":240,"minBTL":7.97832756528501},{"x":241,"minBTL":7.9858710460784},{"x":242,"minBTL":7.9933838479693},{"x":243,"minBTL":8.00086622090638},{"x":244,"minBTL":8.00831841178886},{"x":245,"minBTL":8.01574066451574},{"x":246,"minBTL":8.02313322003485},{"x":247,"minBTL":8.03049631638974},{"x":248,"minBTL":8.03783018876663},{"x":249,"minBTL":8.04513506953986},{"x":250,"minBTL":8.05241118831664},{"x":251,"minBTL":8.05965877198078},{"x":252,"minBTL":8.06687804473576},{"x":253,"minBTL":8.07406922814684},{"x":254,"minBTL":8.08123254118216},{"x":255,"minBTL":8.08836820025351},{"x":256,"minBTL":8.09547641925585},{"x":257,"minBTL":8.10255740960632},{"x":258,"minBTL":8.10961138028217},{"x":259,"minBTL":8.11663853785856},{"x":260,"minBTL":8.12363908654518},{"x":261,"minBTL":8.13061322822199},{"x":262,"minBTL":8.13756116247514},{"x":263,"minBTL":8.14448308663085},{"x":264,"minBTL":8.15137919579036},{"x":265,"minBTL":8.15824968286254},{"x":266,"minBTL":8.16509473859703},{"x":267,"minBTL":8.17191455161633},{"x":268,"minBTL":8.1787093084473},{"x":269,"minBTL":8.18547919355218},{"x":270,"minBTL":8.19222438935886},{"x":271,"minBTL":8.1989450762911},{"x":272,"minBTL":8.20564143279722},{"x":273,"minBTL":8.21231363537943},{"x":274,"minBTL":8.21896185862166},{"x":275,"minBTL":8.22558627521776},{"x":276,"minBTL":8.23218705599818},{"x":277,"minBTL":8.2387643699569},{"x":278,"minBTL":8.24531838427799},{"x":279,"minBTL":8.25184926436101},{"x":280,"minBTL":8.25835717384661},{"x":281,"minBTL":8.26484227464118},{"x":282,"minBTL":8.27130472694158},{"x":283,"minBTL":8.27774468925888},{"x":284,"minBTL":8.28416231844215},{"x":285,"minBTL":8.29055776970149},{"x":286,"minBTL":8.29693119663112},{"x":287,"minBTL":8.30328275123139},{"x":288,"minBTL":8.30961258393091},{"x":289,"minBTL":8.31592084360815},{"x":290,"minBTL":8.32220767761313},{"x":291,"minBTL":8.32847323178741},{"x":292,"minBTL":8.33471765048544},{"x":293,"minBTL":8.34094107659439},{"x":294,"minBTL":8.34714365155401},{"x":295,"minBTL":8.35332551537625},{"x":296,"minBTL":8.35948680666427},{"x":297,"minBTL":8.36562766263134},{"x":298,"minBTL":8.37174821911958},{"x":299,"minBTL":8.37784861061805},{"x":300,"minBTL":8.38392897028052},{"x":301,"minBTL":8.38998942994329},{"x":302,"minBTL":8.39603012014272},{"x":303,"minBTL":8.40205117013192},{"x":304,"minBTL":8.40805270789771},{"x":305,"minBTL":8.41403486017715},{"x":306,"minBTL":8.41999775247378},{"x":307,"minBTL":8.42594150907332},{"x":308,"minBTL":8.43186625306008},{"x":309,"minBTL":8.43777210633157},{"x":310,"minBTL":8.44365918961437},{"x":311,"minBTL":8.44952762247875},{"x":312,"minBTL":8.45537752335346},{"x":313,"minBTL":8.46120900954052},{"x":314,"minBTL":8.46702219722902},{"x":315,"minBTL":8.47281720150954},{"x":316,"minBTL":8.47859413638767},{"x":317,"minBTL":8.48435311479809},{"x":318,"minBTL":8.49009424861736},{"x":319,"minBTL":8.49581764867751},{"x":320,"minBTL":8.50152342477914},{"x":321,"minBTL":8.50721168570365},{"x":322,"minBTL":8.51288253922629},{"x":323,"minBTL":8.51853609212843},{"x":324,"minBTL":8.52417245020976},{"x":325,"minBTL":8.52979171830015},{"x":326,"minBTL":8.53539400027191},{"x":327,"minBTL":8.54097939905083},{"x":328,"minBTL":8.54654801662809},{"x":329,"minBTL":8.55209995407137},{"x":330,"minBTL":8.5576353115362},{"x":331,"minBTL":8.56315418827653},{"x":332,"minBTL":8.56865668265598},{"x":333,"minBTL":8.57414289215811},{"x":334,"minBTL":8.57961291339715},{"x":335,"minBTL":8.58506684212806},{"x":336,"minBTL":8.59050477325692},{"x":337,"minBTL":8.59592680085093},{"x":338,"minBTL":8.60133301814817},{"x":339,"minBTL":8.60672351756744},{"x":340,"minBTL":8.61209839071782},{"x":341,"minBTL":8.61745772840782},{"x":342,"minBTL":8.62280162065531},{"x":343,"minBTL":8.62813015669605},{"x":344,"minBTL":8.63344342499323},{"x":345,"minBTL":8.63874151324598},{"x":346,"minBTL":8.64402450839834},{"x":347,"minBTL":8.64929249664817},{"x":348,"minBTL":8.65454556345498},{"x":349,"minBTL":8.65978379354915},{"x":350,"minBTL":8.66500727093968},{"x":351,"minBTL":8.67021607892244},{"x":352,"minBTL":8.67541030008842},{"x":353,"minBTL":8.68059001633168},{"x":354,"minBTL":8.68575530885674},{"x":355,"minBTL":8.69090625818705},{"x":356,"minBTL":8.69604294417185},{"x":357,"minBTL":8.70116544599398},{"x":358,"minBTL":8.70627384217755},{"x":359,"minBTL":8.71136821059503},{"x":360,"minBTL":8.71644862847403},{"x":361,"minBTL":8.72151517240531},{"x":362,"minBTL":8.72656791834882},{"x":363,"minBTL":8.73160694164127},{"x":364,"minBTL":8.7366323170027},{"x":365,"minBTL":8.74164411854335},{"x":366,"minBTL":8.74664241976987},{"x":367,"minBTL":8.75162729359231},{"x":368,"minBTL":8.75659881233057},{"x":369,"minBTL":8.76155704772029},{"x":370,"minBTL":8.76650207091967},{"x":371,"minBTL":8.77143395251529},{"x":372,"minBTL":8.77635276252858},{"x":373,"minBTL":8.7812585704214},{"x":374,"minBTL":8.78615144510235},{"x":375,"minBTL":8.79103145493238},{"x":376,"minBTL":8.7958986677309},{"x":377,"minBTL":8.80075315078122},{"x":378,"minBTL":8.80559497083638},{"x":379,"minBTL":8.81042419412434},{"x":380,"minBTL":8.81524088635408},{"x":381,"minBTL":8.82004511272046},{"x":382,"minBTL":8.82483693790988},{"x":383,"minBTL":8.82961642610554},{"x":384,"minBTL":8.8343836409926},{"x":385,"minBTL":8.83913864576314},{"x":386,"minBTL":8.84388150312173},{"x":387,"minBTL":8.84861227528985},{"x":388,"minBTL":8.85333102401122},{"x":389,"minBTL":8.85803781055668},{"x":390,"minBTL":8.8627326957288},{"x":391,"minBTL":8.86741573986691},{"x":392,"minBTL":8.87208700285167},{"x":393,"minBTL":8.87674654410943},{"x":394,"minBTL":8.88139442261735},{"x":395,"minBTL":8.88603069690756},{"x":396,"minBTL":8.89065542507192},{"x":397,"minBTL":8.89526866476598},{"x":398,"minBTL":8.89987047321362},{"x":399,"minBTL":8.90446090721175},{"x":400,"minBTL":8.90904002313357},{"x":401,"minBTL":8.91360787693375},{"x":402,"minBTL":8.918164524152},{"x":403,"minBTL":8.92271001991749},{"x":404,"minBTL":8.92724441895258},{"x":405,"minBTL":8.93176777557694},{"x":406,"minBTL":8.93628014371169},{"x":407,"minBTL":8.94078157688322},{"x":408,"minBTL":8.94527212822656},{"x":409,"minBTL":8.94975185049012},{"x":410,"minBTL":8.95422079603846},{"x":411,"minBTL":8.95867901685649},{"x":412,"minBTL":8.96312656455349},{"x":413,"minBTL":8.96756349036596},{"x":414,"minBTL":8.97198984516167},{"x":415,"minBTL":8.97640567944304},{"x":416,"minBTL":8.98081104335092},{"x":417,"minBTL":8.98520598666758},{"x":418,"minBTL":8.98959055882038},{"x":419,"minBTL":8.99396480888538},{"x":420,"minBTL":8.99832878559001},{"x":421,"minBTL":9.00268253731702},{"x":422,"minBTL":9.00702611210748},{"x":423,"minBTL":9.01135955766366},{"x":424,"minBTL":9.01568292135316},{"x":425,"minBTL":9.01999625021071},{"x":426,"minBTL":9.02429959094244},{"x":427,"minBTL":9.02859298992832},{"x":428,"minBTL":9.03287649322544},{"x":429,"minBTL":9.0371501465708},{"x":430,"minBTL":9.0414139953845},{"x":431,"minBTL":9.04566808477252},{"x":432,"minBTL":9.04991245952963},{"x":433,"minBTL":9.05414716414225},{"x":434,"minBTL":9.05837224279136},{"x":435,"minBTL":9.06258773935529},{"x":436,"minBTL":9.06679369741218},{"x":437,"minBTL":9.07099016024329},{"x":438,"minBTL":9.0751771708351},{"x":439,"minBTL":9.0793547718823},{"x":440,"minBTL":9.0835230057903},{"x":441,"minBTL":9.08768191467826},{"x":442,"minBTL":9.09183154038094},{"x":443,"minBTL":9.0959719244517},{"x":444,"minBTL":9.10010310816517},{"x":445,"minBTL":9.10422513251928},{"x":446,"minBTL":9.10833803823794},{"x":447,"minBTL":9.11244186577388},{"x":448,"minBTL":9.11653665531034},{"x":449,"minBTL":9.12062244676387},{"x":450,"minBTL":9.12469927978679},{"x":451,"minBTL":9.12876719376925},{"x":452,"minBTL":9.13282622784148},{"x":453,"minBTL":9.13687642087656},{"x":454,"minBTL":9.14091781149219},{"x":455,"minBTL":9.14495043805302},{"x":456,"minBTL":9.14897433867312},{"x":457,"minBTL":9.15298955121765},{"x":458,"minBTL":9.15699611330579},{"x":459,"minBTL":9.16099406231198},{"x":460,"minBTL":9.16498343536881},{"x":461,"minBTL":9.16896426936846},{"x":462,"minBTL":9.17293660096552},{"x":463,"minBTL":9.17690046657805},{"x":464,"minBTL":9.18085590239058},{"x":465,"minBTL":9.18480294435556},{"x":466,"minBTL":9.18874162819537},{"x":467,"minBTL":9.19267198940455},{"x":468,"minBTL":9.19659406325155},{"x":469,"minBTL":9.20050788478042},{"x":470,"minBTL":9.2044134888131},{"x":471,"minBTL":9.20831090995132},{"x":472,"minBTL":9.21220018257803},{"x":473,"minBTL":9.21608134085963},{"x":474,"minBTL":9.21995441874755},{"x":475,"minBTL":9.22381944998035},{"x":476,"minBTL":9.22767646808504},{"x":477,"minBTL":9.23152550637923},{"x":478,"minBTL":9.23536659797299},{"x":479,"minBTL":9.23919977576989},{"x":480,"minBTL":9.24302507246936},{"x":481,"minBTL":9.24684252056832},{"x":482,"minBTL":9.25065215236246},{"x":483,"minBTL":9.25445399994824},{"x":484,"minBTL":9.2582480952247},{"x":485,"minBTL":9.26203446989424},{"x":486,"minBTL":9.26581315546538},{"x":487,"minBTL":9.26958418325342},{"x":488,"minBTL":9.27334758438232},{"x":489,"minBTL":9.27710338978678},{"x":490,"minBTL":9.28085163021268},{"x":491,"minBTL":9.28459233621953},{"x":492,"minBTL":9.28832553818163},{"x":493,"minBTL":9.29205126628995},{"x":494,"minBTL":9.2957695505525},{"x":495,"minBTL":9.29948042079723},{"x":496,"minBTL":9.30318390667252},{"x":497,"minBTL":9.3068800376491},{"x":498,"minBTL":9.31056884302104},{"x":499,"minBTL":9.31425035190762},{"x":500,"minBTL":9.31792459325428},{"x":501,"minBTL":9.32159159583437},{"x":502,"minBTL":9.32525138825054},{"x":503,"minBTL":9.32890399893526},{"x":504,"minBTL":9.33254945615379},{"x":505,"minBTL":9.33618778800349},{"x":506,"minBTL":9.3398190224171},{"x":507,"minBTL":9.34344318716249},{"x":508,"minBTL":9.3470603098447},{"x":509,"minBTL":9.35067041790734},{"x":510,"minBTL":9.35427353863325},{"x":511,"minBTL":9.35786969914639},{"x":512,"minBTL":9.36145892641253},{"x":513,"minBTL":9.3650412472409},{"x":514,"minBTL":9.36861668828513},{"x":515,"minBTL":9.37218527604466},{"x":516,"minBTL":9.37574703686565},{"x":517,"minBTL":9.37930199694257},{"x":518,"minBTL":9.38285018231879},{"x":519,"minBTL":9.38639161888836},{"x":520,"minBTL":9.38992633239685},{"x":521,"minBTL":9.39345434844221},{"x":522,"minBTL":9.39697569247663},{"x":523,"minBTL":9.40049038980685},{"x":524,"minBTL":9.4039984655958},{"x":525,"minBTL":9.40749994486344},{"x":526,"minBTL":9.4109948524879},{"x":527,"minBTL":9.41448321320655},{"x":528,"minBTL":9.41796505161734},{"x":529,"minBTL":9.42144039217905},{"x":530,"minBTL":9.42490925921339},{"x":531,"minBTL":9.4283716769051},{"x":532,"minBTL":9.43182766930376},{"x":533,"minBTL":9.43527726032419},{"x":534,"minBTL":9.43872047374767},{"x":535,"minBTL":9.44215733322295},{"x":536,"minBTL":9.44558786226733},{"x":537,"minBTL":9.44901208426755},{"x":538,"minBTL":9.45243002248072},{"x":539,"minBTL":9.45584170003496},{"x":540,"minBTL":9.4592471399313},{"x":541,"minBTL":9.46264636504357},{"x":542,"minBTL":9.46603939811981},{"x":543,"minBTL":9.46942626178343},{"x":544,"minBTL":9.47280697853329},{"x":545,"minBTL":9.47618157074593},{"x":546,"minBTL":9.4795500606748},{"x":547,"minBTL":9.48291247045289},{"x":548,"minBTL":9.48626882209224},{"x":549,"minBTL":9.48961913748558},{"x":550,"minBTL":9.49296343840671},{"x":551,"minBTL":9.49630174651175},{"x":552,"minBTL":9.49963408333993},{"x":553,"minBTL":9.50296047031432},{"x":554,"minBTL":9.50628092874248},{"x":555,"minBTL":9.5095954798178},{"x":556,"minBTL":9.51290414461974},{"x":557,"minBTL":9.5162069441149},{"x":558,"minBTL":9.51950389915828},{"x":559,"minBTL":9.52279503049311},{"x":560,"minBTL":9.5260803587523},{"x":561,"minBTL":9.5293599044593},{"x":562,"minBTL":9.53263368802863},{"x":563,"minBTL":9.53590172976634},{"x":564,"minBTL":9.53916404987178},{"x":565,"minBTL":9.54242066843682},{"x":566,"minBTL":9.54567160544831},{"x":567,"minBTL":9.54891688078748},{"x":568,"minBTL":9.55215651423135},{"x":569,"minBTL":9.55539052545356},{"x":570,"minBTL":9.55861893402408},{"x":571,"minBTL":9.56184175941163},{"x":572,"minBTL":9.56505902098255},{"x":573,"minBTL":9.56827073800312},{"x":574,"minBTL":9.5714769296393},{"x":575,"minBTL":9.5746776149572},{"x":576,"minBTL":9.57787281292481},{"x":577,"minBTL":9.58106254241205},{"x":578,"minBTL":9.58424682219123},{"x":579,"minBTL":9.58742567093796},{"x":580,"minBTL":9.59059910723197},{"x":581,"minBTL":9.59376714955771},{"x":582,"minBTL":9.59692981630491},{"x":583,"minBTL":9.60008712576885},{"x":584,"minBTL":9.60323909615202},{"x":585,"minBTL":9.60638574556356},{"x":586,"minBTL":9.60952709202073},{"x":587,"minBTL":9.61266315344937},{"x":588,"minBTL":9.61579394768399},{"x":589,"minBTL":9.61891949246929},{"x":590,"minBTL":9.62203980546001},{"x":591,"minBTL":9.6251549042218},{"x":592,"minBTL":9.62826480623213},{"x":593,"minBTL":9.63136952888001},{"x":594,"minBTL":9.63446908946767},{"x":595,"minBTL":9.63756350521025},{"x":596,"minBTL":9.64065279323718},{"x":597,"minBTL":9.64373697059203},{"x":598,"minBTL":9.64681605423324},{"x":599,"minBTL":9.64989006103507},{"x":600,"minBTL":9.65295900778812},{"x":601,"minBTL":9.65602291119906},{"x":602,"minBTL":9.65908178789238},{"x":603,"minBTL":9.66213565440983},{"x":604,"minBTL":9.66518452721198},{"x":605,"minBTL":9.66822842267802},{"x":606,"minBTL":9.67126735710664},{"x":607,"minBTL":9.67430134671631},{"x":608,"minBTL":9.67733040764596},{"x":609,"minBTL":9.68035455595556},{"x":610,"minBTL":9.68337380762667},{"x":611,"minBTL":9.68638817856259},{"x":612,"minBTL":9.68939768458943},{"x":613,"minBTL":9.69240234145611},{"x":614,"minBTL":9.69540216483494},{"x":615,"minBTL":9.69839717032233},{"x":616,"minBTL":9.70138737343941},{"x":617,"minBTL":9.70437278963219},{"x":618,"minBTL":9.70735343427179},{"x":619,"minBTL":9.7103293226558},{"x":620,"minBTL":9.71330047000776},{"x":621,"minBTL":9.71626689147823},{"x":622,"minBTL":9.71922860214551},{"x":623,"minBTL":9.72218561701512},{"x":624,"minBTL":9.72513795102151},{"x":625,"minBTL":9.72808561902713},{"x":626,"minBTL":9.73102863582424},{"x":627,"minBTL":9.73396701613429},{"x":628,"minBTL":9.73690077460913},{"x":629,"minBTL":9.73982992583115},{"x":630,"minBTL":9.74275448431352},{"x":631,"minBTL":9.74567446450099},{"x":632,"minBTL":9.74858988076975},{"x":633,"minBTL":9.75150074742879},{"x":634,"minBTL":9.75440707871949},{"x":635,"minBTL":9.75730888881649},{"x":636,"minBTL":9.76020619182765},{"x":637,"minBTL":9.76309900179533},{"x":638,"minBTL":9.76598733269567},{"x":639,"minBTL":9.7688711984398},{"x":640,"minBTL":9.77175061287403},{"x":641,"minBTL":9.77462558978045},{"x":642,"minBTL":9.7774961428768},{"x":643,"minBTL":9.78036228581722},{"x":644,"minBTL":9.78322403219292},{"x":645,"minBTL":9.78608139553207},{"x":646,"minBTL":9.78893438930016},{"x":647,"minBTL":9.79178302690102},{"x":648,"minBTL":9.79462732167657},{"x":649,"minBTL":9.79746728690725},{"x":650,"minBTL":9.800302935813},{"x":651,"minBTL":9.80313428155267},{"x":652,"minBTL":9.80596133722537},{"x":653,"minBTL":9.80878411587011},{"x":654,"minBTL":9.81160263046641},{"x":655,"minBTL":9.8144168939351},{"x":656,"minBTL":9.81722691913772},{"x":657,"minBTL":9.82003271887785},{"x":658,"minBTL":9.82283430590051},{"x":659,"minBTL":9.82563169289365},{"x":660,"minBTL":9.82842489248763},{"x":661,"minBTL":9.83121391725556},{"x":662,"minBTL":9.83399877971423},{"x":663,"minBTL":9.83677949232411},{"x":664,"minBTL":9.83955606748952},{"x":665,"minBTL":9.84232851755921},{"x":666,"minBTL":9.84509685482676},{"x":667,"minBTL":9.8478610915306},{"x":668,"minBTL":9.85062123985456},{"x":669,"minBTL":9.85337731192811},{"x":670,"minBTL":9.85612931982688},{"x":671,"minBTL":9.85887727557272},{"x":672,"minBTL":9.86162119113413},{"x":673,"minBTL":9.8643610784265},{"x":674,"minBTL":9.86709694931251},{"x":675,"minBTL":9.86982881560246},{"x":676,"minBTL":9.87255668905477},{"x":677,"minBTL":9.87528058137554},{"x":678,"minBTL":9.87800050421988},{"x":679,"minBTL":9.88071646919116},{"x":680,"minBTL":9.88342848784242},{"x":681,"minBTL":9.88613657167579},{"x":682,"minBTL":9.88884073214295},{"x":683,"minBTL":9.89154098064611},{"x":684,"minBTL":9.89423732853721},{"x":685,"minBTL":9.89692978711917},{"x":686,"minBTL":9.89961836764514},{"x":687,"minBTL":9.90230308132013},{"x":688,"minBTL":9.90498393930026},{"x":689,"minBTL":9.90766095269322},{"x":690,"minBTL":9.91033413255888},{"x":691,"minBTL":9.91300348990931},{"x":692,"minBTL":9.91566903570916},{"x":693,"minBTL":9.91833078087567},{"x":694,"minBTL":9.92098873627967},{"x":695,"minBTL":9.92364291274465},{"x":696,"minBTL":9.92629332104822},{"x":697,"minBTL":9.92893997192137},{"x":698,"minBTL":9.93158287605012},{"x":699,"minBTL":9.93422204407372},{"x":700,"minBTL":9.93685748658713},{"x":701,"minBTL":9.93948921413967},{"x":702,"minBTL":9.94211723723593},{"x":703,"minBTL":9.944741566336},{"x":704,"minBTL":9.94736221185532},{"x":705,"minBTL":9.94997918416584},{"x":706,"minBTL":9.95259249359517},{"x":707,"minBTL":9.95520215042755},{"x":708,"minBTL":9.95780816490436},{"x":709,"minBTL":9.96041054722279},{"x":710,"minBTL":9.96300930753829},{"x":711,"minBTL":9.96560445596296},{"x":712,"minBTL":9.96819600256679},{"x":713,"minBTL":9.97078395737784},{"x":714,"minBTL":9.97336833038199},{"x":715,"minBTL":9.97594913152384},{"x":716,"minBTL":9.97852637070579},{"x":717,"minBTL":9.98110005778996},{"x":718,"minBTL":9.98367020259675},{"x":719,"minBTL":9.98623681490638},{"x":720,"minBTL":9.98879990445841},{"x":721,"minBTL":9.99135948095165},{"x":722,"minBTL":9.9939155540453},{"x":723,"minBTL":9.99646813335867},{"x":724,"minBTL":9.99901722847139},{"x":725,"minBTL":10.0015628489235},{"x":726,"minBTL":10.0041050042161},{"x":727,"minBTL":10.0066437038113},{"x":728,"minBTL":10.009178957132},{"x":729,"minBTL":10.0117107735632},{"x":730,"minBTL":10.0142391624508},{"x":731,"minBTL":10.0167641331037},{"x":732,"minBTL":10.0192856947915},{"x":733,"minBTL":10.0218038567468},{"x":734,"minBTL":10.0243186281648},{"x":735,"minBTL":10.0268300182031},{"x":736,"minBTL":10.029338035982},{"x":737,"minBTL":10.0318426905856},{"x":738,"minBTL":10.0343439910605},{"x":739,"minBTL":10.0368419464172},{"x":740,"minBTL":10.0393365656295},{"x":741,"minBTL":10.0418278576359},{"x":742,"minBTL":10.0443158313382},{"x":743,"minBTL":10.0468004956022},{"x":744,"minBTL":10.0492818592592},{"x":745,"minBTL":10.0517599311042},{"x":746,"minBTL":10.0542347198977},{"x":747,"minBTL":10.0567062343647},{"x":748,"minBTL":10.0591744831956},{"x":749,"minBTL":10.0616394750461},{"x":750,"minBTL":10.0641012185377},{"x":751,"minBTL":10.0665597222577},{"x":752,"minBTL":10.0690149947588},{"x":753,"minBTL":10.0714670445602},{"x":754,"minBTL":10.0739158801474},{"x":755,"minBTL":10.0763615099724},{"x":756,"minBTL":10.0788039424537},{"x":757,"minBTL":10.0812431859768},{"x":758,"minBTL":10.0836792488942},{"x":759,"minBTL":10.086112139525},{"x":760,"minBTL":10.0885418661564},{"x":761,"minBTL":10.0909684370429},{"x":762,"minBTL":10.0933918604062},{"x":763,"minBTL":10.0958121444368},{"x":764,"minBTL":10.0982292972924},{"x":765,"minBTL":10.1006433270989},{"x":766,"minBTL":10.1030542419515},{"x":767,"minBTL":10.1054620499126},{"x":768,"minBTL":10.1078667590138},{"x":769,"minBTL":10.1102683772565},{"x":770,"minBTL":10.1126669126093},{"x":771,"minBTL":10.1150623730113},{"x":772,"minBTL":10.1174547663705},{"x":773,"minBTL":10.1198441005646},{"x":774,"minBTL":10.1222303834402},{"x":775,"minBTL":10.1246136228149},{"x":776,"minBTL":10.1269938264752},{"x":777,"minBTL":10.1293710021781},{"x":778,"minBTL":10.1317451576511},{"x":779,"minBTL":10.1341163005914},{"x":780,"minBTL":10.1364844386675},{"x":781,"minBTL":10.138849579518},{"x":782,"minBTL":10.1412117307532},{"x":783,"minBTL":10.1435708999535},{"x":784,"minBTL":10.1459270946708},{"x":785,"minBTL":10.1482803224285},{"x":786,"minBTL":10.1506305907211},{"x":787,"minBTL":10.1529779070149},{"x":788,"minBTL":10.1553222787478},{"x":789,"minBTL":10.15766371333},{"x":790,"minBTL":10.1600022181429},{"x":791,"minBTL":10.1623378005408},{"x":792,"minBTL":10.1646704678499},{"x":793,"minBTL":10.1670002273691},{"x":794,"minBTL":10.1693270863699},{"x":795,"minBTL":10.1716510520959},{"x":796,"minBTL":10.1739721317643},{"x":797,"minBTL":10.1762903325648},{"x":798,"minBTL":10.1786056616605},{"x":799,"minBTL":10.1809181261877},{"x":800,"minBTL":10.1832277332562},{"x":801,"minBTL":10.1855344899485},{"x":802,"minBTL":10.1878384033223},{"x":803,"minBTL":10.1901394804074},{"x":804,"minBTL":10.1924377282088},{"x":805,"minBTL":10.1947331537049},{"x":806,"minBTL":10.1970257638483},{"x":807,"minBTL":10.1993155655659},{"x":808,"minBTL":10.2016025657595},{"x":809,"minBTL":10.2038867713049},{"x":810,"minBTL":10.2061681890524},{"x":811,"minBTL":10.2084468258281},{"x":812,"minBTL":10.2107226884318},{"x":813,"minBTL":10.2129957836391},{"x":814,"minBTL":10.2152661182004},{"x":815,"minBTL":10.2175336988421},{"x":816,"minBTL":10.2197985322647},{"x":817,"minBTL":10.2220606251456},{"x":818,"minBTL":10.2243199841367},{"x":819,"minBTL":10.2265766158669},{"x":820,"minBTL":10.2288305269395},{"x":821,"minBTL":10.2310817239352},{"x":822,"minBTL":10.2333302134098},{"x":823,"minBTL":10.2355760018961},{"x":824,"minBTL":10.2378190959024},{"x":825,"minBTL":10.2400595019142},{"x":826,"minBTL":10.2422972263933},{"x":827,"minBTL":10.2445322757784},{"x":828,"minBTL":10.2467646564845},{"x":829,"minBTL":10.2489943749037},{"x":830,"minBTL":10.2512214374057},{"x":831,"minBTL":10.2534458503364},{"x":832,"minBTL":10.2556676200196},{"x":833,"minBTL":10.2578867527563},{"x":834,"minBTL":10.2601032548247},{"x":835,"minBTL":10.2623171324811},{"x":836,"minBTL":10.2645283919587},{"x":837,"minBTL":10.2667370394693},{"x":838,"minBTL":10.268943081202},{"x":839,"minBTL":10.2711465233241},{"x":840,"minBTL":10.2733473719812},{"x":841,"minBTL":10.2755456332965},{"x":842,"minBTL":10.2777413133722},{"x":843,"minBTL":10.2799344182887},{"x":844,"minBTL":10.2821249541043},{"x":845,"minBTL":10.2843129268569},{"x":846,"minBTL":10.2864983425624},{"x":847,"minBTL":10.2886812072154},{"x":848,"minBTL":10.2908615267903},{"x":849,"minBTL":10.2930393072394},{"x":850,"minBTL":10.2952145544948},{"x":851,"minBTL":10.297387274468},{"x":852,"minBTL":10.2995574730489},{"x":853,"minBTL":10.3017251561074},{"x":854,"minBTL":10.3038903294932},{"x":855,"minBTL":10.3060529990344},{"x":856,"minBTL":10.3082131705405},{"x":857,"minBTL":10.3103708497994},{"x":858,"minBTL":10.3125260425791},{"x":859,"minBTL":10.3146787546285},{"x":860,"minBTL":10.3168289916751},{"x":861,"minBTL":10.3189767594276},{"x":862,"minBTL":10.3211220635745},{"x":863,"minBTL":10.3232649097849},{"x":864,"minBTL":10.3254053037084},{"x":865,"minBTL":10.3275432509744},{"x":866,"minBTL":10.3296787571936},{"x":867,"minBTL":10.3318118279573},{"x":868,"minBTL":10.3339424688374},{"x":869,"minBTL":10.3360706853868},{"x":870,"minBTL":10.3381964831393},{"x":871,"minBTL":10.3403198676095},{"x":872,"minBTL":10.3424408442934},{"x":873,"minBTL":10.3445594186685},{"x":874,"minBTL":10.3466755961928},{"x":875,"minBTL":10.3487893823064},{"x":876,"minBTL":10.3509007824308},{"x":877,"minBTL":10.3530098019686},{"x":878,"minBTL":10.3551164463046},{"x":879,"minBTL":10.3572207208048},{"x":880,"minBTL":10.3593226308172},{"x":881,"minBTL":10.361422181672},{"x":882,"minBTL":10.3635193786808},{"x":883,"minBTL":10.3656142271377},{"x":884,"minBTL":10.3677067323191},{"x":885,"minBTL":10.3697968994825},{"x":886,"minBTL":10.3718847338694},{"x":887,"minBTL":10.3739702407019},{"x":888,"minBTL":10.3760534251861},{"x":889,"minBTL":10.3781342925094},{"x":890,"minBTL":10.3802128478424},{"x":891,"minBTL":10.3822890963389},{"x":892,"minBTL":10.3843630431341},{"x":893,"minBTL":10.3864346933473},{"x":894,"minBTL":10.38850405208},{"x":895,"minBTL":10.3905711244169},{"x":896,"minBTL":10.3926359154261},{"x":897,"minBTL":10.3946984301581},{"x":898,"minBTL":10.3967586736474},{"x":899,"minBTL":10.3988166509111},{"x":900,"minBTL":10.4008723669504},{"x":901,"minBTL":10.4029258267488},{"x":902,"minBTL":10.404977035275},{"x":903,"minBTL":10.4070259974797},{"x":904,"minBTL":10.4090727182978},{"x":905,"minBTL":10.4111172026484},{"x":906,"minBTL":10.4131594554338},{"x":907,"minBTL":10.4151994815405},{"x":908,"minBTL":10.417237285839},{"x":909,"minBTL":10.4192728731831},{"x":910,"minBTL":10.4213062484113},{"x":911,"minBTL":10.4233374163467},{"x":912,"minBTL":10.4253663817956},{"x":913,"minBTL":10.427393149549},{"x":914,"minBTL":10.4294177243829},{"x":915,"minBTL":10.4314401110565},{"x":916,"minBTL":10.4334603143143},{"x":917,"minBTL":10.4354783388858},{"x":918,"minBTL":10.4374941894838},{"x":919,"minBTL":10.4395078708066},{"x":920,"minBTL":10.4415193875375},{"x":921,"minBTL":10.4435287443445},{"x":922,"minBTL":10.4455359458798},{"x":923,"minBTL":10.4475409967814},{"x":924,"minBTL":10.4495439016716},{"x":925,"minBTL":10.4515446651586},{"x":926,"minBTL":10.4535432918353},{"x":927,"minBTL":10.4555397862797},{"x":928,"minBTL":10.4575341530551},{"x":929,"minBTL":10.4595263967104},{"x":930,"minBTL":10.4615165217797},{"x":931,"minBTL":10.4635045327829},{"x":932,"minBTL":10.465490434225},{"x":933,"minBTL":10.4674742305964},{"x":934,"minBTL":10.4694559263737},{"x":935,"minBTL":10.4714355260195},{"x":936,"minBTL":10.4734130339808},{"x":937,"minBTL":10.4753884546922},{"x":938,"minBTL":10.4773617925726},{"x":939,"minBTL":10.4793330520281},{"x":940,"minBTL":10.48130223745},{"x":941,"minBTL":10.4832693532159},{"x":942,"minBTL":10.4852344036898},{"x":943,"minBTL":10.4871973932216},{"x":944,"minBTL":10.4891583261473},{"x":945,"minBTL":10.4911172067899},{"x":946,"minBTL":10.4930740394577},{"x":947,"minBTL":10.4950288284465},{"x":948,"minBTL":10.4969815780378},{"x":949,"minBTL":10.4989322925001},{"x":950,"minBTL":10.5008809760883},{"x":951,"minBTL":10.5028276330438},{"x":952,"minBTL":10.504772267595},{"x":953,"minBTL":10.5067148839569},{"x":954,"minBTL":10.5086554863315},{"x":955,"minBTL":10.5105940789074},{"x":956,"minBTL":10.5125306658601},{"x":957,"minBTL":10.5144652513524},{"x":958,"minBTL":10.5163978395339},{"x":959,"minBTL":10.5183284345413},{"x":960,"minBTL":10.5202570404983},{"x":961,"minBTL":10.5221836615163},{"x":962,"minBTL":10.5241083016934},{"x":963,"minBTL":10.5260309651155},{"x":964,"minBTL":10.5279516558551},{"x":965,"minBTL":10.5298703779728},{"x":966,"minBTL":10.5317871355167},{"x":967,"minBTL":10.5337019325218},{"x":968,"minBTL":10.5356147730108},{"x":969,"minBTL":10.5375256609948},{"x":970,"minBTL":10.5394346004713},{"x":971,"minBTL":10.5413415954268},{"x":972,"minBTL":10.5432466498345},{"x":973,"minBTL":10.5451497676559},{"x":974,"minBTL":10.5470509528406},{"x":975,"minBTL":10.5489502093253},{"x":976,"minBTL":10.5508475410359},{"x":977,"minBTL":10.5527429518849},{"x":978,"minBTL":10.5546364457738},{"x":979,"minBTL":10.556528026592},{"x":980,"minBTL":10.5584176982172},{"x":981,"minBTL":10.560305464515},{"x":982,"minBTL":10.5621913293389},{"x":983,"minBTL":10.5640752965319},{"x":984,"minBTL":10.565957369924},{"x":985,"minBTL":10.5678375533347},{"x":986,"minBTL":10.5697158505711},{"x":987,"minBTL":10.5715922654292},{"x":988,"minBTL":10.5734668016936},{"x":989,"minBTL":10.5753394631372},{"x":990,"minBTL":10.5772102535218},{"x":991,"minBTL":10.5790791765977},{"x":992,"minBTL":10.5809462361039},{"x":993,"minBTL":10.582811435768},{"x":994,"minBTL":10.5846747793074},{"x":995,"minBTL":10.5865362704267},{"x":996,"minBTL":10.5883959128207},{"x":997,"minBTL":10.5902537101728},{"x":998,"minBTL":10.592109666155},{"x":999,"minBTL":10.5939637844288},{"x":1000,"minBTL":10.5958160686448}]
if(!(opts.type==="pieChart" || opts.type==="sparklinePlus")) {
var data = d3.nest()
.key(function(d){
//return opts.group === undefined ? 'main' : d[opts.group]
//instead of main would think a better default is opts.x
return opts.group === undefined ? opts.y : d[opts.group];
})
.entries(data);
}
nv.addGraph(function() {
var chart = nv.models[opts.type]()
.x(function(d) { return d[opts.x] })
.y(function(d) { return d[opts.y] })
.width(opts.width)
.height(opts.height)
chart
.useInteractiveGuideline(true)
chart.yAxis
.tickFormat(d3.format(',.2f'))
d3.select("#" + opts.id)
.append('svg')
.datum(data)
.transition().duration(500)
.call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
};
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment