tenon 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tenon/version.rb +1 -1
  3. data/vendor/assets/images/Jcrop.gif +0 -0
  4. data/vendor/assets/javascripts/backstretch.js +4 -0
  5. data/vendor/assets/javascripts/bootstrap.collapse.js +179 -0
  6. data/vendor/assets/javascripts/bootstrap.datetimepicker.js +954 -0
  7. data/vendor/assets/javascripts/bootstrap.js +561 -0
  8. data/vendor/assets/javascripts/bootstrap.modal.js +246 -0
  9. data/vendor/assets/javascripts/bootstrap.tabs.js +135 -0
  10. data/vendor/assets/javascripts/canvasjs.min.js +343 -0
  11. data/vendor/assets/javascripts/cufon/Aller_400.font.js +7 -0
  12. data/vendor/assets/javascripts/cufon/Aller_700.font.js +7 -0
  13. data/vendor/assets/javascripts/cufon/cufon.js +7 -0
  14. data/vendor/assets/javascripts/imagesloaded.js +7 -0
  15. data/vendor/assets/javascripts/jquery.Jcrop.js +1704 -0
  16. data/vendor/assets/javascripts/jquery.corner.js +249 -0
  17. data/vendor/assets/javascripts/jquery.debounce.js +9 -0
  18. data/vendor/assets/javascripts/jquery.equalHeights.js +52 -0
  19. data/vendor/assets/javascripts/jquery.form.js +911 -0
  20. data/vendor/assets/javascripts/jquery.hoverIntent.js +115 -0
  21. data/vendor/assets/javascripts/jquery.mousewheel.js +78 -0
  22. data/vendor/assets/javascripts/jquery.radioSlider.js +55 -0
  23. data/vendor/assets/javascripts/jquery.twoLevelSort.js +57 -0
  24. data/vendor/assets/javascripts/jquery.ui.sortable.js +2252 -0
  25. data/vendor/assets/javascripts/jscrollpane.js +1435 -0
  26. data/vendor/assets/javascripts/moment.js +6 -0
  27. data/vendor/assets/javascripts/select2.js +3448 -0
  28. data/vendor/assets/javascripts/underscore.inflection.js +177 -0
  29. data/vendor/assets/javascripts/underscore.string.js +1 -0
  30. data/vendor/assets/javascripts/uri.js +53 -0
  31. data/vendor/assets/stylesheets/bootstrap.css.scss +560 -0
  32. data/vendor/assets/stylesheets/bootstrap.datetimepicker.css +152 -0
  33. data/vendor/assets/stylesheets/bootstrap.tables.css.scss +201 -0
  34. data/vendor/assets/stylesheets/jquery.Jcrop.css +204 -0
  35. data/vendor/assets/stylesheets/jscrollpane.css.scss +20 -0
  36. data/vendor/assets/stylesheets/select2.css +646 -0
  37. metadata +35 -1
@@ -0,0 +1,246 @@
1
+ /* ========================================================================
2
+ * Bootstrap: modal.js v3.0.2
3
+ * http://getbootstrap.com/javascript/#modals
4
+ * ========================================================================
5
+ * Copyright 2013 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ======================================================================== */
19
+
20
+
21
+ +function ($) { "use strict";
22
+
23
+ // MODAL CLASS DEFINITION
24
+ // ======================
25
+
26
+ var Modal = function (element, options) {
27
+ this.options = options
28
+ this.$element = $(element)
29
+ this.$backdrop =
30
+ this.isShown = null
31
+
32
+ if (this.options.remote) this.$element.load(this.options.remote)
33
+ }
34
+
35
+ Modal.DEFAULTS = {
36
+ backdrop: true
37
+ , keyboard: true
38
+ , show: true
39
+ }
40
+
41
+ Modal.prototype.toggle = function (_relatedTarget) {
42
+ return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
43
+ }
44
+
45
+ Modal.prototype.show = function (_relatedTarget) {
46
+ var that = this
47
+ var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
48
+
49
+ this.$element.trigger(e)
50
+
51
+ if (this.isShown || e.isDefaultPrevented()) return
52
+
53
+ this.isShown = true
54
+
55
+ this.escape()
56
+
57
+ this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
58
+
59
+ this.backdrop(function () {
60
+ var transition = $.support.transition && that.$element.hasClass('fade')
61
+
62
+ if (!that.$element.parent().length) {
63
+ that.$element.appendTo(document.body) // don't move modals dom position
64
+ }
65
+
66
+ that.$element.show()
67
+
68
+ if (transition) {
69
+ that.$element[0].offsetWidth // force reflow
70
+ }
71
+
72
+ that.$element
73
+ .addClass('in')
74
+ .attr('aria-hidden', false)
75
+
76
+ that.enforceFocus()
77
+
78
+ var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
79
+
80
+ transition ?
81
+ that.$element.find('.modal-dialog') // wait for modal to slide in
82
+ .one($.support.transition.end, function () {
83
+ that.$element.focus().trigger(e)
84
+ })
85
+ .emulateTransitionEnd(300) :
86
+ that.$element.focus().trigger(e)
87
+ })
88
+ }
89
+
90
+ Modal.prototype.hide = function (e) {
91
+ if (e) e.preventDefault()
92
+
93
+ e = $.Event('hide.bs.modal')
94
+
95
+ this.$element.trigger(e)
96
+
97
+ if (!this.isShown || e.isDefaultPrevented()) return
98
+
99
+ this.isShown = false
100
+
101
+ this.escape()
102
+
103
+ $(document).off('focusin.bs.modal')
104
+
105
+ this.$element
106
+ .removeClass('in')
107
+ .attr('aria-hidden', true)
108
+ .off('click.dismiss.modal')
109
+
110
+ $.support.transition && this.$element.hasClass('fade') ?
111
+ this.$element
112
+ .one($.support.transition.end, $.proxy(this.hideModal, this))
113
+ .emulateTransitionEnd(300) :
114
+ this.hideModal()
115
+ }
116
+
117
+ Modal.prototype.enforceFocus = function () {
118
+ $(document)
119
+ .off('focusin.bs.modal') // guard against infinite focus loop
120
+ .on('focusin.bs.modal', $.proxy(function (e) {
121
+ if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
122
+ this.$element.focus()
123
+ }
124
+ }, this))
125
+ }
126
+
127
+ Modal.prototype.escape = function () {
128
+ if (this.isShown && this.options.keyboard) {
129
+ this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
130
+ e.which == 27 && this.hide()
131
+ }, this))
132
+ } else if (!this.isShown) {
133
+ this.$element.off('keyup.dismiss.bs.modal')
134
+ }
135
+ }
136
+
137
+ Modal.prototype.hideModal = function () {
138
+ var that = this
139
+ this.$element.hide()
140
+ this.backdrop(function () {
141
+ that.removeBackdrop()
142
+ that.$element.trigger('hidden.bs.modal')
143
+ })
144
+ }
145
+
146
+ Modal.prototype.removeBackdrop = function () {
147
+ this.$backdrop && this.$backdrop.remove()
148
+ this.$backdrop = null
149
+ }
150
+
151
+ Modal.prototype.backdrop = function (callback) {
152
+ var that = this
153
+ var animate = this.$element.hasClass('fade') ? 'fade' : ''
154
+
155
+ if (this.isShown && this.options.backdrop) {
156
+ var doAnimate = $.support.transition && animate
157
+
158
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
159
+ .appendTo(document.body)
160
+
161
+ this.$element.on('click.dismiss.modal', $.proxy(function (e) {
162
+ if (e.target !== e.currentTarget) return
163
+ this.options.backdrop == 'static'
164
+ ? this.$element[0].focus.call(this.$element[0])
165
+ : this.hide.call(this)
166
+ }, this))
167
+
168
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
169
+
170
+ this.$backdrop.addClass('in')
171
+
172
+ if (!callback) return
173
+
174
+ doAnimate ?
175
+ this.$backdrop
176
+ .one($.support.transition.end, callback)
177
+ .emulateTransitionEnd(150) :
178
+ callback()
179
+
180
+ } else if (!this.isShown && this.$backdrop) {
181
+ this.$backdrop.removeClass('in')
182
+
183
+ $.support.transition && this.$element.hasClass('fade')?
184
+ this.$backdrop
185
+ .one($.support.transition.end, callback)
186
+ .emulateTransitionEnd(150) :
187
+ callback()
188
+
189
+ } else if (callback) {
190
+ callback()
191
+ }
192
+ }
193
+
194
+
195
+ // MODAL PLUGIN DEFINITION
196
+ // =======================
197
+
198
+ var old = $.fn.modal
199
+
200
+ $.fn.modal = function (option, _relatedTarget) {
201
+ return this.each(function () {
202
+ var $this = $(this)
203
+ var data = $this.data('bs.modal')
204
+ var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
205
+
206
+ if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
207
+ if (typeof option == 'string') data[option](_relatedTarget)
208
+ else if (options.show) data.show(_relatedTarget)
209
+ })
210
+ }
211
+
212
+ $.fn.modal.Constructor = Modal
213
+
214
+
215
+ // MODAL NO CONFLICT
216
+ // =================
217
+
218
+ $.fn.modal.noConflict = function () {
219
+ $.fn.modal = old
220
+ return this
221
+ }
222
+
223
+
224
+ // MODAL DATA-API
225
+ // ==============
226
+
227
+ $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
228
+ var $this = $(this)
229
+ var href = $this.attr('href')
230
+ var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
231
+ var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
232
+
233
+ e.preventDefault()
234
+
235
+ $target
236
+ .modal(option, this)
237
+ .one('hide', function () {
238
+ $this.is(':visible') && $this.focus()
239
+ })
240
+ })
241
+
242
+ $(document)
243
+ .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
244
+ .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
245
+
246
+ }(jQuery);
@@ -0,0 +1,135 @@
1
+ /* ========================================================================
2
+ * Bootstrap: tab.js v3.0.2
3
+ * http://getbootstrap.com/javascript/#tabs
4
+ * ========================================================================
5
+ * Copyright 2013 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ======================================================================== */
19
+
20
+
21
+ +function ($) { "use strict";
22
+
23
+ // TAB CLASS DEFINITION
24
+ // ====================
25
+
26
+ var Tab = function (element) {
27
+ this.element = $(element)
28
+ }
29
+
30
+ Tab.prototype.show = function () {
31
+ var $this = this.element
32
+ var $ul = $this.closest('ul:not(.dropdown-menu)')
33
+ var selector = $this.data('target')
34
+
35
+ if (!selector) {
36
+ selector = $this.attr('href')
37
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
38
+ }
39
+
40
+ if ($this.parent('li').hasClass('active')) return
41
+
42
+ var previous = $ul.find('.active:last a')[0]
43
+ var e = $.Event('show.bs.tab', {
44
+ relatedTarget: previous
45
+ })
46
+
47
+ $this.trigger(e)
48
+
49
+ if (e.isDefaultPrevented()) return
50
+
51
+ var $target = $(selector)
52
+
53
+ this.activate($this.parent('li'), $ul)
54
+ this.activate($target, $target.parent(), function () {
55
+ $this.trigger({
56
+ type: 'shown.bs.tab'
57
+ , relatedTarget: previous
58
+ })
59
+ })
60
+ }
61
+
62
+ Tab.prototype.activate = function (element, container, callback) {
63
+ var $active = container.find('> .active')
64
+ var transition = callback
65
+ && $.support.transition
66
+ && $active.hasClass('fade')
67
+
68
+ function next() {
69
+ $active
70
+ .removeClass('active')
71
+ .find('> .dropdown-menu > .active')
72
+ .removeClass('active')
73
+
74
+ element.addClass('active')
75
+
76
+ if (transition) {
77
+ element[0].offsetWidth // reflow for transition
78
+ element.addClass('in')
79
+ } else {
80
+ element.removeClass('fade')
81
+ }
82
+
83
+ if (element.parent('.dropdown-menu')) {
84
+ element.closest('li.dropdown').addClass('active')
85
+ }
86
+
87
+ callback && callback()
88
+ }
89
+
90
+ transition ?
91
+ $active
92
+ .one($.support.transition.end, next)
93
+ .emulateTransitionEnd(150) :
94
+ next()
95
+
96
+ $active.removeClass('in')
97
+ }
98
+
99
+
100
+ // TAB PLUGIN DEFINITION
101
+ // =====================
102
+
103
+ var old = $.fn.tab
104
+
105
+ $.fn.tab = function ( option ) {
106
+ return this.each(function () {
107
+ var $this = $(this)
108
+ var data = $this.data('bs.tab')
109
+
110
+ if (!data) $this.data('bs.tab', (data = new Tab(this)))
111
+ if (typeof option == 'string') data[option]()
112
+ })
113
+ }
114
+
115
+ $.fn.tab.Constructor = Tab
116
+
117
+
118
+ // TAB NO CONFLICT
119
+ // ===============
120
+
121
+ $.fn.tab.noConflict = function () {
122
+ $.fn.tab = old
123
+ return this
124
+ }
125
+
126
+
127
+ // TAB DATA-API
128
+ // ============
129
+
130
+ $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
131
+ e.preventDefault()
132
+ $(this).tab('show')
133
+ })
134
+
135
+ }(jQuery);
@@ -0,0 +1,343 @@
1
+ /*
2
+ CanvasJS HTML5 & JavaScript Charts - v1.3.0 Beta 4 - http://canvasjs.com/
3
+ Copyright 2013 fenopix
4
+ */
5
+ (function(){function N(a,c){a.prototype=ta(c.prototype);a.prototype.constructor=a;a.parent=c.prototype}function ta(a){function c(){}c.prototype=a;return new c}function ha(a,c,b){"millisecond"===b?a.setMilliseconds(a.getMilliseconds()+1*c):"second"===b?a.setSeconds(a.getSeconds()+1*c):"minute"===b?a.setMinutes(a.getMinutes()+1*c):"hour"===b?a.setHours(a.getHours()+1*c):"day"===b?a.setDate(a.getDate()+1*c):"week"===b?a.setDate(a.getDate()+7*c):"month"===b?a.setMonth(a.getMonth()+1*c):"year"===b&&a.setFullYear(a.getFullYear()+
6
+ 1*c);return a}function R(a,c){return y[c+"Duration"]*a}function G(a,c){var b=!1;0>a&&(b=!0,a*=-1);a=""+a;for(c=c?c:1;a.length<c;)a="0"+a;return b?"-"+a:a}function aa(a){a=a.replace(/^\s\s*/,"");for(var c=/\s/,b=a.length;c.test(a.charAt(--b)););return a.slice(0,b+1)}function ua(a){a.roundRect=function(a,b,d,e,g,f,k,m){k&&(this.fillStyle=k);m&&(this.strokeStyle=m);"undefined"==typeof stroke&&(stroke=!0);"undefined"===typeof g&&(g=5);this.lineWidth=f;this.beginPath();this.moveTo(a+g,b);this.lineTo(a+
7
+ d-g,b);this.quadraticCurveTo(a+d,b,a+d,b+g);this.lineTo(a+d,b+e-g);this.quadraticCurveTo(a+d,b+e,a+d-g,b+e);this.lineTo(a+g,b+e);this.quadraticCurveTo(a,b+e,a,b+e-g);this.lineTo(a,b+g);this.quadraticCurveTo(a,b,a+g,b);this.closePath();k&&this.fill();m&&0<f&&this.stroke()}}function ia(a,c){return a-c}function va(a,c){return a.x-c.x}function B(a){var c=((a&16711680)>>16).toString(16),b=((a&65280)>>8).toString(16);a=((a&255)>>0).toString(16);c=2>c.length?"0"+c:c;b=2>b.length?"0"+b:b;a=2>a.length?"0"+
8
+ a:a;return"#"+c+b+a}function V(a,c,b){b=b||"normal";var d=a+"_"+c+"_"+b,e=ja[d];if(isNaN(e)){try{a="position:absolute; left:0px; top:-20000px; padding:0px;margin:0px;border:none;white-space:pre;line-height:normal;font-family:"+a+"; font-size:"+c+"px; font-weight:"+b+";";if(!O){var g=document.body;O=document.createElement("span");O.innerHTML="";var f=document.createTextNode("Mpgyi");O.appendChild(f);g.appendChild(O)}O.style.display="";O.setAttribute("style",a);e=Math.round(O.offsetHeight);O.style.display=
9
+ "none"}catch(k){e=Math.ceil(1.1*c)}e=Math.max(e,c);ja[d]=e}return e}function K(a,c,b,d){if(a.addEventListener)a.addEventListener(c,b,d||!1);else if(a.attachEvent)a.attachEvent("on"+c,function(c){c=c||window.event;c.preventDefault=c.preventDefault||function(){c.returnValue=!1};c.stopPropagation=c.stopPropagation||function(){c.cancelBubble=!0};b.call(a,c)});else return!1}function ka(a,c,b){a*=P;c*=P;a=b.getImageData(a,c,2,2).data;c=!0;for(b=0;4>b;b++)if(a[b]!==a[b+4]|a[b]!==a[b+8]|a[b]!==a[b+12]){c=
10
+ !1;break}return c?a[0]<<16|a[1]<<8|a[2]:0}function la(a,c,b){var d;d=a?a+"FontStyle":"fontStyle";var e=a?a+"FontWeight":"fontWeight",g=a?a+"FontSize":"fontSize";a=a?a+"FontFamily":"fontFamily";d=""+(c[d]?c[d]+" ":b&&b[d]?b[d]+" ":"");d+=c[e]?c[e]+" ":b&&b[e]?b[e]+" ":"";d+=c[g]?c[g]+"px ":b&&b[g]?b[g]+"px ":"";c=c[a]?c[a]+"":b&&b[a]?b[a]+"":"";!u&&c&&(c=c.split(",")[0],"'"!==c[0]&&'"'!==c[0]&&(c="'"+c+"'"));return d+=c}function Q(a,c,b){return a in c?c[a]:b[a]}function W(a,c,b){if(u&&ma){var d=a.getContext("2d");
11
+ X=d.webkitBackingStorePixelRatio||d.mozBackingStorePixelRatio||d.msBackingStorePixelRatio||d.oBackingStorePixelRatio||d.backingStorePixelRatio||1;P=ba/X;a.width=c*P;a.height=b*P;ba!==X&&(a.style.width=c+"px",a.style.height=b+"px",d.scale(P,P))}else a.width=c,a.height=b}function Y(a,c){var b=document.createElement("canvas");b.setAttribute("class","canvasjs-chart-canvas");W(b,a,c);u||"undefined"===typeof G_vmlCanvasManager||G_vmlCanvasManager.initElement(b);return b}function I(a,c,b){this._defaultsKey=
12
+ a;currentTheme={};b&&(ca[b]&&ca[b][a])&&(currentTheme=ca[b][a]);this._options=c?c:{};this.setOptions(this._options,currentTheme)}function v(a,c){c=c||{};v.parent.constructor.call(this,"Chart",c,c.theme?c.theme:"theme1");var b=this;this._containerId=a;this._objectsInitialized=!1;this.overlaidCanvasCtx=this.ctx=null;this._indexLabels=[];this._panTimerId=0;this._lastTouchEventType="";this.panEnabled=!1;this._defaultCursor="default";this.plotArea={canvas:null,ctx:null,x1:0,y1:0,x2:0,y2:0,width:0,height:0};
13
+ this._dataInRenderedOrder=[];if(this._container=document.getElementById(this._containerId)){this._container.innerHTML="";var d=0,e=0,d=this._options.width?this.width:0<this._container.clientWidth?this._container.clientWidth:this.width,e=this._options.height?this.height:0<this._container.clientHeight?this._container.clientHeight:this.height;this.width=d;this.height=e;this._canvasJSContainer=document.createElement("div");this._canvasJSContainer.setAttribute("class","canvasjs-chart-container");this._canvasJSContainer.style.position=
14
+ "relative";u||(this._canvasJSContainer.style.height="0px");this._container.appendChild(this._canvasJSContainer);this.canvas=Y(d,e);this.canvas.style.position="absolute";if(this.canvas.getContext){try{this.canvas.style.background=this.backgroundColor}catch(g){}this._canvasJSContainer.appendChild(this.canvas);this.ctx=this.canvas.getContext("2d");this.ctx.textBaseline="top";ua(this.ctx);u?this.plotArea.ctx=this.ctx:(this.plotArea.canvas=Y(d,e),this.plotArea.canvas.style.position="absolute",this.plotArea.canvas.setAttribute("class",
15
+ "plotAreaCanvas"),this._canvasJSContainer.appendChild(this.plotArea.canvas),this.plotArea.ctx=this.plotArea.canvas.getContext("2d"));this.overlaidCanvas=Y(d,e);this.overlaidCanvas.style.position="absolute";this._canvasJSContainer.appendChild(this.overlaidCanvas);this.overlaidCanvasCtx=this.overlaidCanvas.getContext("2d");this.overlaidCanvasCtx.textBaseline="top";this._eventManager=new Z(this);this._toolBar=document.createElement("div");this._toolBar.setAttribute("class","canvasjs-chart-toolbar");
16
+ this._toolBar.style.position="absolute";this._toolBar.style.top="0px";this._toolBar.style.right="0px";this._canvasJSContainer.appendChild(this._toolBar);this.zoomEnabled&&(this._zoomButton=document.createElement("button"),this._zoomButton.appendChild(document.createTextNode("Pan")),this._toolBar.appendChild(this._zoomButton),K(this._zoomButton,"click",function(){b.zoomEnabled?(b.zoomEnabled=!1,b.panEnabled=!0,b._zoomButton.innerHTML=b._cultureInfo.zoomText):(b.zoomEnabled=!0,b.panEnabled=!1,b._zoomButton.innerHTML=
17
+ b._cultureInfo.panText);b.render()}));this.zoomEnabled&&(this._resetButton=document.createElement("button"),this._resetButton.appendChild(document.createTextNode("Reset")),this._toolBar.appendChild(this._resetButton),this.zoomEnabled=this._options.zoomEnabled?!0:!1,this.panEnabled=!1,this.overlaidCanvas.style.cursor=b._defaultCursor,K(this._resetButton,"click",function(){b._toolTip.hide();b.zoomEnabled||b.panEnabled?(b.zoomEnabled=!0,b.panEnabled=!1,b._zoomButton.innerHTML=b._cultureInfo.panText,
18
+ b._defaultCursor="default",b.overlaidCanvas.style.cursor=b._defaultCursor):(b.zoomEnabled=!1,b.panEnabled=!1);b.sessionVariables.axisX.internalMinimum=b._options.axisX&&b._options.axisX.minimum?b._options.axisX.minimum:null;b.sessionVariables.axisX.internalMaximum=b._options.axisX&&b._options.axisX.maximum?b._options.axisX.maximum:null;b.resetOverlayedCanvas();b._toolBar.style.display="none";b.render()}));K(window,"resize",function(){var a=0,c=0;b._options.width?a=b.width:b.width=a=0<b._container.clientWidth?
19
+ b._container.clientWidth:b.width;b._options.height?c=b.height:b.height=c=0<b._container.clientHeight?b._container.clientHeight:b.height;if(b.canvas.width!==a*P||b.canvas.height!==c*P)W(b.canvas,a,c),W(b.overlaidCanvas,a,c),W(b._eventManager.ghostCanvas,a,c),b.render()});this._toolBar.style.display="none";this.bounds={x1:0,y1:0,x2:this.width,y2:this.height};b=this;K(this.overlaidCanvas,"click",function(a){b._mouseEventHandler(a)});K(this.overlaidCanvas,"mousemove",function(a){b._mouseEventHandler(a)});
20
+ K(this.overlaidCanvas,"mouseup",function(a){b._mouseEventHandler(a)});K(this.overlaidCanvas,"mousedown",function(a){b._mouseEventHandler(a)});K(this.overlaidCanvas,"mouseout",function(a){b._mouseEventHandler(a)});K(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",function(a){b._touchEventHandler(a)});K(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",function(a){b._touchEventHandler(a)});K(this.overlaidCanvas,window.navigator.msPointerEnabled?
21
+ "MSPointerUp":"touchend",function(a){b._touchEventHandler(a)});K(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerCancel":"touchcancel",function(a){b._touchEventHandler(a)});this._toolTip=new L(this,this._options.toolTip,this.theme);this.layoutManager=new S(this);this.axisY2=this.axisY=this.axisX=this.data=null;this.renderCount=0;this.creditText&&this.creditHref&&(this._creditLink=document.createElement("a"),this._creditLink.setAttribute("class","canvasjs-chart-credit"),this._creditLink.setAttribute("style",
22
+ "outline:none;margin:0px;position:absolute;right:3px;top:"+(e-14)+"px;color:dimgrey;text-decoration:none;font-size:10px;font-family:Lucida Grande, Lucida Sans Unicode, Arial, sans-serif"),this._creditLink.setAttribute("tabIndex",-1),this._creditLink.setAttribute("href",this.creditHref),this._creditLink.innerHTML=this.creditText,this._creditLink.setAttribute("target","_blank"),this._canvasJSContainer.appendChild(this._creditLink));this.sessionVariables={axisX:{internalMinimum:null,internalMaximum:null},
23
+ axisY:{internalMinimum:null,internalMaximum:null},axisY2:{internalMinimum:null,internalMaximum:null}}}}else window.console&&window.console.log('CanvasJS Error: Chart Container with id "'+this._containerId+'" was not found')}function na(a,c){for(var b=[],d=0;d<a.length;d++)if(0==d)b.push(a[0]);else{var e,g,f;f=d-1;e=0===f?0:f-1;g=f===a.length-1?f:f+1;b[b.length]={x:a[f].x+(a[g].x-a[e].x)/c/3,y:a[f].y+(a[g].y-a[e].y)/c/3};f=d;e=0===f?0:f-1;g=f===a.length-1?f:f+1;b[b.length]={x:a[f].x-(a[g].x-a[e].x)/
24
+ c/3,y:a[f].y-(a[g].y-a[e].y)/c/3};b[b.length]=a[d]}return b}function S(a){this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=0;this.chart=a}function F(a,c){F.parent.constructor.call(this,"TextBlock",c);this.ctx=a;this._isDirty=!0;this._wrappedText=null;this._lineHeight=V(this.fontFamily,this.fontSize,this.fontWeight)}function T(a,c){T.parent.constructor.call(this,"Title",c,a.theme);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;"undefined"===typeof this._options.fontSize&&
25
+ (this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.height=this.width=null;this.bounds={x1:null,y1:null,x2:null,y2:null}}function $(a,c,b){$.parent.constructor.call(this,"Legend",c,b);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.height=this.width=0;this.orientation=null;this.horizontalSpacing=10;this.dataSeries=[];this.bounds={x1:null,y1:null,x2:null,y2:null};"undefined"===typeof this._options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.lineHeight=
26
+ V(this.fontFamily,this.fontSize,this.fontWeight)}function da(a,c){da.parent.constructor.call(this,c);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx}function M(a,c,b,d,e){M.parent.constructor.call(this,"DataSeries",c,b);this.chart=a;this.canvas=a.canvas;this._ctx=a.canvas.ctx;this.index=d;this.maxWidthInX=this.noDataPointsInPlotArea=0;this.id=e;this.dataPointIds=[];this.axisY=this.axisX=null;this.axisPlacement=this.getDefaultAxisPlacement();"undefined"===typeof this._options.indexLabelFontSize&&
27
+ (this.indexLabelFontSize=this.chart.getAutoFontSize(this.indexLabelFontSize))}function A(a,c,b,d){A.parent.constructor.call(this,"Axis",c,a.theme);this.chart=a;this.canvas=a.canvas;this.ctx=a.ctx;this.intervalStartPosition=this.maxHeight=this.maxWidth=0;this.labels=[];this._labels=null;this.dataInfo={min:Infinity,max:-Infinity,viewPortMin:Infinity,viewPortMax:-Infinity,minDiff:Infinity};"axisX"===b?(this.sessionVariables=this.chart.sessionVariables[b],this._options.interval||(this.intervalType=null)):
28
+ this.sessionVariables="left"===d||"top"===d?this.chart.sessionVariables.axisY:this.chart.sessionVariables.axisY2;"undefined"===typeof this._options.titleFontSize&&(this.titleFontSize=this.chart.getAutoFontSize(this.titleFontSize));"undefined"===typeof this._options.labelFontSize&&(this.labelFontSize=this.chart.getAutoFontSize(this.labelFontSize));this.type=b;c&&"undefined"!==typeof c.gridThickness||(this.gridThickness="axisX"===b?0:1);this._position=d;this.lineCoordinates={x1:null,y1:null,x2:null,
29
+ y2:null,width:null};this.labelAngle=(this.labelAngle%360+360)%360;90<this.labelAngle&&270>=this.labelAngle?this.labelAngle-=180:180<this.labelAngle&&270>=this.labelAngle?this.labelAngle-=180:270<this.labelAngle&&360>=this.labelAngle&&(this.labelAngle-=360);this._absoluteMaximum=this._absoluteMinimum=this._titleTextBlock=null;this.hasOptionChanged("minimum")&&(this.sessionVariables.internalMinimum=this.minimum);this.hasOptionChanged("maximum")&&(this.sessionVariables.internalMaximum=this.maximum);
30
+ this.trackChanges("minimum");this.trackChanges("maximum")}function L(a,c,b){L.parent.constructor.call(this,"ToolTip",c,b);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.currentDataPointIndex=this.currentSeriesIndex=-1;this._timerId=0;this._prevY=this._prevX=NaN;this._initialize()}function Z(a){this.chart=a;this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.ghostCanvas=Y(this.chart.width,this.chart.height);this.ghostCtx=
31
+ this.ghostCanvas.getContext("2d")}function oa(a,c){var b;c&&ea[c]&&(b=ea[c]);T.parent.constructor.call(this,"CultureInfo",b,a.theme);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx}var u=!!document.createElement("canvas").getContext,pa={Chart:{width:500,height:400,zoomEnabled:!1,backgroundColor:"white",theme:"theme1",animationEnabled:u?!0:!1,colorSet:"colorSet1",culture:"en",creditHref:"http://canvasjs.com/",creditText:"CanvasJS.com"},CultureInfo:{decimalSeparator:".",digitGroupSeparator:",",
32
+ zoomText:"Zoom",panText:"Pan",resetText:"Reset",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")},Title:{padding:0,text:null,verticalAlign:"top",horizontalAlign:"center",fontSize:20,fontFamily:"Calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",
33
+ borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:null,margin:5},DataSeries:{name:null,dataPoints:null,label:"",bevelEnabled:!1,cursor:null,indexLabel:"",indexLabelPlacement:"outside",indexLabelOrientation:"horizontal",indexLabelFontColor:"black",indexLabelFontSize:12,indexLabelFontStyle:"normal",indexLabelFontFamily:"Arial",indexLabelFontWeight:"normal",indexLabelBackgroundColor:null,indexLabelLineColor:null,indexLabelLineThickness:1,indexLabelMaxWidth:null,indexLabelWrap:!0,lineThickness:2,
34
+ color:null,startAngle:0,type:"column",xValueType:"number",axisYType:"primary",xValueFormatString:null,yValueFormatString:null,showInLegend:null,legendMarkerType:null,legendMarkerColor:null,legendText:null,markerType:"circle",markerColor:null,markerSize:null,markerBorderColor:null,markerBorderThickness:null,mouseover:null,mouseout:null,mousemove:null,click:null,toolTipContent:null},Axis:{minimum:null,maximum:null,interval:null,intervalType:null,title:null,titleFontColor:"black",titleFontSize:20,titleFontFamily:"arial",
35
+ titleFontWeight:"normal",titleFontStyle:"normal",labelAngle:0,labelFontFamily:"arial",labelFontColor:"black",labelFontSize:12,labelFontWeight:"normal",labelFontStyle:"normal",labelAutoFit:!1,labelWrap:!0,labelMaxWidth:null,prefix:"",suffix:"",includeZero:!0,tickLength:5,tickColor:"black",tickThickness:1,lineColor:"black",lineThickness:1,gridColor:"A0A0A0",gridThickness:0,interlacedColor:null,valueFormatString:null,margin:2},Legend:{name:null,borderThickness:0,borderColor:"black",cornerRadius:0,verticalAlign:"center",
36
+ horizontalAlign:"right",fontSize:14,fontFamily:"calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal"},ToolTip:{enabled:!0,borderColor:null,shared:!1,animationEnabled:!0,content:null},TextBlock:{x:0,y:0,width:null,height:null,maxWidth:null,maxHeight:null,padding:0,angle:0,text:"",horizontalAlign:"center",fontSize:12,fontFamily:"calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:null,textBaseline:"top"}},
37
+ ea={en:{}},U={colorSet1:"#369EAD #C24642 #7F6084 #86B402 #A2D1CF #C8B631 #6DBCEB #52514E #4F81BC #A064A1 #F79647".split(" "),colorSet2:"#4F81BC #C0504E #9BBB58 #23BFAA #8064A1 #4AACC5 #F79647 #33558B".split(" "),colorSet3:"#8CA1BC #36845C #017E82 #8CB9D0 #708C98 #94838D #F08891 #0366A7 #008276 #EE7757 #E5BA3A #F2990B #03557B #782970".split(" ")},ca={theme1:{Chart:{colorSet:U[0]},Title:{fontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",fontSize:33,fontColor:"#3A3A3A",fontWeight:"bold",
38
+ verticalAlign:"top",margin:10},Axis:{titleFontSize:26,titleFontColor:"#666666",titleFontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",labelFontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",labelFontSize:18,labelFontColor:"grey",tickColor:"#BBBBBB",tickThickness:2,gridThickness:2,gridColor:"#BBBBBB",lineThickness:2,lineColor:"#BBBBBB"},Legend:{verticalAlign:"bottom",horizontalAlign:"center",fontFamily:u?"monospace, sans-serif,arial black":"calibri"},
39
+ DataSeries:{indexLabelFontColor:"grey",indexLabelFontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",indexLabelFontSize:18,indexLabelLineThickness:1}},theme2:{Chart:{colorSet:"colorSet2"},Title:{fontFamily:"impact, charcoal, arial black, sans-serif",fontSize:32,fontColor:"#333333",verticalAlign:"top",margin:10},Axis:{titleFontSize:22,titleFontColor:"rgb(98,98,98)",titleFontFamily:u?"monospace, sans-serif,arial black":"arial",titleFontWeight:"bold",labelFontFamily:u?"monospace, Courier New, Courier":
40
+ "arial",labelFontSize:16,labelFontColor:"grey",labelFontWeight:"bold",tickColor:"grey",tickThickness:2,gridThickness:2,gridColor:"grey",lineThickness:0},Legend:{verticalAlign:"bottom",horizontalAlign:"center",fontFamily:u?"monospace, sans-serif,arial black":"arial"},DataSeries:{indexLabelFontColor:"grey",indexLabelFontFamily:u?"Courier New, Courier, monospace":"arial",indexLabelFontWeight:"bold",indexLabelFontSize:18,indexLabelLineThickness:1}},theme3:{Chart:{colorSet:"colorSet1"},Title:{fontFamily:u?
41
+ "Candara, Optima, Trebuchet MS, Helvetica Neue, Helvetica, Trebuchet MS, serif":"calibri",fontSize:32,fontColor:"rgb(68,78,58)",fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"top",margin:10},Axis:{titleFontSize:22,titleFontColor:"rgb(98,98,98)",titleFontFamily:u?"Verdana, Geneva, Calibri, sans-serif":"calibri",labelFontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",labelFontSize:18,labelFontColor:"grey",tickColor:"grey",tickThickness:2,gridThickness:2,gridColor:"grey",
42
+ lineThickness:2,lineColor:"grey"},Legend:{verticalAlign:"bottom",horizontalAlign:"center",fontFamily:u?"monospace, sans-serif,arial black":"calibri"},DataSeries:{bevelEnabled:!0,indexLabelFontColor:"grey",indexLabelFontFamily:u?"Candara, Optima, Calibri, Verdana, Geneva, sans-serif":"calibri",indexLabelFontSize:18,indexLabelLineColor:"lightgrey",indexLabelLineThickness:2}}},y={numberDuration:1,yearDuration:314496E5,monthDuration:2592E6,weekDuration:6048E5,dayDuration:864E5,hourDuration:36E5,minuteDuration:6E4,
43
+ secondDuration:1E3,millisecondDuration:1,dayOfWeekFromInt:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")},ja={},O=null,qa=function(){var a=/D{1,4}|M{1,4}|Y{1,4}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|f{1,3}|t{1,2}|T{1,2}|K|z{1,3}|"[^"]*"|'[^']*'/g,c="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),b="Sun Mon Tue Wed Thu Fri Sat".split(" "),d="January February March April May June July August September October November December".split(" "),e="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
44
+ g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,f=/[^-+\dA-Z]/g;return function(k,m,l){var h=l?l.days:c,r=l?l.months:d,s=l?l.shortDays:b,n=l?l.shortMonths:e;l="";var p=!1;k=k&&k.getTime?k:k?new Date(k):new Date;if(isNaN(k))throw SyntaxError("invalid date");"UTC:"==m.slice(0,4)&&(m=m.slice(4),p=!0);l=p?"getUTC":"get";var t=k[l+"Date"](),q=k[l+"Day"](),u=k[l+"Month"](),w=k[l+"FullYear"](),x=k[l+"Hours"](),v=k[l+
45
+ "Minutes"](),E=k[l+"Seconds"](),D=k[l+"Milliseconds"](),y=p?0:k.getTimezoneOffset();return l=m.replace(a,function(a){switch(a){case "D":return t;case "DD":return G(t,2);case "DDD":return s[q];case "DDDD":return h[q];case "M":return u+1;case "MM":return G(u+1,2);case "MMM":return n[u];case "MMMM":return r[u];case "Y":return parseInt(String(w).slice(-2));case "YY":return G(String(w).slice(-2),2);case "YYY":return G(String(w).slice(-3),3);case "YYYY":return G(w,4);case "h":return x%12||12;case "hh":return G(x%
46
+ 12||12,2);case "H":return x;case "HH":return G(x,2);case "m":return v;case "mm":return G(v,2);case "s":return E;case "ss":return G(E,2);case "f":return String(D).slice(0,1);case "ff":return G(String(D).slice(0,2),2);case "fff":return G(String(D).slice(0,3),3);case "t":return 12>x?"a":"p";case "tt":return 12>x?"am":"pm";case "T":return 12>x?"A":"P";case "TT":return 12>x?"AM":"PM";case "K":return p?"UTC":(String(k).match(g)||[""]).pop().replace(f,"");case "z":return(0<y?"-":"+")+Math.floor(Math.abs(y)/
47
+ 60);case "zz":return(0<y?"-":"+")+G(Math.floor(Math.abs(y)/60),2);case "zzz":return(0<y?"-":"+")+G(Math.floor(Math.abs(y)/60),2)+G(Math.abs(y)%60,2);default:return a.slice(1,a.length-1)}})}}(),fa=function(a,c,b){a=Number(a);var d=0>a?!0:!1;d&&(a*=-1);decimalSeparator=b?b.decimalSeparator:".";digitGroupSeparator=b?b.digitGroupSeparator:",";var e="";c=String(c);for(var e=1,g=b="",f=-1,k=[],m=[],l=0,h=0,r=0,e=1,s=!1,n=0,g=c.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g),p=0;g&&p<g.length;p++)if(c=
48
+ g[p],"."===c&&0>f)f=p;else{if("%"===c)e*=100;else if("\u2030"===c){e*=1E3;continue}else if(","===c[0]&&"."===c[c.length-1]){e/=Math.pow(1E3,c.length-1);f=p+c.length-1;continue}else"E"!==c[0]&&"e"!==c[0]||"0"!==c[c.length-1]||(s=!0);0>f?(k.push(c),"#"===c||"0"===c?l++:","===c&&r++):(m.push(c),"#"!==c&&"0"!==c||h++)}s&&(c=Math.floor(a),n=(0===c?"":String(c)).length-l,e/=Math.pow(10,n));0>f&&(f=p);e=(a*e).toFixed(h);c=e.split(".");a=(c[0]+"").split("");e=(c[1]+"").split("");a&&"0"===a[0]&&a.shift();
49
+ for(p=s=g=h=f=0;0<k.length;)if(c=k.pop(),"#"===c||"0"===c)if(f++,f===l){var t=a;a=[];if("0"===c)for(c=l-h-(t?t.length:0);0<c;)t.unshift("0"),c--;for(;0<t.length;)b=t.pop()+b,p++,0===p%s&&(g===r&&0<t.length)&&(b=digitGroupSeparator+b);d&&(b="-"+b)}else 0<a.length?(b=a.pop()+b,h++,p++):"0"===c&&(b="0"+b,h++,p++),0===p%s&&(g===r&&0<a.length)&&(b=digitGroupSeparator+b);else"E"!==c[0]&&"e"!==c[0]||"0"!==c[c.length-1]||!/[eE][+-]*[0]+/.test(c)?","===c?(g++,s=p,p=0,0<a.length&&(b=digitGroupSeparator+b)):
50
+ b=1<c.length&&('"'===c[0]&&'"'===c[c.length-1]||"'"===c[0]&&"'"===c[c.length-1])?c.slice(1,c.length-1)+b:c+b:(c=0>n?c.replace("+","").replace("-",""):c.replace("-",""),b+=c.replace(/[0]+/,function(a){return G(n,a.length)}));for(d=0;0<m.length;)c=m.shift(),"#"===c||"0"===c?0<e.length&&0!==Number(e.join(""))?b+=(0===d++?decimalSeparator:"")+e.shift():"0"===c&&(b+=(0===d++?decimalSeparator:"")+"0"):1<c.length&&('"'===c[0]&&'"'===c[c.length-1]||"'"===c[0]&&"'"===c[c.length-1])?b+=(0===d++?decimalSeparator:
51
+ "")+c.slice(1,c.length-1):"E"!==c[0]&&"e"!==c[0]||"0"!==c[c.length-1]||!/[eE][+-]*[0]+/.test(c)?b+=(0===d++?decimalSeparator:"")+c:(c=0>n?c.replace("+","").replace("-",""):c.replace("-",""),b+=c.replace(/[0]+/,function(a){return G(n,a.length)}));return b},ra=function(a){var c=0,b=0;a||(a=window.event);a.offsetX||0===a.offsetX?(c=a.offsetX,b=a.offsetY):a.layerX||0==a.layerX?(c=a.layerX,b=a.layerY):(c=a.pageX-a.target.offsetLeft,b=a.pageY-a.target.offsetTop);return{x:c,y:b}},ma=!0,ba=window.devicePixelRatio||
52
+ 1,X=1,P=ma?ba/X:1;I.prototype.setOptions=function(a,c){if(pa[this._defaultsKey]){var b=pa[this._defaultsKey];for(prop in b)this[prop]=a&&prop in a?a[prop]:c&&prop in c?c[prop]:b[prop]}};I.prototype.trackChanges=function(a){this._options._oldOptions||(this._options._oldOptions={});this._options._oldOptions[a]=this._options[a]};I.prototype.isBeingTracked=function(a){this._options._oldOptions||(this._options._oldOptions={});return this._options._oldOptions[a]?!0:!1};I.prototype.hasOptionChanged=function(a){this._options._oldOptions||
53
+ (this._options._oldOptions={});return this._options._oldOptions[a]!==this._options[a]};N(v,I);v.prototype._initialize=function(){this._selectedColorSet="undefined"!==typeof U[this.colorSet]?U[this.colorSet]:U.colorSet1;this.ctx.clearRect(0,0,this.width,this.height);this.ctx.beginPath();this.axisY2=this.axisY=this.axisX=null;this._indexLabels=[];this._dataInRenderedOrder=[];this._events=[];this._eventManager&&this._eventManager.reset();this.plotInfo={axisPlacement:null,axisXValueType:null,plotTypes:[]};
54
+ this.layoutManager.reset();this._cultureInfo=new oa(this,this._options.culture);this.data=[];for(var a=0,c=0;c<this._options.data.length;c++)if(a++,!this._options.data[c].type||0<=v._supportedChartTypes.indexOf(this._options.data[c].type)){var b=new M(this,this._options.data[c],this.theme,a-1,++this._eventManager.lastObjectId);null===b.name&&(b.name="DataSeries "+a);null===b.color?1<this._options.data.length?(b._colorSet=[this._selectedColorSet[b.index%this._selectedColorSet.length]],b.color=this._selectedColorSet[b.index%
55
+ this._selectedColorSet.length]):b._colorSet="line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type?[this._selectedColorSet[0]]:this._selectedColorSet:b._colorSet=[b.color];null===b.markerSize&&(("line"===b.type||"stepLine"===b.type||"spline"===b.type)&&b.dataPoints&&b.dataPoints.length<this.width/16||"scatter"===b.type)&&(b.markerSize=8);"bubble"!==b.type&&"scatter"!==b.type||!b.dataPoints||
56
+ b.dataPoints.sort(va);this.data.push(b);var d=b.axisPlacement,e;"normal"===d?"xySwapped"===this.plotInfo.axisPlacement?e='You cannot combine "'+b.type+'" with bar chart':"none"===this.plotInfo.axisPlacement?e='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="normal"):"xySwapped"===d?"normal"===this.plotInfo.axisPlacement?e='You cannot combine "'+b.type+'" with line, area, column or pie chart':"none"===this.plotInfo.axisPlacement?e='You cannot combine "'+
57
+ b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="xySwapped"):"none"==d&&("normal"===this.plotInfo.axisPlacement?e='You cannot combine "'+b.type+'" with line, area, column or bar chart':"xySwapped"===this.plotInfo.axisPlacement?e='You cannot combine "'+b.type+'" with bar chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="none"));if(e&&window.console){window.console.log(e);return}}this._objectsInitialized=!0};v._supportedChartTypes="line stepLine spline column area stepArea splineArea bar bubble scatter stackedColumn stackedColumn100 stackedBar stackedBar100 stackedArea stackedArea100 pie doughnut".split(" ");
58
+ v._supportedChartTypes.indexOf||(v._supportedChartTypes.indexOf=function(a,c){var b=this.length>>>0,d=Number(c)||0,d=0>d?Math.ceil(d):Math.floor(d);for(0>d&&(d+=b);d<b;d++)if(d in this&&this[d]===a)return d;return-1});v.prototype.render=function(){this._initialize();for(var a=0;a<this.data.length;a++)if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)this.data[a].axisYType&&"primary"!==this.data[a].axisYType?"secondary"===this.data[a].axisYType&&(this.axisY2||("normal"===
59
+ this.plotInfo.axisPlacement?this.axisY2=new A(this,this._options.axisY2,"axisY","right"):"xySwapped"===this.plotInfo.axisPlacement&&(this.axisY2=new A(this,this._options.axisY2,"axisY","top"))),this.data[a].axisY=this.axisY2):(this.axisY||("normal"===this.plotInfo.axisPlacement?this.axisY=new A(this,this._options.axisY,"axisY","left"):"xySwapped"===this.plotInfo.axisPlacement&&(this.axisY=new A(this,this._options.axisY,"axisY","bottom"))),this.data[a].axisY=this.axisY),this.axisX||("normal"===this.plotInfo.axisPlacement?
60
+ this.axisX=new A(this,this._options.axisX,"axisX","bottom"):"xySwapped"===this.plotInfo.axisPlacement&&(this.axisX=new A(this,this._options.axisX,"axisX","left"))),this.data[a].axisX=this.axisX;this._processData();this._options.title&&(this._title=new T(this,this._options.title),this._title.render());this.legend=new $(this,this._options.legend,this.theme);for(a=0;a<this.data.length;a++)this.data[a].showInLegend&&this.legend.dataSeries.push(this.data[a]);this.legend.render();if("normal"===this.plotInfo.axisPlacement||
61
+ "xySwapped"===this.plotInfo.axisPlacement)this.layoutManager.getFreeSpace(),A.setLayoutAndRender(this.axisX,this.axisY,this.axisY2,this.plotInfo.axisPlacement,this.layoutManager.getFreeSpace());else if("none"===this.plotInfo.axisPlacement)this.preparePlotArea();else return;for(a=0;a<this.plotInfo.plotTypes.length;a++)for(var c=this.plotInfo.plotTypes[a],b=0;b<c.plotUnits.length;b++){var d=c.plotUnits[b];"line"===d.type?this.renderLine(d):"stepLine"===d.type?this.renderStepLine(d):"spline"===d.type?
62
+ this.renderSpline(d):"column"===d.type?this.renderColumn(d):"bar"===d.type?this.renderBar(d):"area"===d.type?this.renderArea(d):"stepArea"===d.type?this.renderStepArea(d):"splineArea"===d.type?this.renderSplineArea(d):"stackedColumn"===d.type?this.renderStackedColumn(d):"stackedColumn100"===d.type?this.renderStackedColumn100(d):"stackedBar"===d.type?this.renderStackedBar(d):"stackedBar100"===d.type?this.renderStackedBar100(d):"stackedArea"===d.type?this.renderStackedArea(d):"stackedArea100"===d.type?
63
+ this.renderStackedArea100(d):"bubble"===d.type?this.renderBubble(d):"scatter"===d.type?this.renderScatter(d):"pie"===d.type?this.renderPie(d):"doughnut"===d.type&&this.renderPie(d);for(var e=0;e<d.dataSeriesIndexes.length;e++)this._dataInRenderedOrder.push(this.data[d.dataSeriesIndexes[e]])}0<this._indexLabels.length&&this.renderIndexLabels();this.attachPlotAreaEventHandlers();this.zoomEnabled||(this.panEnabled||"none"===this._toolBar.style.display)||(this._toolBar.style.display="none");this._toolTip._updateToolTip();
64
+ this.renderCount++};v.prototype.attachPlotAreaEventHandlers=function(){this.attachEvent({context:this,chart:this,mousedown:this._plotAreaMouseDown,mouseup:this._plotAreaMouseUp,mousemove:this._plotAreaMouseMove,cursor:this.zoomEnabled?"col-resize":"move",cursor:this.panEnabled?"move":"default",capture:!0,bounds:this.plotArea})};v.prototype.categoriseDataSeries=function(){for(var a="",c=0;c<this.data.length;c++)if(a=this.data[c],a.dataPoints&&0!==a.dataPoints.length&&0<=v._supportedChartTypes.indexOf(a.type)){for(var b=
65
+ null,d=!1,e=null,g=!1,f=0;f<this.plotInfo.plotTypes.length;f++)if(this.plotInfo.plotTypes[f].type===a.type){d=!0;b=this.plotInfo.plotTypes[f];break}d||(b={type:a.type,totalDataSeries:0,plotUnits:[]},this.plotInfo.plotTypes.push(b));for(f=0;f<b.plotUnits.length;f++)if(b.plotUnits[f].axisYType===a.axisYType){g=!0;e=b.plotUnits[f];break}g||(e={type:a.type,previousDataSeriesCount:0,index:b.plotUnits.length,plotType:b,axisYType:a.axisYType,axisY:"primary"===a.axisYType?this.axisY:this.axisY2,axisX:this.axisX,
66
+ dataSeriesIndexes:[]},b.plotUnits.push(e));b.totalDataSeries++;e.dataSeriesIndexes.push(c)}for(c=0;c<this.plotInfo.plotTypes.length;c++)for(b=this.plotInfo.plotTypes[c],f=a=0;f<b.plotUnits.length;f++)b.plotUnits[f].previousDataSeriesCount=a,a+=b.plotUnits[f].dataSeriesIndexes.length};v.prototype.assignIdToDataPoints=function(){for(var a=0;a<this.data.length;a++){var c=this.data[a];if(c.dataPoints)for(var b=c.dataPoints.length,d=0;d<b;d++)c.dataPointIds[d]=++this._eventManager.lastObjectId}};v.prototype._processData=
67
+ function(){this.assignIdToDataPoints();this.categoriseDataSeries();for(var a=0;a<this.plotInfo.plotTypes.length;a++)for(var c=this.plotInfo.plotTypes[a],b=0;b<c.plotUnits.length;b++){var d=c.plotUnits[b];"line"===d.type||"stepLine"===d.type||"spline"===d.type||"column"===d.type||"area"===d.type||"stepArea"===d.type||"splineArea"===d.type||"bar"===d.type||"bubble"===d.type||"scatter"===d.type?this._processMultiseriesPlotUnit(d):"stackedColumn"===d.type||"stackedBar"===d.type||"stackedArea"===d.type?
68
+ this._processStackedPlotUnit(d):"stackedColumn100"!==d.type&&"stackedBar100"!==d.type&&"stackedArea100"!==d.type||this._processStacked100PlotUnit(d)}};v.prototype._processMultiseriesPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var c=a.axisY.dataInfo,b=a.axisX.dataInfo,d,e,g=!1,f=0;f<a.dataSeriesIndexes.length;f++){var k=this.data[a.dataSeriesIndexes[f]],m=0,l=!1,h=!1;if("normal"===k.axisPlacement||"xySwapped"===k.axisPlacement)var r=this.sessionVariables.axisX.internalMinimum?
69
+ this.sessionVariables.axisX.internalMinimum:this._options.axisX&&this._options.axisX.minimum?this._options.axisX.minimum:-Infinity,s=this.sessionVariables.axisX.internalMaximum?this.sessionVariables.axisX.internalMaximum:this._options.axisX&&this._options.axisX.maximum?this._options.axisX.maximum:Infinity;if(k.dataPoints[m].x&&k.dataPoints[m].x.getTime||"dateTime"===k.xValueType)g=!0;for(m=0;m<k.dataPoints.length;m++){"undefined"===typeof k.dataPoints[m].x&&(k.dataPoints[m].x=m);k.dataPoints[m].x.getTime?
70
+ (g=!0,d=k.dataPoints[m].x.getTime()):d=k.dataPoints[m].x;e=k.dataPoints[m].y;d<b.min&&(b.min=d);d>b.max&&(b.max=d);e<c.min&&(c.min=e);e>c.max&&(c.max=e);if(0<m){var n=d-k.dataPoints[m-1].x;0>n&&(n*=-1);b.minDiff>n&&0!==n&&(b.minDiff=n)}if(!(d<r)||l){if(!l&&(l=!0,0<m)){m-=2;continue}if(d>s&&!h)h=!0;else if(d>s&&h)continue;k.dataPoints[m].label&&(a.axisX.labels[d]=k.dataPoints[m].label);d<b.viewPortMin&&(b.viewPortMin=d);d>b.viewPortMax&&(b.viewPortMax=d);e<c.viewPortMin&&(c.viewPortMin=e);e>c.viewPortMax&&
71
+ (c.viewPortMax=e)}}this.plotInfo.axisXValueType=k.xValueType=g?"dateTime":"number"}};v.prototype._processStackedPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var c=a.axisY.dataInfo,b=a.axisX.dataInfo,d,e,g=!1,f=[],k=[],m=0;m<a.dataSeriesIndexes.length;m++){var l=this.data[a.dataSeriesIndexes[m]],h=0,r=!1,s=!1;if("normal"===l.axisPlacement||"xySwapped"===l.axisPlacement)var n=this.sessionVariables.axisX.internalMinimum?this.sessionVariables.axisX.internalMinimum:
72
+ this._options.axisX&&this._options.axisX.minimum?this._options.axisX.minimum:-Infinity,p=this.sessionVariables.axisX.internalMaximum?this.sessionVariables.axisX.internalMaximum:this._options.axisX&&this._options.axisX.maximum?this._options.axisX.maximum:Infinity;if(l.dataPoints[h].x&&l.dataPoints[h].x.getTime||"dateTime"===l.xValueType)g=!0;for(h=0;h<l.dataPoints.length;h++){"undefined"===typeof l.dataPoints[h].x&&(l.dataPoints[h].x=h);l.dataPoints[h].x.getTime?(g=!0,d=l.dataPoints[h].x.getTime()):
73
+ d=l.dataPoints[h].x;e=l.dataPoints[h].y;d<b.min&&(b.min=d);d>b.max&&(b.max=d);if(0<h){var t=d-l.dataPoints[h-1].x;0>t&&(t*=-1);b.minDiff>t&&0!==t&&(b.minDiff=t)}if(!(d<n)||r){if(!r&&(r=!0,0<h)){h-=2;continue}if(d>p&&!s)s=!0;else if(d>p&&s)continue;l.dataPoints[h].label&&(a.axisX.labels[d]=l.dataPoints[h].label);d<b.viewPortMin&&(b.viewPortMin=d);d>b.viewPortMax&&(b.viewPortMax=d);0<=e?f[d]=f[d]?f[d]+e:e:k[d]=k[d]?k[d]+e:e}}this.plotInfo.axisXValueType=l.xValueType=g?"dateTime":"number"}for(h in f)isNaN(h)||
74
+ (a=f[h],a<c.min&&(c.min=a),a>c.max&&(c.max=a),h<b.viewPortMin||h>b.viewPortMax||(a<c.viewPortMin&&(c.viewPortMin=a),a>c.viewPortMax&&(c.viewPortMax=a)));for(h in k)isNaN(h)||(a=k[h],a<c.min&&(c.min=a),a>c.max&&(c.max=a),h<b.viewPortMin||h>b.viewPortMax||(a<c.viewPortMin&&(c.viewPortMin=a),a>c.viewPortMax&&(c.viewPortMax=a)))}};v.prototype._processStacked100PlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var c=a.axisY.dataInfo,b=a.axisX.dataInfo,d,e,g=!1,f=!1,k=!1,
75
+ m=[],l=0;l<a.dataSeriesIndexes.length;l++){var h=this.data[a.dataSeriesIndexes[l]],r=0,s=!1,n=!1;if("normal"===h.axisPlacement||"xySwapped"===h.axisPlacement)var p=this.sessionVariables.axisX.internalMinimum?this.sessionVariables.axisX.internalMinimum:this._options.axisX&&this._options.axisX.minimum?this._options.axisX.minimum:-Infinity,t=this.sessionVariables.axisX.internalMaximum?this.sessionVariables.axisX.internalMaximum:this._options.axisX&&this._options.axisX.maximum?this._options.axisX.maximum:
76
+ Infinity;if(h.dataPoints[r].x&&h.dataPoints[r].x.getTime||"dateTime"===h.xValueType)g=!0;for(r=0;r<h.dataPoints.length;r++){"undefined"===typeof h.dataPoints[r].x&&(h.dataPoints[r].x=r);h.dataPoints[r].x.getTime?(g=!0,d=h.dataPoints[r].x.getTime()):d=h.dataPoints[r].x;e=h.dataPoints[r].y;d<b.min&&(b.min=d);d>b.max&&(b.max=d);if(0<r){var q=d-h.dataPoints[r-1].x;0>q&&(q*=-1);b.minDiff>q&&0!==q&&(b.minDiff=q)}if(!(d<p)||s){if(!s&&(s=!0,0<r)){r-=2;continue}if(d>t&&!n)n=!0;else if(d>t&&n)continue;h.dataPoints[r].label&&
77
+ (a.axisX.labels[d]=h.dataPoints[r].label);d<b.viewPortMin&&(b.viewPortMin=d);d>b.viewPortMax&&(b.viewPortMax=d);0<=e?f=!0:k=!0;m[d]=m[d]?m[d]+Math.abs(e):Math.abs(e)}}this.plotInfo.axisXValueType=h.xValueType=g?"dateTime":"number"}f&&!k?(c.max=99,c.min=1):f&&k?(c.max=99,c.min=-99):!f&&k&&(c.max=-1,c.min=-99);c.viewPortMin=c.min;c.viewPortMax=c.max;a.dataPointYSums=m}};v.prototype.getDataPointAtXY=function(a,c,b){b=b||!1;for(var d=[],e=this._dataInRenderedOrder.length-1;0<=e;e--){var g=null;(g=this._dataInRenderedOrder[e].getDataPointAtXY(a,
78
+ c,b))&&d.push(g)}a=null;c=!1;for(b=0;b<d.length;b++)if("line"===d[b].dataSeries.type||"stepLine"===d[b].dataSeries.type||"area"===d[b].dataSeries.type||"stepArea"===d[b].dataSeries.type)if(e=Q("markerSize",d[b].dataPoint,d[b].dataSeries)||8,d[b].distance<=e/2){c=!0;break}for(b=0;b<d.length;b++)c&&"line"!==d[b].dataSeries.type&&"stepLine"!==d[b].dataSeries.type&&"area"!==d[b].dataSeries.type&&"stepArea"!==d[b].dataSeries.type||(a?d[b].distance<=a.distance&&(a=d[b]):a=d[b]);return a};v.prototype.getAutoFontSize=
79
+ function(a,c,b){a/=400;return Math.round(Math.min(this.width,this.height)*a)};v.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)};v.prototype.attachEvent=function(a){this._events.push(a)};v.prototype._touchEventHandler=function(a){if(a.changedTouches){var c=[];first=(c=a.changedTouches)?c[0]:a;switch(a.type){case "touchstart":case "MSPointerDown":c=["mousemove","mousedown"];break;case "touchmove":case "MSPointerMove":c=["mousemove"];break;case "touchend":case "MSPointerUp":c=
80
+ "touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType?["mouseup","click"]:["mouseup"];break;default:return}this._lastTouchEventType=a.type;for(var b=0;b<c.length;b++){var d=c[b],e=document.createEvent("MouseEvent");e.initMouseEvent(d,!0,!0,window,1,first.screenX,first.screenY,first.clientX,first.clientY,!1,!1,!1,!1,0,null);first.target.dispatchEvent(e);a.preventManipulation&&a.preventManipulation();a.preventDefault&&a.preventDefault()}}};v.prototype._mouseEventHandler=
81
+ function(a){a.preventManipulation&&a.preventManipulation();a.preventDefault&&a.preventDefault();"undefined"===typeof a.target&&a.srcElement&&(a.target=a.srcElement);var c=ra(a),b=a.type,d,e;a.which?e=3==a.which:a.button&&(e=2==a.button);if(!e){if(v.capturedEventParam)d=v.capturedEventParam,"mouseup"===b&&(v.capturedEventParam=null,d.chart.overlaidCanvas.releaseCapture?d.chart.overlaidCanvas.releaseCapture():document.body.removeEventListener("mouseup",d.chart._mouseEventHandler,!1)),d.hasOwnProperty(b)&&
82
+ d[b].call(d.context,c.x,c.y);else if(this._events){for(e=0;e<this._events.length;e++)if(this._events[e].hasOwnProperty(b)){d=this._events[e];var g=d.bounds;if(c.x>=g.x1&&c.x<=g.x2&&c.y>=g.y1&&c.y<=g.y2){d[b].call(d.context,c.x,c.y);"mousedown"===b&&!0===d.capture?(v.capturedEventParam=d,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():document.body.addEventListener("mouseup",this._mouseEventHandler,!1)):"mouseup"===b&&(d.chart.overlaidCanvas.releaseCapture?d.chart.overlaidCanvas.releaseCapture():
83
+ document.body.removeEventListener("mouseup",this._mouseEventHandler,!1));break}else d=null}a.target.style.cursor=d&&d.cursor?d.cursor:this._defaultCursor}this._toolTip&&this._toolTip.enabled&&(b=this.plotArea,(c.x<b.x1||c.x>b.x2||c.y<b.y1||c.y>b.y2)&&this._toolTip.hide());this.isDrag&&this.zoomEnabled||!this._eventManager||this._eventManager.mouseEventHandler(a)}};v.prototype._plotAreaMouseDown=function(a,c){this.isDrag=!0;this.dragStartPoint="none"!==this.plotInfo.axisPlacement?{x:a,y:c,xMinimum:this.axisX.minimum,
84
+ xMaximum:this.axisX.maximum}:{x:a,y:c}};v.prototype._plotAreaMouseUp=function(a,c){var b,d;if(("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)&&this.isDrag){var e=0,e=this.axisX.lineCoordinates,e="xySwapped"===this.plotInfo.axisPlacement?c-this.dragStartPoint.y:this.dragStartPoint.x-a;Math.abs(this.axisX.maximum-this.axisX.minimum);if(2<Math.abs(e)){if(this.panEnabled)e=!1,d=0,this.axisX.sessionVariables.internalMinimum<this.axisX._absoluteMinimum?(d=this.axisX._absoluteMinimum-
85
+ this.axisX.sessionVariables.internalMinimum,this.axisX.sessionVariables.internalMinimum+=d,this.axisX.sessionVariables.internalMaximum+=d,e=!0):this.axisX.sessionVariables.internalMaximum>this.axisX._absoluteMaximum&&(d=this.axisX.sessionVariables.internalMaximum-this.axisX._absoluteMaximum,this.axisX.sessionVariables.internalMaximum-=d,this.axisX.sessionVariables.internalMinimum-=d,e=!0),e&&this.render();else if(this.zoomEnabled){this.resetOverlayedCanvas();if(!this.dragStartPoint)return;"xySwapped"===
86
+ this.plotInfo.axisPlacement?(b=Math.min(this.dragStartPoint.y,c),d=Math.max(this.dragStartPoint.y,c),1<Math.abs(b-d)&&(e=this.axisX.lineCoordinates,d=this.axisX.maximum-(this.axisX.maximum-this.axisX.minimum)/e.height*(d-e.y1),e=this.axisX.maximum-(this.axisX.maximum-this.axisX.minimum)/e.height*(b-e.y1),d=Math.max(d,this.axisX.dataInfo.min),e=Math.min(e,this.axisX.dataInfo.max),Math.abs((e-d)/this.axisX.dataInfo.minDiff)>=0.008*this.height&&(this.axisX.sessionVariables.internalMinimum=d,this.axisX.sessionVariables.internalMaximum=
87
+ e,this.render()))):"normal"===this.plotInfo.axisPlacement&&(d=Math.min(this.dragStartPoint.x,a),b=Math.max(this.dragStartPoint.x,a),1<Math.abs(d-b)&&(e=this.axisX.lineCoordinates,d=(this.axisX.maximum-this.axisX.minimum)/e.width*(d-e.x1)+this.axisX.minimum,e=(this.axisX.maximum-this.axisX.minimum)/e.width*(b-e.x1)+this.axisX.minimum,d=Math.max(d,this.axisX.dataInfo.min),e=Math.min(e,this.axisX.dataInfo.max),Math.abs((e-d)/this.axisX.dataInfo.minDiff)>=0.01*this.width&&(this.axisX.sessionVariables.internalMinimum=
88
+ d,this.axisX.sessionVariables.internalMaximum=e,this.render())))}this.zoomEnabled&&"none"===this._toolBar.style.display&&(this._toolBar.style.display="inline",this._zoomButton.innerHTML=this._cultureInfo.panText,this._resetButton.innerHTML=this._cultureInfo.resetText)}}this.isDrag=!1};v.prototype._plotAreaMouseMove=function(a,c){if(this.isDrag&&"none"!==this.plotInfo.axisPlacement){var b=0,d=0,d=this.axisX.lineCoordinates;"xySwapped"===this.plotInfo.axisPlacement?(b=c-this.dragStartPoint.y,d=Math.abs(this.axisX.maximum-
89
+ this.axisX.minimum)/d.height*b):(b=this.dragStartPoint.x-a,d=Math.abs(this.axisX.maximum-this.axisX.minimum)/d.width*b);2<Math.abs(b)&&8>Math.abs(b)&&(this.panEnabled||this.zoomEnabled)?this._toolTip.hide():!this._toolTip.enabled||(this.panEnabled||this.zoomEnabled)||this._toolTip.mouseMoveHandler(a,c);if(2<Math.abs(b)&&(this.panEnabled||this.zoomEnabled))if(this.panEnabled){this.axisX.sessionVariables.internalMinimum=this.dragStartPoint.xMinimum+d;this.axisX.sessionVariables.internalMaximum=this.dragStartPoint.xMaximum+
90
+ d;b=0;this.axisX.sessionVariables.internalMinimum<this.axisX._absoluteMinimum-R(this.axisX.interval,this.axisX.intervalType)?(b=this.axisX._absoluteMinimum-R(this.axisX.interval,this.axisX.intervalType)-this.axisX.sessionVariables.internalMinimum,this.axisX.sessionVariables.internalMinimum+=b,this.axisX.sessionVariables.internalMaximum+=b):this.axisX.sessionVariables.internalMaximum>this.axisX._absoluteMaximum+R(this.axisX.interval,this.axisX.intervalType)&&(b=this.axisX.sessionVariables.internalMaximum-
91
+ (this.axisX._absoluteMaximum+R(this.axisX.interval,this.axisX.intervalType)),this.axisX.sessionVariables.internalMaximum-=b,this.axisX.sessionVariables.internalMinimum-=b);var e=this;clearTimeout(this._panTimerId);this._panTimerId=setTimeout(function(){e.render()},0)}else this.zoomEnabled&&(b=this.plotArea,this.resetOverlayedCanvas(),d=this.overlaidCanvasCtx.globalAlpha,this.overlaidCanvasCtx.globalAlpha=0.7,this.overlaidCanvasCtx.fillStyle="#A0ABB8","xySwapped"===this.plotInfo.axisPlacement?this.overlaidCanvasCtx.fillRect(b.x1,
92
+ this.dragStartPoint.y,b.x2-b.x1,c-this.dragStartPoint.y):"normal"===this.plotInfo.axisPlacement&&this.overlaidCanvasCtx.fillRect(this.dragStartPoint.x,b.y1,a-this.dragStartPoint.x,b.y2-b.y1),this.overlaidCanvasCtx.globalAlpha=d)}else this._toolTip.enabled&&this._toolTip.mouseMoveHandler(a,c)};v.prototype.preparePlotArea=function(){var a=this.plotArea,c=this.axisY?this.axisY:this.axisY2;!u&&(0<a.x1||0<a.y1)&&a.ctx.translate(a.x1,a.y1);this.axisX&&c?(a.x1=this.axisX.lineCoordinates.x1<this.axisX.lineCoordinates.x2?
93
+ this.axisX.lineCoordinates.x1:c.lineCoordinates.x1,a.y1=this.axisX.lineCoordinates.y1<c.lineCoordinates.y1?this.axisX.lineCoordinates.y1:c.lineCoordinates.y1,a.x2=this.axisX.lineCoordinates.x2>c.lineCoordinates.x2?this.axisX.lineCoordinates.x2:c.lineCoordinates.x2,a.y2=this.axisX.lineCoordinates.y2>this.axisX.lineCoordinates.y1?this.axisX.lineCoordinates.y2:c.lineCoordinates.y2,a.width=a.x2-a.x1,a.height=a.y2-a.y1):(c=this.layoutManager.getFreeSpace(),a.x1=c.x1,a.x2=c.x2,a.y1=c.y1,a.y2=c.y2,a.width=
94
+ c.width,a.height=c.height);u||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.style.left=a.x1+"px",a.canvas.style.top=a.y1+"px",(0<a.x1||0<a.y1)&&a.ctx.translate(-a.x1,-a.y1))};v.prototype.getPixelCoordinatesOnPlotArea=function(a,c){return{x:this.axisX.getPixelCoordinatesOnAxis(a).x,y:this.axisY.getPixelCoordinatesOnAxis(c).y}};v.prototype.renderIndexLabels=function(){var a=this.plotArea.ctx;a.textBaseline="middle";for(var c=this.plotArea,b=0;b<this._indexLabels.length;b++){var d=this._indexLabels[b],
95
+ e,g,f;a.fillStyle=Q("indexLabelFontColor",d.dataPoint,d.dataSeries);a.font=la("indexLabel",d.dataPoint,d.dataSeries);var k=this.replaceKeywordsWithValue(Q("indexLabel",d.dataPoint,d.dataSeries),d.dataPoint,d.dataSeries),m=a.measureText(k).width,l=Q("indexLabelFontSize",d.dataPoint,d.dataSeries),h=Q("indexLabelPlacement",d.dataPoint,d.dataSeries),r=Q("indexLabelOrientation",d.dataPoint,d.dataSeries),s=f=0,n=0,p=0,t=0;d.point.x<c.x1||(d.point.x>c.x2||d.point.y<c.y1||d.point.y>c.y2)||("column"===d.chartType||
96
+ "stackedColumn"===d.chartType||"stackedColumn100"===d.chartType||"bar"===d.chartType||"stackedBar"===d.chartType||"stackedBar100"===d.chartType?(Math.abs(d.bounds.x1,d.bounds.x2),Math.abs(d.bounds.y1,d.bounds.y2),"normal"===this.plotInfo.axisPlacement?("outside"===h?(s=c.y1,n=c.y2):"inside"===h&&(s=d.bounds.y1,n=d.bounds.y2),"horizontal"===r?(e=d.point.x-m/2,g=0<=d.dataPoint.y?Math.min(Math.max(d.point.y-l/2-5,s+l/2+5),n-l/2-5):Math.max(Math.min(d.point.y+l/2+5,n-l/2),s+l/2+5)):"vertical"===r&&(e=
97
+ d.point.x,g=0<=d.dataPoint.y?Math.min(Math.max(d.point.y-5,s+m+5),n):Math.max(Math.min(d.point.y+m+5,n-5),s),f=-90)):"xySwapped"===this.plotInfo.axisPlacement&&("outside"===h?(p=c.x1,t=c.x2):"inside"===h&&(p=d.bounds.x1,t=d.bounds.x2),"horizontal"===r?(g=d.point.y,e=0<=d.dataPoint.y?Math.max(Math.min(d.point.x+5,t-m),p):Math.min(Math.max(d.point.x-m-5,p),t)):"vertical"===r&&(g=d.point.y+m/2,e=0<=d.dataPoint.y?Math.max(Math.min(d.point.x+l/2+5,t-l/2),p):Math.min(Math.max(d.point.x-l/2-5,p+l/2),t+l/
98
+ 2),f=-90))):"horizontal"===r?(e=d.point.x-m/2,g=0<=d.dataPoint.y?Math.max(d.point.y-l/2-5,c.y1+l/2):Math.min(d.point.y+l/2+5,c.y2-l/2)):"vertical"===r&&(e=d.point.x,g=0<=d.dataPoint.y?Math.max(d.point.y-5,c.y1+m):Math.min(d.point.y+m+5,c.y2),f=-90),a.save(),a.translate(e,g),a.rotate(Math.PI/180*f),a.fillText(k,0,0),a.restore())}};v.prototype.renderLine=function(a){var c=this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var d=this.plotArea;c.beginPath();
99
+ c.rect(d.x1,d.y1,d.width,d.height);c.clip();for(var d=[],e=0;e<a.dataSeriesIndexes.length;e++){var g=a.dataSeriesIndexes[e],f=this.data[g];c.lineWidth=f.lineThickness;var k=f.dataPoints,m=f.id;this._eventManager.objectMap[m]={objectType:"dataSeries",dataSeriesIndex:g};m=B(m);b.strokeStyle=m;b.lineWidth=0<f.lineThickness?Math.max(f.lineThickness,4):0;colorSet=f._colorSet;color=colorSet[0];c.strokeStyle=color;var m=!0,l=0,h,r;if(0<k.length){for(l=0;l<k.length;l++)if(h=k[l].getTime?k[l].x.getTime():
100
+ k[l].x,!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax)&&"number"===typeof k[l].y){h=a.axisX.convertionParameters.reference+a.axisX.convertionParameters.pixelPerUnit*(h-a.axisX.convertionParameters.minimum)+0.5<<0;r=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(k[l].y-a.axisY.convertionParameters.minimum)+0.5<<0;var s=f.dataPointIds[l];this._eventManager.objectMap[s]={objectType:"dataPoint",dataSeriesIndex:g,dataPointIndex:l,x1:h,y1:r};m?(c.beginPath(),
101
+ c.moveTo(h,r),u&&(b.beginPath(),b.moveTo(h,r)),m=!1):(c.lineTo(h,r),u&&b.lineTo(h,r),0==l%500&&(c.stroke(),c.beginPath(),c.moveTo(h,r),u&&(b.stroke(),b.beginPath(),b.moveTo(h,r))));if(0<k[l].markerSize||0<f.markerSize){var n=f.getMarkerProperties(l,h,r,c);d.push(n);if(!f.maxWidthInX||n.size>f.maxWidthInX)f.maxWidthInX=n.size/(1<a.axisX.convertionParameters.pixelPerUnit?a.axisX.convertionParameters.pixelPerUnit-1:a.axisX.convertionParameters.pixelPerUnit);s=B(s);u&&d.push({x:h,y:r,ctx:b,type:n.type,
102
+ size:n.size,color:s,borderColor:s,borderThickness:n.borderThickness})}(k[l].indexLabel||f.indexLabel)&&this._indexLabels.push({chartType:"line",dataPoint:k[l],dataSeries:f,point:{x:h,y:r},color:color})}c.stroke();u&&b.stroke()}}H.drawMarkers(d);c.restore();c.beginPath();u&&b.beginPath()}};v.prototype.renderStepLine=function(a){var c=this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var d=this.plotArea;c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);
103
+ c.clip();for(var d=[],e=0;e<a.dataSeriesIndexes.length;e++){var g=a.dataSeriesIndexes[e],f=this.data[g];c.lineWidth=f.lineThickness;var k=f.dataPoints,m=f.id;this._eventManager.objectMap[m]={objectType:"dataSeries",dataSeriesIndex:g};m=B(m);b.strokeStyle=m;b.lineWidth=0<f.lineThickness?Math.max(f.lineThickness,4):0;colorSet=f._colorSet;color=colorSet[0];c.strokeStyle=color;var m=!0,l=0,h,r;if(0<k.length){for(l=0;l<k.length;l++)if(h=k[l].getTime?k[l].x.getTime():k[l].x,!(h<a.axisX.dataInfo.viewPortMin||
104
+ h>a.axisX.dataInfo.viewPortMax)&&"number"===typeof k[l].y){var s=r;h=a.axisX.convertionParameters.reference+a.axisX.convertionParameters.pixelPerUnit*(h-a.axisX.convertionParameters.minimum)+0.5<<0;r=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(k[l].y-a.axisY.convertionParameters.minimum)+0.5<<0;var n=f.dataPointIds[l];this._eventManager.objectMap[n]={objectType:"dataPoint",dataSeriesIndex:g,dataPointIndex:l,x1:h,y1:r};m?(c.beginPath(),c.moveTo(h,r),u&&(b.beginPath(),
105
+ b.moveTo(h,r)),m=!1):(c.lineTo(h,s),u&&b.lineTo(h,s),c.lineTo(h,r),u&&b.lineTo(h,r),0==l%500&&(c.stroke(),c.beginPath(),c.moveTo(h,r),u&&(b.stroke(),b.beginPath(),b.moveTo(h,r))));if(0<k[l].markerSize||0<f.markerSize){s=f.getMarkerProperties(l,h,r,c);d.push(s);if(!f.maxWidthInX||s.size>f.maxWidthInX)f.maxWidthInX=s.size/(1<a.axisX.convertionParameters.pixelPerUnit?a.axisX.convertionParameters.pixelPerUnit-1:a.axisX.convertionParameters.pixelPerUnit);n=B(n);u&&d.push({x:h,y:r,ctx:b,type:s.type,size:s.size,
106
+ color:n,borderColor:n,borderThickness:s.borderThickness})}(k[l].indexLabel||f.indexLabel)&&this._indexLabels.push({chartType:"stepLine",dataPoint:k[l],dataSeries:f,point:{x:h,y:r},color:color})}c.stroke();u&&b.stroke()}}H.drawMarkers(d);c.restore();c.beginPath();u&&b.beginPath()}};v.prototype.renderSpline=function(a){var c=this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var d=this.plotArea;c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();
107
+ for(var d=[],e=0;e<a.dataSeriesIndexes.length;e++){var g=a.dataSeriesIndexes[e],f=this.data[g];c.lineWidth=f.lineThickness;var k=f.dataPoints,m=f.id;this._eventManager.objectMap[m]={objectType:"dataSeries",dataSeriesIndex:g};m=B(m);b.strokeStyle=m;b.lineWidth=0<f.lineThickness?Math.max(f.lineThickness,4):0;colorSet=f._colorSet;color=colorSet[0];c.strokeStyle=color;var m=0,l,h,r=[];if(0<k.length)for(m=0;m<k.length;m++)if(l=k[m].getTime?k[m].x.getTime():k[m].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&
108
+ "number"===typeof k[m].y){l=a.axisX.convertionParameters.reference+a.axisX.convertionParameters.pixelPerUnit*(l-a.axisX.convertionParameters.minimum)+0.5<<0;h=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(k[m].y-a.axisY.convertionParameters.minimum)+0.5<<0;var s=f.dataPointIds[m];this._eventManager.objectMap[s]={objectType:"dataPoint",dataSeriesIndex:g,dataPointIndex:m,x1:l,y1:h};r[r.length]={x:l,y:h};if(0<k[m].markerSize||0<f.markerSize){var n=f.getMarkerProperties(m,
109
+ l,h,c);d.push(n);if(!f.maxWidthInX||n.size>f.maxWidthInX)f.maxWidthInX=n.size/(1<a.axisX.convertionParameters.pixelPerUnit?a.axisX.convertionParameters.pixelPerUnit-1:a.axisX.convertionParameters.pixelPerUnit);s=B(s);u&&d.push({x:l,y:h,ctx:b,type:n.type,size:n.size,color:s,borderColor:s,borderThickness:n.borderThickness})}(k[m].indexLabel||f.indexLabel)&&this._indexLabels.push({chartType:"spline",dataPoint:k[m],dataSeries:f,point:{x:l,y:h},color:color})}g=na(r,2);if(0<g.length){c.beginPath();u&&b.beginPath();
110
+ c.moveTo(g[0].x,g[0].y);u&&b.moveTo(g[0].x,g[0].y);for(m=0;m<g.length-3;m+=3)c.bezierCurveTo(g[m+1].x,g[m+1].y,g[m+2].x,g[m+2].y,g[m+3].x,g[m+3].y),u&&b.bezierCurveTo(g[m+1].x,g[m+1].y,g[m+2].x,g[m+2].y,g[m+3].x,g[m+3].y),0<m&&0===m%3E3&&(c.stroke(),c.beginPath(),c.moveTo(g[m+3].x,g[m+3].y),u&&(b.stroke(),b.beginPath(),b.moveTo(g[m+3].x,g[m+3].y)));c.stroke();u&&b.stroke()}}H.drawMarkers(d);c.restore();c.beginPath();u&&b.beginPath()}};var J=function(a,c,b,d,e,g,f,k,m,l){var h=15<d-c&&15<e-b?8:0.35*
111
+ Math.min(d-c,e-b);color2="rgba(255, 255, 255, .4)";color3="rgba(255, 255, 255, 0.1)";color1=g;a.beginPath();a.moveTo(c,b);a.save();a.fillStyle=color1;a.fillRect(c,b,d-c,e-b);a.restore();!0===f&&(a.save(),a.beginPath(),a.moveTo(c,b),a.lineTo(c+h,b+h),a.lineTo(d-h,b+h),a.lineTo(d,b),a.closePath(),g=a.createLinearGradient((d+c)/2,b+h,(d+c)/2,b),g.addColorStop(0,color1),g.addColorStop(1,color2),a.fillStyle=g,a.fill(),a.restore());!0===k&&(a.save(),a.beginPath(),a.moveTo(c,e),a.lineTo(c+h,e-h),a.lineTo(d-
112
+ h,e-h),a.lineTo(d,e),a.closePath(),g=a.createLinearGradient((d+c)/2,e-h,(d+c)/2,e),g.addColorStop(0,color1),g.addColorStop(1,color2),a.fillStyle=g,a.fill(),a.restore());!0===m&&(a.save(),a.beginPath(),a.moveTo(c,b),a.lineTo(c+h,b+h),a.lineTo(c+h,e-h),a.lineTo(c,e),a.closePath(),g=a.createLinearGradient(c+h,(e+b)/2,c,(e+b)/2),g.addColorStop(0,color1),g.addColorStop(1,color3),a.fillStyle=g,a.fill(),a.restore());!0===l&&(a.save(),a.beginPath(),a.moveTo(d,b),a.lineTo(d-h,b+h),a.lineTo(d-h,e-h),a.lineTo(d,
113
+ e),g=a.createLinearGradient(d-h,(e+b)/2,d,(e+b)/2),g.addColorStop(0,color1),g.addColorStop(1,color3),a.fillStyle=g,g.addColorStop(0,color1),g.addColorStop(1,color3),a.fillStyle=g,a.fill(),a.closePath(),a.restore())};v.prototype.renderColumn=function(a){var c=this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,e=0,g,f,k,m=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(0-a.axisY.convertionParameters.minimum)<<0,l=0.15*this.width,e=a.axisX.dataInfo.minDiff,
114
+ h=0.9*(d.width/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(e)/a.plotType.totalDataSeries)<<0;c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();u&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(d=0;d<a.dataSeriesIndexes.length;d++){var r=a.dataSeriesIndexes[d],s=this.data[r],n=s.dataPoints;1==n.length&&(h=l);1>h?h=1:h>l&&(h=l);s.maxWidthInX=h/(1<a.axisX.convertionParameters.pixelPerUnit?
115
+ a.axisX.convertionParameters.pixelPerUnit-1:a.axisX.convertionParameters.pixelPerUnit);if(0<n.length)for(var p=5<h&&s.bevelEnabled?!0:!1,e=0;e<n.length;e++)if(n[e].getTime?k=n[e].x.getTime():k=n[e].x,!(k<a.axisX.dataInfo.viewPortMin||k>a.axisX.dataInfo.viewPortMax)&&"number"===typeof n[e].y){g=a.axisX.convertionParameters.reference+a.axisX.convertionParameters.pixelPerUnit*(k-a.axisX.convertionParameters.minimum)+0.5<<0;f=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*
116
+ (n[e].y-a.axisY.convertionParameters.minimum)+0.5<<0;g=g-a.plotType.totalDataSeries*h/2+(a.previousDataSeriesCount+d)*h<<0;var t=g+h<<0,q;0<=n[e].y?q=m:(q=f,f=m);f>q&&(q=f=q);b=n[e].color?n[e].color:s._colorSet[e%s._colorSet.length];J(c,g,f,t,q,b,p&&0<=n[e].y,0>n[e].y&&p,!1,!1);b=s.dataPointIds[e];this._eventManager.objectMap[b]={objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:e,x1:g,y1:f,x2:t,y2:q};b=B(b);u&&J(this._eventManager.ghostCtx,g,f,t,q,b,!1,!1,!1,!1);(n[e].indexLabel||s.indexLabel)&&
117
+ this._indexLabels.push({chartType:"column",dataPoint:n[e],dataSeries:s,point:{x:g+(t-g)/2,y:0<=n[e].y?f:q},bounds:{x1:g,y1:Math.min(f,q),x2:t,y2:Math.max(f,q)},color:b})}}c.restore();u&&this._eventManager.ghostCtx.restore()}};v.prototype.renderStackedColumn=function(a){var c=this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,e=[],g=[],f=0,k,m=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(0-a.axisY.convertionParameters.minimum)<<0,
118
+ l=0.15*this.width,f=a.axisX.dataInfo.minDiff,h=0.9*(d.width/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(f)/a.plotType.plotUnits.length)<<0;c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();u&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var r=0;r<a.dataSeriesIndexes.length;r++){var s=a.dataSeriesIndexes[r],n=this.data[s],p=n.dataPoints;1==p.length&&(h=l);1>h?h=1:h>l&&(h=l);n.maxWidthInX=
119
+ h/(1<a.axisX.convertionParameters.pixelPerUnit?a.axisX.convertionParameters.pixelPerUnit-1:a.axisX.convertionParameters.pixelPerUnit);if(0<p.length){var t=5<h&&n.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(f=0;f<p.length;f++)if(b=p[f].x.getTime?p[f].x.getTime():p[f].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof p[f].y){d=a.axisX.convertionParameters.reference+a.axisX.convertionParameters.pixelPerUnit*(b-a.axisX.convertionParameters.minimum)+0.5<<0;k=a.axisY.convertionParameters.reference+
120
+ a.axisY.convertionParameters.pixelPerUnit*(p[f].y-a.axisY.convertionParameters.minimum)+0.5<<0;var q=d-a.plotType.plotUnits.length*h/2+a.index*h<<0,z=q+h<<0,w;if(0<=p[f].y){var x=e[b]?e[b]:0;k-=x;w=m-x;e[b]=x+(w-k)}else x=g[b]?g[b]:0,w=k+x,k=m+x,g[b]=x+(w-k);b=p[f].color?p[f].color:n._colorSet[f%n._colorSet.length];J(c,q,k,z,w,b,t&&0<=p[f].y,0>p[f].y&&t,!1,!1);b=n.dataPointIds[f];this._eventManager.objectMap[b]={objectType:"dataPoint",dataSeriesIndex:s,dataPointIndex:f,x1:q,y1:k,x2:z,y2:w};b=B(b);
121
+ u&&J(this._eventManager.ghostCtx,q,k,z,w,b,!1,!1,!1,!1);(p[f].indexLabel||n.indexLabel)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:p[f],dataSeries:n,point:{x:d,y:0<=p[f].y?k:w},bounds:{x1:q,y1:Math.min(k,w),x2:z,y2:Math.max(k,w)},color:b})}}}c.restore();u&&this._eventManager.ghostCtx.restore()}};v.prototype.renderStackedColumn100=function(a){var c=this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,e=[],g=[],f=0,k,m=a.axisY.convertionParameters.reference+
122
+ a.axisY.convertionParameters.pixelPerUnit*(0-a.axisY.convertionParameters.minimum)<<0,l=0.15*this.width,f=a.axisX.dataInfo.minDiff,h=0.9*(d.width/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(f)/a.plotType.plotUnits.length)<<0;c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();u&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var r=0;r<a.dataSeriesIndexes.length;r++){var s=a.dataSeriesIndexes[r],
123
+ n=this.data[s],p=n.dataPoints;1==p.length&&(h=l);1>h?h=1:h>l&&(h=l);n.maxWidthInX=h/(1<a.axisX.convertionParameters.pixelPerUnit?a.axisX.convertionParameters.pixelPerUnit-1:a.axisX.convertionParameters.pixelPerUnit);if(0<p.length)for(var t=5<h&&n.bevelEnabled?!0:!1,f=0;f<p.length;f++)if(b=p[f].x.getTime?p[f].x.getTime():p[f].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof p[f].y){d=a.axisX.convertionParameters.reference+a.axisX.convertionParameters.pixelPerUnit*
124
+ (b-a.axisX.convertionParameters.minimum)+0.5<<0;k=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*((0!==a.dataPointYSums[b]?100*(p[f].y/a.dataPointYSums[b]):0)-a.axisY.convertionParameters.minimum)+0.5<<0;var q=d-a.plotType.plotUnits.length*h/2+a.index*h<<0,z=q+h<<0,w;if(0<=p[f].y){var x=e[b]?e[b]:0;k-=x;w=m-x;e[b]=x+(w-k)}else x=g[b]?g[b]:0,w=k+x,k=m+x,g[b]=x+(w-k);b=p[f].color?p[f].color:n._colorSet[f%n._colorSet.length];J(c,q,k,z,w,b,t&&0<=p[f].y,0>p[f].y&&t,!1,
125
+ !1);b=n.dataPointIds[f];this._eventManager.objectMap[b]={objectType:"dataPoint",dataSeriesIndex:s,dataPointIndex:f,x1:q,y1:k,x2:z,y2:w};b=B(b);u&&J(this._eventManager.ghostCtx,q,k,z,w,b,!1,!1,!1,!1);(p[f].indexLabel||n.indexLabel)&&this._indexLabels.push({chartType:"stackedColumn100",dataPoint:p[f],dataSeries:n,point:{x:d,y:0<=p[f].y?k:w},bounds:{x1:q,y1:Math.min(k,w),x2:z,y2:Math.max(k,w)},color:b})}}c.restore();u&&this._eventManager.ghostCtx.restore()}};v.prototype.renderBar=function(a){var c=this.plotArea.ctx;
126
+ if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,e=0,g,f,k,m=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(0-a.axisY.convertionParameters.minimum)<<0,l=0.15*this.height,e=a.axisX.dataInfo.minDiff,h=0.9*(d.height/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(e)/a.plotType.totalDataSeries)<<0;c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();u&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,
127
+ d.height),this._eventManager.ghostCtx.clip());for(d=0;d<a.dataSeriesIndexes.length;d++){var r=a.dataSeriesIndexes[d],s=this.data[r],n=s.dataPoints;1==n.length&&(h=l);1>h?h=1:h>l&&(h=l);s.maxWidthInX=h/(1<a.axisX.convertionParameters.pixelPerUnit?a.axisX.convertionParameters.pixelPerUnit-1:a.axisX.convertionParameters.pixelPerUnit);if(0<n.length){var p=5<h&&s.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(e=0;e<n.length;e++)if(n[e].getTime?k=n[e].x.getTime():k=n[e].x,!(k<a.axisX.dataInfo.viewPortMin||
128
+ k>a.axisX.dataInfo.viewPortMax)&&"number"===typeof n[e].y){f=a.axisX.convertionParameters.reference+a.axisX.convertionParameters.pixelPerUnit*(k-a.axisX.convertionParameters.minimum)+0.5<<0;g=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(n[e].y-a.axisY.convertionParameters.minimum)+0.5<<0;f=f-a.plotType.totalDataSeries*h/2+(a.previousDataSeriesCount+d)*h<<0;var t=f+h<<0,q;0<=n[e].y?q=m:(q=g,g=m);b=n[e].color?n[e].color:s._colorSet[e%s._colorSet.length];J(c,q,f,
129
+ g,t,b,p,!1,!1,!1);b=s.dataPointIds[e];this._eventManager.objectMap[b]={objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:e,x1:q,y1:f,x2:g,y2:t};b=B(b);u&&J(this._eventManager.ghostCtx,q,f,g,t,b,!1,!1,!1,!1);this._indexLabels.push({chartType:"bar",dataPoint:n[e],dataSeries:s,point:{x:0<=n[e].y?g:q,y:f+(t-f)/2},bounds:{x1:Math.min(q,g),y1:f,x2:Math.max(q,g),y2:t},color:b})}}}c.restore();u&&this._eventManager.ghostCtx.restore()}};v.prototype.renderStackedBar=function(a){var c=this.plotArea.ctx;
130
+ if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,e=[],g=[],f=0,k,m=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(0-a.axisY.convertionParameters.minimum)<<0,l=0.15*this.width,f=a.axisX.dataInfo.minDiff,h=0.9*(d.height/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(f)/a.plotType.plotUnits.length)<<0;c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();u&&(this._eventManager.ghostCtx.rect(d.x1,
131
+ d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var r=0;r<a.dataSeriesIndexes.length;r++){var s=a.dataSeriesIndexes[r],n=this.data[s],p=n.dataPoints;1==p.length&&(h=l);1>h?h=1:h>l&&(h=l);n.maxWidthInX=h/(1<a.axisX.convertionParameters.pixelPerUnit?a.axisX.convertionParameters.pixelPerUnit-1:a.axisX.convertionParameters.pixelPerUnit);if(0<p.length){var t=5<h&&n.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(f=0;f<p.length;f++)if(b=p[f].x.getTime?p[f].x.getTime():p[f].x,!(b<a.axisX.dataInfo.viewPortMin||
132
+ b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof p[f].y){d=a.axisX.convertionParameters.reference+a.axisX.convertionParameters.pixelPerUnit*(b-a.axisX.convertionParameters.minimum)+0.5<<0;k=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(p[f].y-a.axisY.convertionParameters.minimum)+0.5<<0;var q=d-a.plotType.plotUnits.length*h/2+a.index*h<<0,z=q+h<<0,w;if(0<=p[f].y){var x=e[b]?e[b]:0;w=m+x;k+=x;e[b]=x+(k-w)}else x=g[b]?g[b]:0,w=k-x,k=m-x,g[b]=x+(k-w);b=p[f].color?
133
+ p[f].color:n._colorSet[f%n._colorSet.length];J(c,w,q,k,z,b,t,!1,!1,!1);b=n.dataPointIds[f];this._eventManager.objectMap[b]={objectType:"dataPoint",dataSeriesIndex:s,dataPointIndex:f,x1:w,y1:q,x2:k,y2:z};b=B(b);u&&J(this._eventManager.ghostCtx,w,q,k,z,b,!1,!1,!1,!1);this._indexLabels.push({chartType:"stackedBar",dataPoint:p[f],dataSeries:n,point:{x:0<=p[f].y?k:w,y:d},bounds:{x1:Math.min(w,k),y1:q,x2:Math.max(w,k),y2:z},color:b})}}}c.restore();u&&this._eventManager.ghostCtx.restore()}};v.prototype.renderStackedBar100=
134
+ function(a){var c=this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,e=[],g=[],f=0,k,m=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(0-a.axisY.convertionParameters.minimum)<<0,l=0.15*this.width,f=a.axisX.dataInfo.minDiff,h=0.9*(d.height/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(f)/a.plotType.plotUnits.length)<<0;c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();u&&(this._eventManager.ghostCtx.rect(d.x1,
135
+ d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var r=0;r<a.dataSeriesIndexes.length;r++){var s=a.dataSeriesIndexes[r],n=this.data[s],p=n.dataPoints;1==p.length&&(h=l);1>h?h=1:h>l&&(h=l);n.maxWidthInX=h/(1<a.axisX.convertionParameters.pixelPerUnit?a.axisX.convertionParameters.pixelPerUnit-1:a.axisX.convertionParameters.pixelPerUnit);if(0<p.length){var t=5<h&&n.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(f=0;f<p.length;f++)if(b=p[f].x.getTime?p[f].x.getTime():p[f].x,!(b<a.axisX.dataInfo.viewPortMin||
136
+ b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof p[f].y){d=a.axisX.convertionParameters.reference+a.axisX.convertionParameters.pixelPerUnit*(b-a.axisX.convertionParameters.minimum)+0.5<<0;k=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*((0!==a.dataPointYSums[b]?100*(p[f].y/a.dataPointYSums[b]):0)-a.axisY.convertionParameters.minimum)+0.5<<0;var q=d-a.plotType.plotUnits.length*h/2+a.index*h<<0,z=q+h<<0,w;if(0<=p[f].y){var x=e[b]?e[b]:0;w=m+x;k+=x;e[b]=x+(k-w)}else x=
137
+ g[b]?g[b]:0,w=k-x,k=m-x,g[b]=x+(k-w);b=p[f].color?p[f].color:n._colorSet[f%n._colorSet.length];J(c,w,q,k,z,b,t,!1,!1,!1);b=n.dataPointIds[f];this._eventManager.objectMap[b]={objectType:"dataPoint",dataSeriesIndex:s,dataPointIndex:f,x1:w,y1:q,x2:k,y2:z};b=B(b);u&&J(this._eventManager.ghostCtx,w,q,k,z,b,!1,!1,!1,!1);this._indexLabels.push({chartType:"stackedBar100",dataPoint:p[f],dataSeries:n,point:{x:0<=p[f].y?k:w,y:d},bounds:{x1:Math.min(w,k),y1:q,x2:Math.max(w,k),y2:z},color:b})}}}c.restore();u&&
138
+ this._eventManager.ghostCtx.restore()}};v.prototype.renderArea=function(a){var c=this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx,d=a.axisX.lineCoordinates,e=a.axisY.lineCoordinates,g=[],f=this.plotArea;c.save();u&&b.save();c.beginPath();c.rect(f.x1,f.y1,f.width,f.height);c.clip();u&&(b.beginPath(),b.rect(f.x1,f.y1,f.width,f.height),b.clip());for(f=0;f<a.dataSeriesIndexes.length;f++){var k=a.dataSeriesIndexes[f],m=this.data[k],l=m.dataPoints,g=m.id;this._eventManager.objectMap[g]=
139
+ {objectType:"dataSeries",dataSeriesIndex:k};g=B(g);b.fillStyle=g;var g=[],h=!0,r=0,s,n,p=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(0-a.axisY.convertionParameters.minimum)+0.5<<0,t,q=null;if(0<l.length){color=m._colorSet[r%m._colorSet.length];for(c.fillStyle=color;r<l.length;r++)if(n=l[r].x.getTime?l[r].x.getTime():l[r].x,!(n<a.axisX.dataInfo.viewPortMin||n>a.axisX.dataInfo.viewPortMax)&&(s=a.axisX.convertionParameters.reference+a.axisX.convertionParameters.pixelPerUnit*
140
+ (n-a.axisX.convertionParameters.minimum)+0.5<<0,n=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(l[r].y-a.axisY.convertionParameters.minimum)+0.5<<0,"number"===typeof l[r].y)){h?(c.beginPath(),c.moveTo(s,n),q={x:s,y:n},u&&(b.beginPath(),b.moveTo(s,n)),h=!1):(c.lineTo(s,n),u&&b.lineTo(s,n),0==r%250&&(0>=a.axisY.minimum&&0<=a.axisY.maximum?t=p:0>a.axisY.maximum?t=e.y1:0<a.axisY.minimum&&(t=d.y2),c.lineTo(s,t),c.lineTo(q.x,t),c.closePath(),c.fill(),c.beginPath(),c.moveTo(s,
141
+ n),u&&(b.lineTo(s,t),b.lineTo(q.x,t),b.closePath(),b.fill(),b.beginPath(),b.moveTo(s,n)),q={x:s,y:n}));var z=m.dataPointIds[r];this._eventManager.objectMap[z]={objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:r,x1:s,y1:n};if(0!==l[r].markerSize&&(0<l[r].markerSize||0<m.markerSize)){var w=m.getMarkerProperties(r,s,n,c);g.push(w);if(!m.maxWidthInX||w.size>m.maxWidthInX)m.maxWidthInX=w.size/(1<a.axisX.convertionParameters.pixelPerUnit?a.axisX.convertionParameters.pixelPerUnit-1:a.axisX.convertionParameters.pixelPerUnit);
142
+ markerColor=B(z);u&&g.push({x:s,y:n,ctx:b,type:w.type,size:w.size,color:markerColor,borderColor:markerColor,borderThickness:w.borderThickness})}(l[r].indexLabel||m.indexLabel)&&this._indexLabels.push({chartType:"area",dataPoint:l[r],dataSeries:m,point:{x:s,y:n},color:color})}0>=a.axisY.minimum&&0<=a.axisY.maximum?t=p:0>a.axisY.maximum?t=e.y1:0<a.axisY.minimum&&(t=d.y2);c.lineTo(s,t);c.lineTo(q.x,t);c.closePath();c.fill();u&&(b.lineTo(s,t),b.lineTo(q.x,t),b.closePath(),b.fill());H.drawMarkers(g)}}c.restore();
143
+ u&&this._eventManager.ghostCtx.restore()}};v.prototype.renderSplineArea=function(a){var c=this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx,d=a.axisX.lineCoordinates,e=a.axisY.lineCoordinates,g=[],f=this.plotArea;c.save();u&&b.save();c.beginPath();c.rect(f.x1,f.y1,f.width,f.height);c.clip();u&&(b.beginPath(),b.rect(f.x1,f.y1,f.width,f.height),b.clip());for(f=0;f<a.dataSeriesIndexes.length;f++){var k=a.dataSeriesIndexes[f],m=this.data[k],l=m.dataPoints,g=m.id;
144
+ this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:k};g=B(g);b.fillStyle=g;var g=[],h=0,r,s,n=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(0-a.axisY.convertionParameters.minimum)+0.5<<0,p,t=null,t=[];if(0<l.length){color=m._colorSet[h%m._colorSet.length];for(c.fillStyle=color;h<l.length;h++)if(r=l[h].x.getTime?l[h].x.getTime():l[h].x,!(r<a.axisX.dataInfo.viewPortMin||r>a.axisX.dataInfo.viewPortMax)&&(r=a.axisX.convertionParameters.reference+
145
+ a.axisX.convertionParameters.pixelPerUnit*(r-a.axisX.convertionParameters.minimum)+0.5<<0,s=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(l[h].y-a.axisY.convertionParameters.minimum)+0.5<<0,"number"===typeof l[h].y)){var q=m.dataPointIds[h];this._eventManager.objectMap[q]={objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:h,x1:r,y1:s};t[t.length]={x:r,y:s};if(0!==l[h].markerSize&&(0<l[h].markerSize||0<m.markerSize)){var z=m.getMarkerProperties(h,r,s,c);g.push(z);
146
+ if(!m.maxWidthInX||z.size>m.maxWidthInX)m.maxWidthInX=z.size/(1<a.axisX.convertionParameters.pixelPerUnit?a.axisX.convertionParameters.pixelPerUnit-1:a.axisX.convertionParameters.pixelPerUnit);markerColor=B(q);u&&g.push({x:r,y:s,ctx:b,type:z.type,size:z.size,color:markerColor,borderColor:markerColor,borderThickness:z.borderThickness})}(l[h].indexLabel||m.indexLabel)&&this._indexLabels.push({chartType:"splineArea",dataPoint:l[h],dataSeries:m,point:{x:r,y:s},color:color})}k=na(t,2);if(0<k.length){c.beginPath();
147
+ c.moveTo(k[0].x,k[0].y);u&&(b.beginPath(),b.moveTo(k[0].x,k[0].y));for(h=0;h<k.length-3;h+=3)c.bezierCurveTo(k[h+1].x,k[h+1].y,k[h+2].x,k[h+2].y,k[h+3].x,k[h+3].y),u&&b.bezierCurveTo(k[h+1].x,k[h+1].y,k[h+2].x,k[h+2].y,k[h+3].x,k[h+3].y);0>=a.axisY.minimum&&0<=a.axisY.maximum?p=n:0>a.axisY.maximum?p=e.y1:0<a.axisY.minimum&&(p=d.y2);t={x:k[0].x,y:k[0].y};c.lineTo(k[k.length-1].x,p);c.lineTo(t.x,p);c.closePath();c.fill();u&&(b.lineTo(k[k.length-1].x,p),b.lineTo(t.x,p),b.closePath(),b.fill())}H.drawMarkers(g)}}c.restore();
148
+ u&&this._eventManager.ghostCtx.restore()}};v.prototype.renderStepArea=function(a){var c=this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx,d=a.axisX.lineCoordinates,e=a.axisY.lineCoordinates,g=[],f=this.plotArea;c.save();u&&b.save();c.beginPath();c.rect(f.x1,f.y1,f.width,f.height);c.clip();u&&(b.beginPath(),b.rect(f.x1,f.y1,f.width,f.height),b.clip());for(f=0;f<a.dataSeriesIndexes.length;f++){var k=a.dataSeriesIndexes[f],m=this.data[k],l=m.dataPoints,g=m.id;this._eventManager.objectMap[g]=
149
+ {objectType:"dataSeries",dataSeriesIndex:k};g=B(g);b.fillStyle=g;var g=[],h=!0,r=0,s,n,p,t=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(0-a.axisY.convertionParameters.minimum)+0.5<<0,q,z=null;if(0<l.length){color=m._colorSet[r%m._colorSet.length];for(c.fillStyle=color;r<l.length;r++)if(p=l[r].x.getTime?l[r].x.getTime():l[r].x,!(p<a.axisX.dataInfo.viewPortMin||p>a.axisX.dataInfo.viewPortMax)){var w=n;s=a.axisX.convertionParameters.reference+a.axisX.convertionParameters.pixelPerUnit*
150
+ (p-a.axisX.convertionParameters.minimum)+0.5<<0;n=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(l[r].y-a.axisY.convertionParameters.minimum)+0.5<<0;if("number"===typeof l[r].y){h?(c.beginPath(),c.moveTo(s,n),z={x:s,y:n},u&&(b.beginPath(),b.moveTo(s,n)),h=!1):(c.lineTo(s,w),u&&b.lineTo(s,w),c.lineTo(s,n),u&&b.lineTo(s,n),0==r%250&&(0>=a.axisY.minimum&&0<=a.axisY.maximum?q=t:0>a.axisY.maximum?q=e.y1:0<a.axisY.minimum&&(q=d.y2),c.lineTo(s,q),c.lineTo(z.x,q),c.closePath(),
151
+ c.fill(),c.beginPath(),c.moveTo(s,n),u&&(b.lineTo(s,q),b.lineTo(z.x,q),b.closePath(),b.fill(),b.beginPath(),b.moveTo(s,n)),z={x:s,y:n}));p=m.dataPointIds[r];this._eventManager.objectMap[p]={objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:r,x1:s,y1:n};if(0!==l[r].markerSize&&(0<l[r].markerSize||0<m.markerSize)){w=m.getMarkerProperties(r,s,n,c);g.push(w);if(!m.maxWidthInX||w.size>m.maxWidthInX)m.maxWidthInX=w.size/(1<a.axisX.convertionParameters.pixelPerUnit?a.axisX.convertionParameters.pixelPerUnit-
152
+ 1:a.axisX.convertionParameters.pixelPerUnit);markerColor=B(p);u&&g.push({x:s,y:n,ctx:b,type:w.type,size:w.size,color:markerColor,borderColor:markerColor,borderThickness:w.borderThickness})}(l[r].indexLabel||m.indexLabel)&&this._indexLabels.push({chartType:"stepArea",dataPoint:l[r],dataSeries:m,point:{x:s,y:n},color:color})}}0>=a.axisY.minimum&&0<=a.axisY.maximum?q=t:0>a.axisY.maximum?q=e.y1:0<a.axisY.minimum&&(q=d.y2);c.lineTo(s,q);c.lineTo(z.x,q);c.closePath();c.fill();u&&(b.lineTo(s,q),b.lineTo(z.x,
153
+ q),b.closePath(),b.fill());H.drawMarkers(g)}}c.restore();u&&this._eventManager.ghostCtx.restore()}};v.prototype.renderStackedArea=function(a){var c=this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=[],e=this.plotArea,g=[],f=[],k=0,m,l,h,r=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(0-a.axisY.convertionParameters.minimum)<<0,s=this._eventManager.ghostCtx;u&&s.beginPath();c.save();u&&s.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();
154
+ u&&(s.beginPath(),s.rect(e.x1,e.y1,e.width,e.height),s.clip());xValuePresent=[];for(e=0;e<a.dataSeriesIndexes.length;e++){var n=a.dataSeriesIndexes[e],p=this.data[n],t=p.dataPoints;p.dataPointIndexes=[];for(k=0;k<t.length;k++)n=t[k].x.getTime?t[k].x.getTime():t[k].x,p.dataPointIndexes[n]=k,xValuePresent[n]||(f.push(n),xValuePresent[n]=!0);f.sort(ia)}for(e=0;e<a.dataSeriesIndexes.length;e++){var n=a.dataSeriesIndexes[e],p=this.data[n],t=p.dataPoints,q=!0,z=[],k=p.id;this._eventManager.objectMap[k]=
155
+ {objectType:"dataSeries",dataSeriesIndex:n};k=B(k);s.fillStyle=k;if(0<f.length){b=p._colorSet[0];c.fillStyle=b;for(k=0;k<f.length;k++){h=f[k];var w=null,w=0<=p.dataPointIndexes[h]?t[p.dataPointIndexes[h]]:{x:h,y:0};if(!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax)&&"number"===typeof w.y){m=a.axisX.convertionParameters.reference+a.axisX.convertionParameters.pixelPerUnit*(h-a.axisX.convertionParameters.minimum)+0.5<<0;l=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*
156
+ (w.y-a.axisY.convertionParameters.minimum)+0.5<<0;var x=g[h]?g[h]:0;l-=x;z.push({x:m,y:r-x});g[h]=r-l;if(q)c.beginPath(),c.moveTo(m,l),u&&(s.beginPath(),s.moveTo(m,l)),q=!1;else if(c.lineTo(m,l),u&&s.lineTo(m,l),0==k%250){for(;0<z.length;){var v=z.pop();c.lineTo(v.x,v.y);u&&s.lineTo(v.x,v.y)}c.closePath();c.fill();c.beginPath();c.moveTo(m,l);u&&(s.closePath(),s.fill(),s.beginPath(),s.moveTo(m,l));z.push({x:m,y:r-x})}if(0<=p.dataPointIndexes[h]){var y=p.dataPointIds[p.dataPointIndexes[h]];this._eventManager.objectMap[y]=
157
+ {objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:p.dataPointIndexes[h],x1:m,y1:l}}if(0<=p.dataPointIndexes[h]&&0!==w.markerSize&&(0<w.markerSize||0<p.markerSize)){h=p.getMarkerProperties(k,m,l,c);d.push(h);if(!p.maxWidthInX||h.size>p.maxWidthInX)p.maxWidthInX=h.size/(1<a.axisX.convertionParameters.pixelPerUnit?a.axisX.convertionParameters.pixelPerUnit-1:a.axisX.convertionParameters.pixelPerUnit);markerColor=B(y);u&&d.push({x:m,y:l,ctx:s,type:h.type,size:h.size,color:markerColor,borderColor:markerColor,
158
+ borderThickness:h.borderThickness})}(w.indexLabel||p.indexLabel)&&this._indexLabels.push({chartType:"stackedArea",dataPoint:w,dataSeries:p,point:{x:m,y:l},color:b})}}for(;0<z.length;)v=z.pop(),c.lineTo(v.x,v.y),u&&s.lineTo(v.x,v.y);c.closePath();c.fill();c.beginPath();c.moveTo(m,l);u&&(s.closePath(),s.fill(),s.beginPath(),s.moveTo(m,l))}delete p.dataPointIndexes}H.drawMarkers(d);c.restore();u&&s.restore()}};v.prototype.renderStackedArea100=function(a){var c=this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var b=
159
+ null,d=this.plotArea,e=[],g=[],f=[],k=0,m,l,h,r=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(0-a.axisY.convertionParameters.minimum)<<0,s=0.15*this.width,n=a.axisX.dataInfo.minDiff,n=0.9*d.width/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(n)<<0,p=this._eventManager.ghostCtx;c.save();u&&p.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();u&&(p.beginPath(),p.rect(d.x1,d.y1,d.width,d.height),p.clip());xValuePresent=[];for(d=0;d<a.dataSeriesIndexes.length;d++){var t=
160
+ a.dataSeriesIndexes[d],q=this.data[t],z=q.dataPoints;q.dataPointIndexes=[];for(k=0;k<z.length;k++)t=z[k].x.getTime?z[k].x.getTime():z[k].x,q.dataPointIndexes[t]=k,xValuePresent[t]||(f.push(t),xValuePresent[t]=!0);f.sort(ia)}for(d=0;d<a.dataSeriesIndexes.length;d++){var t=a.dataSeriesIndexes[d],q=this.data[t],z=q.dataPoints,w=!0,b=q.id;this._eventManager.objectMap[b]={objectType:"dataSeries",dataSeriesIndex:t};b=B(b);p.fillStyle=b;1==z.length&&(n=s);1>n?n=1:n>s&&(n=s);var v=[];if(0<f.length){b=q._colorSet[k%
161
+ q._colorSet.length];c.fillStyle=b;for(k=0;k<f.length;k++){h=f[k];var y=null,y=0<=q.dataPointIndexes[h]?z[q.dataPointIndexes[h]]:{x:h,y:0};if(!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax)&&"number"===typeof y.y){l=0!==a.dataPointYSums[h]?100*(y.y/a.dataPointYSums[h]):0;m=a.axisX.convertionParameters.reference+a.axisX.convertionParameters.pixelPerUnit*(h-a.axisX.convertionParameters.minimum)+0.5<<0;l=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*
162
+ (l-a.axisY.convertionParameters.minimum)+0.5<<0;var E=g[h]?g[h]:0;l-=E;v.push({x:m,y:r-E});g[h]=r-l;if(w)c.beginPath(),c.moveTo(m,l),u&&(p.beginPath(),p.moveTo(m,l)),w=!1;else if(c.lineTo(m,l),u&&p.lineTo(m,l),0==k%250){for(;0<v.length;){var D=v.pop();c.lineTo(D.x,D.y);u&&p.lineTo(D.x,D.y)}c.closePath();c.fill();c.beginPath();c.moveTo(m,l);u&&(p.closePath(),p.fill(),p.beginPath(),p.moveTo(m,l));v.push({x:m,y:r-E})}if(0<=q.dataPointIndexes[h]){var A=q.dataPointIds[q.dataPointIndexes[h]];this._eventManager.objectMap[A]=
163
+ {objectType:"dataPoint",dataSeriesIndex:t,dataPointIndex:q.dataPointIndexes[h],x1:m,y1:l}}if(0<=q.dataPointIndexes[h]&&0!==y.markerSize&&(0<y.markerSize||0<q.markerSize)){h=q.getMarkerProperties(k,m,l,c);e.push(h);if(!q.maxWidthInX||h.size>q.maxWidthInX)q.maxWidthInX=h.size/(1<a.axisX.convertionParameters.pixelPerUnit?a.axisX.convertionParameters.pixelPerUnit-1:a.axisX.convertionParameters.pixelPerUnit);markerColor=B(A);u&&e.push({x:m,y:l,ctx:p,type:h.type,size:h.size,color:markerColor,borderColor:markerColor,
164
+ borderThickness:h.borderThickness})}(y.indexLabel||q.indexLabel)&&this._indexLabels.push({chartType:"stackedArea100",dataPoint:y,dataSeries:q,point:{x:m,y:l},color:b})}}for(;0<v.length;)D=v.pop(),c.lineTo(D.x,D.y),u&&p.lineTo(D.x,D.y);c.closePath();c.fill();c.beginPath();c.moveTo(m,l);u&&(p.closePath(),p.fill(),p.beginPath(),p.moveTo(m,l))}delete q.dataPointIndexes}H.drawMarkers(e);c.restore();u&&p.restore()}};v.prototype.renderBubble=function(a){var c=this.plotArea.ctx,b=a.dataSeriesIndexes.length;
165
+ if(!(0>=b)){var d=this.plotArea,e=0,g,f,k=0.15*this.width,e=a.axisX.dataInfo.minDiff,b=0.9*(d.width/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(e)/b)<<0;c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();u&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var m=-Infinity,l=Infinity,h=0;h<a.dataSeriesIndexes.length;h++)for(var r=a.dataSeriesIndexes[h],s=this.data[r],n=s.dataPoints,p=0,
166
+ e=0;e<n.length;e++)g=n[e].getTime?g=n[e].x.getTime():g=n[e].x,g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax||"undefined"===typeof n[e].z||(p=n[e].z,p>m&&(m=p),p<l&&(l=p));for(var t=25*Math.PI,d=Math.max(Math.pow(0.25*Math.min(d.height,d.width)/2,2)*Math.PI,t),h=0;h<a.dataSeriesIndexes.length;h++)if(r=a.dataSeriesIndexes[h],s=this.data[r],n=s.dataPoints,1==n.length&&(b=k),1>b?b=1:b>k&&(b=k),0<n.length)for(c.strokeStyle="#4572A7 ",e=0;e<n.length;e++)if(g=n[e].getTime?g=n[e].x.getTime():
167
+ g=n[e].x,!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax)&&"number"===typeof n[e].y){g=a.axisX.convertionParameters.reference+a.axisX.convertionParameters.pixelPerUnit*(g-a.axisX.convertionParameters.minimum)+0.5<<0;f=a.axisY.convertionParameters.reference+a.axisY.convertionParameters.pixelPerUnit*(n[e].y-a.axisY.convertionParameters.minimum)+0.5<<0;var p=n[e].z,q=2*Math.max(Math.sqrt((t+(d-t)/(m-l)*(p-l))/Math.PI)<<0,1),p=s.getMarkerProperties(e,c);p.size=q;H.drawMarker(g,f,c,p.type,
168
+ p.size,p.color,p.borderColor,p.borderThickness);if(!s.maxWidthInX||p.size>s.maxWidthInX)s.maxWidthInX=p.size/(1<a.axisX.convertionParameters.pixelPerUnit?a.axisX.convertionParameters.pixelPerUnit-1:a.axisX.convertionParameters.pixelPerUnit);var v=s.dataPointIds[e];this._eventManager.objectMap[v]={objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:e,x1:g,y1:f,size:q};q=B(v);u&&H.drawMarker(g,f,this._eventManager.ghostCtx,p.type,p.size,q,q,p.borderThickness)}c.restore();u&&this._eventManager.ghostCtx.restore()}};
169
+ v.prototype.renderScatter=function(a){var c=this.plotArea.ctx,b=a.dataSeriesIndexes.length;if(!(0>=b)){var d=this.plotArea,e=0,g,f,k=0.15*this.width,e=a.axisX.dataInfo.minDiff,b=0.9*(d.width/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(e)/b)<<0;c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();u&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var m=0;m<a.dataSeriesIndexes.length;m++){var l=
170
+ a.dataSeriesIndexes[m],h=this.data[l],r=h.dataPoints;1==r.length&&(b=k);1>b?b=1:b>k&&(b=k);if(0<r.length){c.strokeStyle="#4572A7 ";Math.pow(0.3*Math.min(d.height,d.width)/2,2);for(var s=0,n=0,e=0;e<r.length;e++)if(g=r[e].getTime?g=r[e].x.getTime():g=r[e].x,!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax)&&"number"===typeof r[e].y){g=a.axisX.convertionParameters.reference+a.axisX.convertionParameters.pixelPerUnit*(g-a.axisX.convertionParameters.minimum)+0.5<<0;f=a.axisY.convertionParameters.reference+
171
+ a.axisY.convertionParameters.pixelPerUnit*(r[e].y-a.axisY.convertionParameters.minimum)+0.5<<0;var p=h.getMarkerProperties(e,g,f,c);H.drawMarker(p.x,p.y,p.ctx,p.type,p.size,p.color,p.color,p.thickness);if(!h.maxWidthInX||p.size>h.maxWidthInX)h.maxWidthInX=p.size/(1<a.axisX.convertionParameters.pixelPerUnit?a.axisX.convertionParameters.pixelPerUnit-1:a.axisX.convertionParameters.pixelPerUnit);Math.sqrt((s-g)*(s-g)+(n-f)*(n-f))<Math.min(p.size,5)||(s=h.dataPointIds[e],this._eventManager.objectMap[s]=
172
+ {objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:e,x1:g,y1:f},s=B(s),u&&H.drawMarker(p.x,p.y,this._eventManager.ghostCtx,p.type,p.size,s,s,p.borderThickness),s=g,n=f)}}}c.restore();u&&this._eventManager.ghostCtx.restore()}};var ga=function(a,c,b,d,e,g,f){a.save();"pie"===e?(a.beginPath(),a.moveTo(c.x,c.y),a.arc(c.x,c.y,b,g,f,!1),a.fillStyle=d,a.strokeStyle="white",a.lineWidth=2,a.closePath(),a.stroke(),a.fill()):"doughnut"===e&&(a.beginPath(),a.arc(c.x,c.y,b,g,f,!1),a.arc(c.x,c.y,0.6*b,f,
173
+ g,!0),a.closePath(),a.fillStyle=d,a.strokeStyle="white",a.lineWidth=2,a.stroke(),a.fill());a.restore()};v.prototype.renderPie=function(a){function c(a){t.frame=0;t.maxFrames=a||1}function b(){if(h&&r){for(var a=0,b=0;b<r.length;b++)a+=Math.abs(r[b].y);for(var c=0,d=0,e=0,g=0,b=0;b<r.length;b++){var f=r[b],k={objectType:"dataPoint",dataPointIndex:b,dataSeriesIndex:0};q.push(k);var m=f.indexLabel?f.indexLabel:h.indexLabel?h.indexLabel:f.label?f.label:h.label?h.label:"";l._eventManager.objectMap[h.dataPointIds[b]]=
174
+ k;k.center={x:E.x,y:E.y};k.y=f.y;k.radius=D;k.indexLabelText=l.replaceKeywordsWithValue(m,f,h,b);k.indexLabelPlacement=h.indexLabelPlacement;k.indexLabelLineColor=f.indexLabelLineColor?f.indexLabelLineColor:h.indexLabelLineColor?h.indexLabelLineColor:f.color?f.color:h._colorSet[b%h._colorSet.length];k.indexLabelLineThickness=f.indexLabelLineThickness?f.indexLabelLineThickness:h.indexLabelLineThickness;k.indexLabelFontColor=f.indexLabelFontColor?f.indexLabelFontColor:h.indexLabelFontColor;k.indexLabelFontStyle=
175
+ f.indexLabelFontStyle?f.indexLabelFontStyle:h.indexLabelFontStyle;k.indexLabelFontWeight=f.indexLabelFontWeight?f.indexLabelFontWeight:h.indexLabelFontWeight;k.indexLabelFontSize=f.indexLabelFontSize?f.indexLabelFontSize:h.indexLabelFontSize;k.indexLabelFontFamily=f.indexLabelFontFamily?f.indexLabelFontFamily:h.indexLabelFontFamily;k.indexLabelBackgroundColor=f.indexLabelBackgroundColor?f.indexLabelBackgroundColor:h.indexLabelBackgroundColor?h.indexLabelBackgroundColor:null;k.indexLabelMaxWidth=f.indexLabelMaxWidth?
176
+ f.indexLabelMaxWidth:h.indexLabelMaxWidth?h.indexLabelMaxWidth:0.33*n.width;k.indexLabelWrap=f.indexLabelWrap?f.indexLabelWrap:h.indexLabelWrap;k.startAngle=0===b?h.startAngle?h.startAngle/180*Math.PI:0:q[b-1].endAngle;k.startAngle=(k.startAngle+2*Math.PI)%(2*Math.PI);k.endAngle=k.startAngle+2*Math.PI/a*Math.abs(f.y);f=(k.endAngle+k.startAngle)/2;f=(f+2*Math.PI)%(2*Math.PI);k.midAngle=f;if(k.midAngle>Math.PI/2-x&&k.midAngle<Math.PI/2+x){if(0===c||q[e].midAngle>k.midAngle)e=b;c++}else if(k.midAngle>
177
+ 3*Math.PI/2-x&&k.midAngle<3*Math.PI/2+x){if(0===d||q[g].midAngle>k.midAngle)g=b;d++}k.hemisphere=f>Math.PI/2&&f<=3*Math.PI/2?"left":"right";k.indexLabelTextBlock=new F(l.plotArea.ctx,{fontSize:k.indexLabelFontSize,fontFamily:k.indexLabelFontFamily,fontColor:k.indexLabelFontColor,fontStyle:k.indexLabelFontStyle,fontWeight:k.indexLabelFontWeight,horizontalAlign:"left",backgroundColor:k.indexLabelBackgroundColor,maxWidth:k.indexLabelMaxWidth,maxHeight:k.indexLabelWrap?5*k.indexLabelFontSize:1.5*k.indexLabelFontSize,
178
+ text:k.indexLabelText,padding:0,textBaseline:k.indexLabelBackgroundColor?"middle":"top"});k.indexLabelTextBlock.measureText()}f=a=0;m=!1;for(b=0;b<r.length;b++)k=q[(e+b)%r.length],1<c&&(k.midAngle>Math.PI/2-x&&k.midAngle<Math.PI/2+x)&&(a<=c/2&&!m?(k.hemisphere="right",a++):(k.hemisphere="left",m=!0));m=!1;for(b=0;b<r.length;b++)k=q[(g+b)%r.length],1<d&&(k.midAngle>3*Math.PI/2-x&&k.midAngle<3*Math.PI/2+x)&&(f<=d/2&&!m?(k.hemisphere="left",f++):(k.hemisphere="right",m=!0))}}function d(){var a=l.plotArea.ctx;
179
+ if(null!==t&&t.frame<t.maxFrames){0===t.frame&&(t.prevMaxAngle=q[0].startAngle);a.clearRect(n.x1,n.y1,n.width,n.height);for(var a=t.prevMaxAngle+2*Math.PI/t.maxFrames,b=0;b<r.length;b++){var g=0===b?q[b].startAngle:f,f=g+(q[b].endAngle-q[b].startAngle),k=!1;f>a&&(f=a,k=!0);var m=r[b].color?r[b].color:h._colorSet[b%h._colorSet.length];f>g&&ga(l.plotArea.ctx,q[b].center,q[b].radius,m,h.type,g,f);if(k)break}t.frame++;t.prevMaxAngle=a;t.frame<t.maxFrames?l.requestAnimFrame.call(window,d):(c(u?15:4),e())}}
180
+ function e(){var a=l.plotArea.ctx;if(null!==t&&t.frame<t.maxFrames){a.clearRect(n.x1,n.y1,n.width,n.height);for(a=0;a<r.length;a++){var b=q[a].startAngle,c=q[a].endAngle;if(c>b){var d=0.07*D*Math.cos(q[a].midAngle),g=0.07*D*Math.sin(q[a].midAngle),f=!1;if(r[a].exploded){if(Math.abs(q[a].center.x-(E.x+d))>Math.abs(0.5*d/t.maxFrames)||Math.abs(q[a].center.y-(E.y+g))>Math.abs(0.5*g/t.maxFrames))q[a].center.x+=d/t.maxFrames,q[a].center.y+=g/t.maxFrames,f=!0}else if(Math.abs(q[a].center.x-E.x)>=Math.abs(0.5*
181
+ d/t.maxFrames)||Math.abs(q[a].center.y-E.y)>=Math.abs(0.5*g/t.maxFrames))q[a].center.x-=d/t.maxFrames,q[a].center.y-=g/t.maxFrames,f=!0;f&&(d={},d.dataSeries=h,d.dataPoint=h.dataPoints[a],d.index=a,l._toolTip.highlightObjects([d]));ga(l.plotArea.ctx,q[a].center,q[a].radius,r[a].color?r[a].color:h._colorSet[a%h._colorSet.length],h.type,b,c)}}t.frame++;a=l.plotArea.ctx;a.fillStyle="black";a.strokeStyle="grey";a.textBaseline="middle";a.lineJoin="round";for(b=b=0;b<r.length;b++)c=q[b],c.indexLabelText&&
182
+ (c.indexLabelTextBlock.y-=c.indexLabelTextBlock.height/2,d=0,d="left"===c.hemisphere?"outside"===h.indexLabelPlacement?-(c.indexLabelTextBlock.width+s):-c.indexLabelTextBlock.width/2:"outside"===h.indexLabelPlacement?s:-c.indexLabelTextBlock.width/2,c.indexLabelTextBlock.x+=d,c.indexLabelTextBlock.render(!0),c.indexLabelTextBlock.x-=d,c.indexLabelTextBlock.y+=c.indexLabelTextBlock.height/2,"outside"===c.indexLabelPlacement&&(d=c.center.x+D*Math.cos(c.midAngle),g=c.center.y+D*Math.sin(c.midAngle),
183
+ a.strokeStyle=c.indexLabelLineColor,a.lineWidth=c.indexLabelLineThickness,a.beginPath(),a.moveTo(d,g),a.lineTo(c.indexLabelTextBlock.x,c.indexLabelTextBlock.y),a.lineTo(c.indexLabelTextBlock.x+("left"===c.hemisphere?-s:s),c.indexLabelTextBlock.y),a.stroke()),a.lineJoin="miter");t.frame<t.maxFrames&&l.requestAnimFrame.call(window,e)}}function g(a,b){var c=0,c=a.indexLabelTextBlock.y-a.indexLabelTextBlock.height/2,d=a.indexLabelTextBlock.y+a.indexLabelTextBlock.height/2,e=b.indexLabelTextBlock.y-b.indexLabelTextBlock.height/
184
+ 2,g=b.indexLabelTextBlock.y+b.indexLabelTextBlock.height/2;return c=b.indexLabelTextBlock.y>a.indexLabelTextBlock.y?e-d:c-g}function f(a){for(var b=null,c=1;c<r.length;c++)if(b=(a+c+q.length)%q.length,q[b].hemisphere!==q[a].hemisphere){b=null;break}else if(q[b].indexLabelText&&b!==a&&(0>g(q[b],q[a])||("right"===q[a].hemisphere?q[b].indexLabelTextBlock.y>=q[a].indexLabelTextBlock.y:q[b].indexLabelTextBlock.y<=q[a].indexLabelTextBlock.y)))break;else b=null;return b}function k(a,b){b=b||0;var c=0,d=
185
+ E.y-1*A,e=E.y+1*A;if(0<=a&&a<r.length){var h=q[a];if(0>b&&h.indexLabelTextBlock.y<d||0<b&&h.indexLabelTextBlock.y>e)return 0;var l=b,m=0,n=0,n=m=m=0;0>l?h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2>d&&h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2+l<d&&(l=-(d-(h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2+l))):h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2<d&&h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2+l>e&&(l=h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/
186
+ 2+l-e);l=h.indexLabelTextBlock.y+l;d=0;d="right"===h.hemisphere?E.x+Math.sqrt(Math.pow(A,2)-Math.pow(l-E.y,2)):E.x-Math.sqrt(Math.pow(A,2)-Math.pow(l-E.y,2));n=E.x+D*Math.cos(h.midAngle);m=E.y+D*Math.sin(h.midAngle);m=Math.sqrt(Math.pow(d-n,2)+Math.pow(l-m,2));n=Math.acos(D/A);m=Math.acos((A*A+D*D-m*m)/(2*D*A));l=m<n?l-h.indexLabelTextBlock.y:0;d=null;for(e=1;e<r.length;e++)if(d=(a-e+q.length)%q.length,q[d].hemisphere!==q[a].hemisphere){d=null;break}else if(q[d].indexLabelText&&q[d].hemisphere===
187
+ q[a].hemisphere&&d!==a&&(0>g(q[d],q[a])||("right"===q[a].hemisphere?q[d].indexLabelTextBlock.y<=q[a].indexLabelTextBlock.y:q[d].indexLabelTextBlock.y>=q[a].indexLabelTextBlock.y)))break;else d=null;n=d;m=f(a);e=d=0;0>l?(e="right"===h.hemisphere?n:m,c=l,null!==e&&(n=-l,l=h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2-(q[e].indexLabelTextBlock.y+q[e].indexLabelTextBlock.height/2),l-n<v&&(d=-n,p++,e=k(e,d),+e.toFixed(y)>+d.toFixed(y)&&(c=l>v?-(l-v):-(n-(e-d)))))):0<l&&(e="right"===h.hemisphere?
188
+ m:n,c=l,null!==e&&(n=l,l=q[e].indexLabelTextBlock.y-q[e].indexLabelTextBlock.height/2-(h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2),l-n<v&&(d=n,p++,e=k(e,d),+e.toFixed(y)<+d.toFixed(y)&&(c=l>v?l-v:n-(d-e)))));c&&(l=h.indexLabelTextBlock.y+c,d=0,d="right"===h.hemisphere?E.x+Math.sqrt(Math.pow(A,2)-Math.pow(l-E.y,2)):E.x-Math.sqrt(Math.pow(A,2)-Math.pow(l-E.y,2)),h.midAngle>Math.PI/2-x&&h.midAngle<Math.PI/2+x?(e=(a-1+q.length)%q.length,e=q[e],n=q[(a+1+q.length)%q.length],"left"===h.hemisphere&&
189
+ "right"===e.hemisphere&&d>e.indexLabelTextBlock.x?d=e.indexLabelTextBlock.x-15:"right"===h.hemisphere&&("left"===n.hemisphere&&d<n.indexLabelTextBlock.x)&&(d=n.indexLabelTextBlock.x+15)):h.midAngle>3*Math.PI/2-x&&h.midAngle<3*Math.PI/2+x&&(e=(a-1+q.length)%q.length,e=q[e],n=q[(a+1+q.length)%q.length],"right"===h.hemisphere&&"left"===e.hemisphere&&d<e.indexLabelTextBlock.x?d=e.indexLabelTextBlock.x+15:"left"===h.hemisphere&&("right"===n.hemisphere&&d>n.indexLabelTextBlock.x)&&(d=n.indexLabelTextBlock.x-
190
+ 15)),h.indexLabelTextBlock.y=l,h.indexLabelTextBlock.x=d,h.indexLabelAngle=Math.atan2(h.indexLabelTextBlock.y-E.y,h.indexLabelTextBlock.x-E.x))}return c}function m(){var a=l.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var b=0,e=a=0,a=0;10>a&&(1>a||0<e);a++){D-=e;e=0;if("outside"===h.indexLabelPlacement){A=D*w;for(b=0;b<r.length;b++){var m=q[b];m.indexLabelTextBlock.x=E.x+A*Math.cos(m.midAngle);m.indexLabelTextBlock.y=E.y+A*Math.sin(m.midAngle);
191
+ m.indexLabelAngle=m.midAngle;m.radius=D}for(var p,t,b=0;b<r.length;b++){var m=q[b],x=f(b);if(null!==x){p=q[b];t=q[x];var C=0,C=g(p,t)-v;if(0>C){for(var B=t=p=0;B<r.length;B++)B!==b&&q[B].hemisphere===m.hemisphere&&(q[B].indexLabelTextBlock.y<m.indexLabelTextBlock.y?p++:t++);B=C/(p+t||1)*t;p=-1*(C-B);var F=t=0;"right"===m.hemisphere?(t=k(b,B),p=-1*(C-t),F=k(x,p),+F.toFixed(y)<+p.toFixed(y)&&+t.toFixed(y)<=+B.toFixed(y)&&k(b,-(p-F))):(t=k(x,B),p=-1*(C-t),F=k(b,p),+F.toFixed(y)<+p.toFixed(y)&&+t.toFixed(y)<=
192
+ +B.toFixed(y)&&k(x,-(p-F)))}}}}else for(b=0;b<r.length;b++)m=q[b],A="pie"===h.type?0.7*D:0.8*D,C=E.x+A*Math.cos(m.midAngle),B=E.y+A*Math.sin(m.midAngle),m.indexLabelTextBlock.x=C,m.indexLabelTextBlock.y=B;for(b=0;b<r.length;b++)m=q[b],m.indexLabelTextBlock.measureText(),C=C=0,"right"===m.hemisphere?(C=n.x2-(m.indexLabelTextBlock.x+m.indexLabelTextBlock.width+s),C*=-1):C=n.x1-(m.indexLabelTextBlock.x-m.indexLabelTextBlock.width-s),0<C&&(Math.abs(m.indexLabelTextBlock.y-m.indexLabelTextBlock.height/
193
+ 2-E.y)<D||Math.abs(m.indexLabelTextBlock.y+m.indexLabelTextBlock.height/2-E.y)<D)&&(C/=Math.abs(Math.cos(m.indexLabelAngle)),9<C&&(C*=0.3),C>e&&(e=C)),C=C=0,0<m.indexLabelAngle&&m.indexLabelAngle<Math.PI?(C=n.y2-(m.indexLabelTextBlock.y+m.indexLabelTextBlock.height/2+5),C*=-1):C=n.y1-(m.indexLabelTextBlock.y-m.indexLabelTextBlock.height/2-5),0<C&&Math.abs(m.indexLabelTextBlock.x-E.x)<D&&(C/=Math.abs(Math.sin(m.indexLabelAngle)),9<C&&(C*=0.3),C>e&&(e=C));b=function(a,b,c){for(var d=[],e=0;d.push(q[b]),
194
+ b!==c;b=(b+1+r.length)%r.length);d.sort(function(a,b){return a.y-b.y});for(b=0;b<d.length;b++)if(c=d[b],e<a)e+=c.indexLabelTextBlock.height,c.indexLabelTextBlock.text="",c.indexLabelText="",c.indexLabelTextBlock.measureText();else break};x=m=-1;for(B=F=0;B<r.length;B++)if(p=q[B],p.indexLabelText){var G=f(B);null!==G&&(t=q[G],C=0,C=g(p,t),0>C?(0>m&&(m=B),G!==m&&(x=G),F+=-C):0<F&&(b(F,m,x),x=m=-1,F=0))}0<F&&b(F,m,x)}c(l.animationEnabled&&0===l.renderCount?u?60:30:1);d()}var l=this;if(!(0>=a.dataSeriesIndexes.length)){var h=
195
+ this.data[a.dataSeriesIndexes[0]],r=h.dataPoints,s=10,n=this.plotArea,p=0,t={frame:0,maxFrames:1},q=[],v=2,w=1.3,x=20/180*Math.PI,y=6,E={x:(n.x2+n.x1)/2,y:(n.y2+n.y1)/2},D="inside"===h.indexLabelPlacement?0.95*Math.min(n.width,n.height)/2:0.8*Math.min(n.width,n.height)/2,A=D*w;this.pieDoughnutClickHandler=function(a){t.frame===t.maxFrames&&(a=a.dataPoint,a.exploded=a.exploded?!1:!0,c(u?15:4),e())};b();m()}};v.prototype.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||
196
+ window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();S.prototype.registerSpace=function(a,c){"top"===a?this._topOccupied+=c.height:"bottom"===a?this._bottomOccupied+=c.height:"left"===a?this._leftOccupied+=c.width:"right"===a&&(this._rightOccupied+=c.width)};S.prototype.unRegisterSpace=function(a,c){"top"===a?this._topOccupied-=c.height:"bottom"===a?this._bottomOccupied-=c.height:"left"===a?this._leftOccupied-=
197
+ c.width:"right"===a&&(this._rightOccupied-=c.width)};S.prototype.getFreeSpace=function(){return{x1:this._leftOccupied,y1:this._topOccupied,x2:this.chart.width-this._rightOccupied,y2:this.chart.height-this._bottomOccupied,width:this.chart.width-this._rightOccupied-this._leftOccupied,height:this.chart.height-this._bottomOccupied-this._topOccupied}};S.prototype.reset=function(){this._topOccupied=0;this._bottomOccupied=3;this._rightOccupied=this._leftOccupied=0};N(F,I);F.prototype.render=function(a){a&&
198
+ this.ctx.save();var c=this.ctx.font;this.ctx.textBaseline=this.textBaseline;this._isDirty&&this.measureText(this.ctx);this.ctx.translate(this.x,this.y);this.ctx.font=this._getFontString();this.ctx.rotate(Math.PI/180*this.angle);var b=0,d=this.padding,e=null;if(0<this.borderThickness&&this.borderColor||this.backgroundColor)this.ctx.roundRect(0,0,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor),"middle"===this.textBaseline&&(d+=this.fontSize/2);this.ctx.fillStyle=
199
+ this.fontColor;for(var g=0;g<this._wrappedText.lines.length;g++)e=this._wrappedText.lines[g],"right"===this.horizontalAlign?b=this.width-e.width-this.padding:"left"===this.horizontalAlign?b=this.padding:"center"===this.horizontalAlign&&(b=(this.width-2*this.padding)/2-e.width/2+this.padding),this.ctx.fillText(e.text,b,d),d+=e.height;this.ctx.font=c;a&&this.ctx.restore()};F.prototype.setText=function(a){this.text=a;this._isDirty=!0;this._wrappedText=null};F.prototype.measureText=function(){if(null===
200
+ this.maxWidth)throw"Please set maxWidth and height for TextBlock";this._wrapText(this.ctx);this._isDirty=!1;return{width:this.width,height:this.height}};F.prototype._getLineWithWidth=function(a,c,b){a=String(a);if(!a)return{text:"",width:0};var d=b=0,e=a.length-1,g=Infinity;for(this.ctx.font=this._getFontString();d<=e;){var g=Math.floor((d+e)/2),f=a.substr(0,g+1);b=this.ctx.measureText(f).width;if(b<c)d=g+1;else if(b>c)e=g-1;else break}b>c&&1<f.length&&(f=f.substr(0,f.length-1),b=this.ctx.measureText(f).width);
201
+ c=!0;if(f.length===a.length||" "===a[f.length])c=!1;c&&(a=f.split(" "),1<a.length&&a.pop(),f=a.join(" "),b=this.ctx.measureText(f).width);return{text:f,width:b}};F.prototype._wrapText=function(){text=new String(aa(this.text));var a=[],c=this.ctx.font,b=0,d=0;for(this.ctx.font=this._getFontString();0<text.length;){var e=this.maxHeight-2*this.padding,g=this._getLineWithWidth(text,this.maxWidth-2*this.padding,!1);g.height=this._lineHeight;a.push(g);d=Math.max(d,g.width);b+=g.height;text=aa(text.slice(g.text.length,
202
+ text.length));e&&b>e&&(g=a.pop(),b-=g.height)}this._wrappedText={lines:a,width:d,height:b};this.width=d+2*this.padding;this.height=b+2*this.padding;this.ctx.font=c};F.prototype._getFontString=function(){return la("",this,null)};N(T,I);T.prototype.render=function(){if(this.text){var a=this.chart.layoutManager.getFreeSpace(),c=0,b=0,d=0,e=0,g=0,f,k;"top"===this.verticalAlign||"bottom"===this.verticalAlign?(e=a.width-2*this.margin,g=0.5*a.height-2*this.margin,d=0):"center"===this.verticalAlign&&("left"===
203
+ this.horizontalAlign||"right"===this.horizontalAlign?(e=a.height-2*this.margin,g=0.5*a.width-2*this.margin):"center"===this.horizontalAlign&&(e=a.width-2*this.margin,g=0.5*a.height-2*this.margin));var g=new F(this.ctx,{fontSize:this.fontSize,fontFamily:this.fontFamily,fontColor:this.fontColor,fontStyle:this.fontStyle,fontWeight:this.fontWeight,horizontalAlign:this.horizontalAlign,verticalAlign:this.verticalAlign,borderColor:this.borderColor,borderThickness:this.borderThickness,backgroundColor:this.backgroundColor,
204
+ maxWidth:e,maxHeight:g,cornerRadius:this.cornerRadius,text:this.text,padding:this.padding,textBaseline:this.borderColor&&0<this.borderThickness?"middle":"top"}),m=g.measureText();"top"===this.verticalAlign||"bottom"===this.verticalAlign?("top"===this.verticalAlign?(b=this.margin,k="top"):"bottom"===this.verticalAlign&&(b=a.y2-this.margin-m.height,k="bottom"),"left"===this.horizontalAlign?c=a.x1+this.margin:"center"===this.horizontalAlign?c=a.x1+(e/2-m.width/2)+this.margin:"right"===this.horizontalAlign&&
205
+ (c=a.x2-this.margin-m.width),f=this.horizontalAlign,this.width=m.width,this.height=m.height):"center"===this.verticalAlign&&("left"===this.horizontalAlign?(c=a.x1+this.margin,b=a.y2-this.margin-(e/2-m.width/2),d=-90,k="left",this.width=m.height,this.height=m.width):"right"===this.horizontalAlign?(c=a.x2-this.margin,b=a.y1+this.margin+(e/2-m.width/2),d=90,k="right",this.width=m.height,this.height=m.width):"center"===this.horizontalAlign&&(b=a.y1+(a.height/2-m.height/2),c=a.x1+(a.width/2-m.width/2),
206
+ k="center",this.width=m.width,this.height=m.height),f="center");g.x=c;g.y=b;g.angle=d;g.horizontalAlign=f;g.render(!0);this.chart.layoutManager.registerSpace(k,{width:this.width+2*this.margin,height:this.height+2*this.margin});this.bounds={x1:c,y1:b,x2:c+this.width,y2:b+this.height};this.ctx.textBaseline="top"}};N($,I);$.prototype.render=function(){var a=this.chart.layoutManager.getFreeSpace(),c=null,b=0,d=0,e=0,g=0,f=[],k=[];"top"===this.verticalAlign||"bottom"===this.verticalAlign?(this.orientation=
207
+ "horizontal",c=this.verticalAlign,e=0.9*a.width,g=0.5*a.height):"center"===this.verticalAlign&&(this.orientation="vertical",c=this.horizontalAlign,e=0.5*a.width,g=0.9*a.height);for(var m=0;m<this.dataSeries.length;m++){var l=this.dataSeries[m],h=l.legendMarkerType?l.legendMarkerType:"line"!==l.type&&"stepLine"!==l.type&&"spline"!==l.type&&"scatter"!==l.type&&"bubble"!==l.type||!l.markerType?M.getDefaultLegendMarker(l.type):l.markerType,r=l.legendText?l.legendText:l.name,s=l.legendMarkerColor?l.legendMarkerColor:
208
+ l.markerColor?l.markerColor:l._colorSet[0],n=l.markerSize||"line"!==l.type&&"stepLine"!==l.type&&"spline"!==l.type?0.6*this.lineHeight:0;if("pie"!==l.type&&"doughnut"!==l.type)h={markerType:h,markerColor:s,text:r,textBlock:null,chartType:l.type,markerSize:n,lineColor:l._colorSet[0]},f.push(h);else for(var p=0;p<l.dataPoints.length;p++)n=l.dataPoints[p],h=n.legendMarkerType?n.legendMarkerType:l.legendMarkerType?l.legendMarkerType:M.getDefaultLegendMarker(l.type),r=n.legendText?n.legendText:l.legendText?
209
+ l.legendText:n.name?n.name:"DataPoint: "+(p+1),s=n.markerColor?n.markerColor:l.markerColor?l.markerColor:n.color?n.color:l.color?l.color:l._colorSet[p%l._colorSet.length],n=0!==n.markerSize&&(0!==l.markerSize||n.markerSize)||"line"!==l.type&&"stepLine"!==l.type&&"spline"!==l.type?0.6*this.lineHeight:0,h={markerType:h,markerColor:s,text:r,textBlock:null,chartType:l.type,markerSize:n},f.push(h)}if(0<f.length){l=null;for(m=p=0;m<f.length;m++){h=f[m];if("horizontal"===this.orientation){h.textBlock=new F(this.ctx,
210
+ {x:0,y:0,maxWidth:e,maxHeight:this.lineHeight,angle:0,text:h.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"top"});h.textBlock.measureText();if(!l||l.width+h.textBlock.width+(0===l.width?0:this.horizontalSpacing)>e)l={entries:[],width:0},k.push(l),this.height=k.length*(h.textBlock.height+5);h.textBlock.x=l.width;h.textBlock.y=0;l.width+=Math.round(h.textBlock.width+h.textBlock._lineHeight+
211
+ (0===l.width?0:0.5*h.textBlock._lineHeight))}else this.height+this.lineHeight<g?(l={entries:[],width:0},k.push(l),this.height=k.length*this.lineHeight):(l=k[p],p=(p+1)%k.length),h.textBlock=new F(this.ctx,{x:0,y:0,maxWidth:e,maxHeight:1.5*this.fontSize,angle:0,text:h.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"top"}),h.textBlock.measureText(),h.textBlock.x=l.width,h.textBlock.y=
212
+ 0,l.width+=h.textBlock.width+h.textBlock._lineHeight+(0===l.width?0:0.5*h.textBlock._lineHeight);l.entries.push(h);this.width=Math.max(l.width,this.width)}this.height=k.length*this.lineHeight}"top"===this.verticalAlign?(d="left"===this.horizontalAlign?a.x1+2:"right"===this.horizontalAlign?a.x2-this.width-2:a.x1+a.width/2-this.width/2,b=a.y1):"center"===this.verticalAlign?(d="left"===this.horizontalAlign?a.x1+2:"right"===this.horizontalAlign?a.x2-this.width-2:a.x1+a.width/2-this.width/2,b=a.y1+a.height/
213
+ 2-this.height/2):"bottom"===this.verticalAlign&&(d="left"===this.horizontalAlign?a.x1+2:"right"===this.horizontalAlign?a.x2-this.width-2:a.x1+a.width/2-this.width/2,b=a.y2-this.height-5);for(m=0;m<k.length;m++)for(l=k[m],a=0;a<l.entries.length;a++){h=l.entries[a];e=h.textBlock.x+d+(0===a?0.2*n:0.4*this.lineHeight+0.2*n);g=b+m*this.lineHeight;if("line"===h.chartType||"stepLine"===h.chartType||"spline"===h.chartType)this.ctx.strokeStyle=h.lineColor,this.ctx.lineWidth=Math.ceil(this.lineHeight/8),this.ctx.beginPath(),
214
+ this.ctx.moveTo(e-0.1*this.lineHeight,g+this.lineHeight/2),this.ctx.lineTo(e+0.7*this.lineHeight,g+this.lineHeight/2),this.ctx.stroke();H.drawMarker(e+n/2,g+this.lineHeight/2,this.ctx,h.markerType,n,h.markerColor,null,0);h.textBlock.x=e+Math.round(0.9*this.lineHeight);h.textBlock.y=g;h.textBlock.render(!0)}this.chart.layoutManager.registerSpace(c,{width:this.width+2+2,height:this.height+5+5});this.bounds={x1:d,y1:b,x2:d+this.width,y2:b+this.height}};N(da,I);da.prototype.render=function(){var a=this.chart.layoutManager.getFreeSpace();
215
+ this.ctx.fillStyle="red";this.ctx.fillRect(a.x1,a.y1,a.x2,a.y2)};N(M,I);M.prototype.getDefaultAxisPlacement=function(){type=this.type;if("column"===type||"line"===type||"stepLine"===type||"spline"===type||"area"===type||"stepArea"===type||"splineArea"===type||"stackedColumn"===type||"stackedLine"===type||"bubble"===type||"scatter"===type||"stackedArea"===type||"stackedColumn100"===type||"stackedLine100"===type||"stackedArea100"===type)return"normal";if("bar"===type||"stackedBar"===type||"stackedBar100"===
216
+ type)return"xySwapped";if("pie"===type||"doughnut"===type)return"none";window.console.log("Unknown Chart Type: "+type);return null};M.getDefaultLegendMarker=function(a){if("column"===a||"stackedColumn"===a||"stackedLine"===a||"bar"===a||"stackedBar"===a||"stackedBar100"===a||"bubble"===a||"scatter"===a||"stackedColumn100"===a||"stackedLine100"===a||"stepArea"===a)return"square";if("line"===a||"stepLine"===a||"spline"===a||"pie"===a||"doughnut"===a)return"circle";if("area"===a||"splineArea"===a||"stackedArea"===
217
+ a||"stackedArea100"===a)return"triangle";window.console.log("Unknown Chart Type: "+a);return null};M.prototype.getDataPointAtX=function(a,c){if(!this.dataPoints||0===this.dataPoints.length)return null;var b={dataPoint:null,distance:Infinity,index:NaN},d=null,e=0,g=0,f=1,k=Infinity,m=0,l=0,h=0;"none"!==this.chart.plotInfo.axisPlacement&&(h=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,h=0<h?(this.dataPoints.length-1)/h*(a-this.dataPoints[0].x)>>0:0);for(;;){g=0<f?h+e:h-e;if(0<=g&&
218
+ g<this.dataPoints.length){var d=this.dataPoints[g],r=Math.abs(d.x-a);r<b.distance&&(b.dataPoint=d,b.distance=r,b.index=g);d=Math.abs(d.x-a);d<=k?k=d:0<f?m++:l++;if(1E3<m&&1E3<l)break}else if(0>h-e&&h+e>=this.dataPoints.length)break;-1===f?(e++,f=1):f=-1}return c||b.dataPoint.x!==a?c&&null!==b.dataPoint?b:null:b};M.prototype.getDataPointAtXY=function(a,c,b){if(!this.dataPoints||0===this.dataPoints.length)return null;b=b||!1;var d=[],e=0,g=0,f=1,k=!1,m=Infinity,l=0,h=0,r=0;"none"!==this.chart.plotInfo.axisPlacement&&
219
+ (r=this.chart.axisX.getXValueAt({x:a,y:c}),g=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,r=0<g?(this.dataPoints.length-1)/g*(r-this.dataPoints[0].x)>>0:0);for(;;){g=0<f?r+e:r-e;if(0<=g&&g<this.dataPoints.length){var s=this.chart._eventManager.objectMap[this.dataPointIds[g]],n=this.dataPoints[g];if(s){switch(this.type){case "column":case "stackedColumn":case "stackedColumn100":case "bar":case "stackedBar":case "stackedBar100":a>=s.x1&&(a<=s.x2&&c>=s.y1&&c<=s.y2)&&(d.push({dataPoint:n,
220
+ dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(s.x1-a),Math.abs(s.x2-a),Math.abs(s.y1-c),Math.abs(s.y2-c))}),k=!0);break;case "line":case "stepLine":case "spline":case "area":case "stepArea":case "stackedArea":case "stackedArea100":case "splineArea":case "scatter":var p=Q("markerSize",n,this)||4,t=b?20:p,q=Math.sqrt(Math.pow(s.x1-a,2)+Math.pow(s.y1-c,2));q<=t&&d.push({dataPoint:n,dataPointIndex:g,dataSeries:this,distance:q});g=Math.abs(s.x1-a);g<=m?m=g:0<f?l++:h++;q<=p/2&&(k=!0);break;
221
+ case "bubble":p=s.size;q=Math.sqrt(Math.pow(s.x1-a,2)+Math.pow(s.y1-c,2));q<=p/2&&(d.push({dataPoint:n,dataPointIndex:g,dataSeries:this,distance:q}),k=!0);break;case "pie":case "doughnut":p=s.center,t="doughnut"===this.type?0.6*s.radius:0,q=Math.sqrt(Math.pow(p.x-a,2)+Math.pow(p.y-c,2)),q<s.radius&&q>t&&(q=Math.atan2(c-p.y,a-p.x),0>q&&(q+=2*Math.PI),q=(180*(q/Math.PI)%360+360)%360,p=(180*(s.startAngle/Math.PI)%360+360)%360,s=(180*(s.endAngle/Math.PI)%360+360)%360,p>s&&(s+=360,q<p&&(q+=360)),q>p&&
222
+ q<s&&(d.push({dataPoint:n,dataPointIndex:g,dataSeries:this,distance:0}),k=!0))}if(k||1E3<l&&1E3<h)break}}else if(0>r-e&&r+e>=this.dataPoints.length)break;-1===f?(e++,f=1):f=-1}a=null;for(c=0;c<d.length;c++)a?d[c].distance<=a.distance&&(a=d[c]):a=d[c];return a};M.prototype.getMarkerProperties=function(a,c,b,d){var e=this.dataPoints;return{x:c,y:b,ctx:d,type:e[a].markerType?e[a].markerType:this.markerType,size:e[a].markerSize?e[a].markerSize:this.markerSize,color:e[a].markerColor?e[a].markerColor:this.markerColor?
223
+ this.markerColor:e[a].color?e[a].color:this.color?this.color:this._colorSet[a%this._colorSet.length],borderColor:e[a].markerBorderColor?e[a].markerBorderColor:this.markerBorderColor?this.markerBorderColor:null,borderThickness:e[a].markerBorderThickness?e[a].markerBorderThickness:this.markerBorderThickness?this.markerBorderThickness:null}};N(A,I);A.prototype.createLabels=function(){var a,c=0,b,d=0,e=0,c=0;if("bottom"===this._position||"top"===this._position)c=this.lineCoordinates.width/Math.abs(this.maximum-
224
+ this.minimum)*this.interval,d=this.labelAutoFit?"undefined"===typeof this._options.labelMaxWidth?0.9*c>>0:this.labelMaxWidth:"undefined"===typeof this._options.labelMaxWidth?0.7*this.chart.width>>0:this.labelMaxWidth,e="undefined"===typeof this._options.labelWrap||this.labelWrap?0.5*this.chart.height>>0:1.5*this.labelFontSize;else if("left"===this._position||"right"===this._position)c=this.lineCoordinates.height/Math.abs(this.maximum-this.minimum)*this.interval,d=this.labelAutoFit?"undefined"===typeof this._options.labelMaxWidth?
225
+ 0.3*this.chart.width>>0:this.labelMaxWidth:"undefined"===typeof this._options.labelMaxWidth?0.5*this.chart.width>>0:this.labelMaxWidth,e="undefined"===typeof this._options.labelWrap||this.labelWrap?2*c>>0:1.5*this.labelFontSize;if("axisX"===this.type&&"dateTime"===this.chart.plotInfo.axisXValueType)for(b=ha(new Date(this.maximum),this.interval,this.intervalType),c=this.intervalStartPosition;c<b;ha(c,this.interval,this.intervalType))a="axisX"===this.type&&this.labels[c]?this.labels[c]:qa(c,this.valueFormatString,
226
+ this.chart._cultureInfo),a=new F(this.ctx,{x:0,y:0,maxWidth:d,maxHeight:e,angle:this.labelAngle,text:this.prefix+a+this.suffix,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"}),this._labels.push({position:c.getTime(),textBlock:a,effectiveHeight:null});else{b=this.maximum;if(this.labels&&this.labels.length){a=Math.ceil(this.interval);for(var g=Math.ceil(this.intervalStartPosition),
227
+ f=!1,c=g;c<this.maximum;c+=a)if(this.labels[c])f=!0;else{f=!1;break}f&&(this.interval=a,this.intervalStartPosition=g)}for(c=this.intervalStartPosition;c<=b;c+=this.interval)a="axisX"===this.type&&this.labels[c]?this.labels[c]:fa(c,this.valueFormatString,this.chart._cultureInfo),a=new F(this.ctx,{x:0,y:0,maxWidth:d,maxHeight:e,angle:this.labelAngle,text:this.prefix+a+this.suffix,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,
228
+ fontStyle:this.labelFontStyle,textBaseline:"middle",borderThickness:0}),this._labels.push({position:c,textBlock:a,effectiveHeight:null})}};A.prototype.createLabelsAndCalculateWidth=function(){var a=0;this._labels=[];if("left"===this._position||"right"===this._position)for(this.createLabels(),i=0;i<this._labels.length;i++){textBlock=this._labels[i].textBlock;var c=textBlock.measureText();labelEffectiveWidth=0===this.labelAngle?c.width:c.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+c.height/
229
+ 2*Math.sin(Math.PI/180*Math.abs(this.labelAngle));a<labelEffectiveWidth&&(a=labelEffectiveWidth);this._labels[i].effectiveWidth=labelEffectiveWidth}return(this.title?V(this.titleFontFamily,this.titleFontSize,this.titleFontWeight)+2:0)+a+this.tickLength+10};A.prototype.createLabelsAndCalculateHeight=function(){var a=0;this._labels=[];var c,b=0;this.createLabels();if("bottom"===this._position||"top"===this._position)for(b=0;b<this._labels.length;b++){c=this._labels[b].textBlock;c=c.measureText();var d=
230
+ 0,d=0===this.labelAngle?c.height:c.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+c.height/2*Math.cos(Math.PI/180*Math.abs(this.labelAngle));a<d&&(a=d);this._labels[b].effectiveHeight=d}return(this.title?V(this.titleFontFamily,this.titleFontSize,this.titleFontWeight)+2:0)+a+this.tickLength};A.setLayoutAndRender=function(a,c,b,d,e){var g,f,k,m=a.chart,l=m.ctx;a.calculateAxisParameters();c&&c.calculateAxisParameters();b&&b.calculateAxisParameters();if(c&&b&&"undefined"===typeof c._options.maximum&&
231
+ "undefined"===typeof c._options.minimum&&"undefined"===typeof c._options.interval&&"undefined"===typeof b._options.maximum&&"undefined"===typeof b._options.minimum&&"undefined"===typeof b._options.interval){var h=(c.maximum-c.minimum)/c.interval,r=(b.maximum-b.minimum)/b.interval;h>r?b.maximum=b.interval*h+b.minimum:r>h&&(c.maximum=c.interval*r+c.minimum)}var s=c?c.lineThickness?c.lineThickness:0:0,n=b?b.lineThickness?b.lineThickness:0:0,h=c?c.gridThickness?c.gridThickness:0:0,r=b?b.gridThickness?
232
+ b.gridThickness:0:0,p=c?c.margin:0;if("normal"===d)a.lineCoordinates={},s=c?c.createLabelsAndCalculateWidth():0,g=e.x1+s+p,a.lineCoordinates.x1=g,p=b?b.createLabelsAndCalculateWidth():0,f=e.x2-p>a.chart.width-10?a.chart.width-10:e.x2-p,a.lineCoordinates.x2=f,a.lineCoordinates.width=Math.abs(f-g),n=a.createLabelsAndCalculateHeight(),d=e.y2-n-a.margin,k=e.y2-a.margin,a.lineCoordinates.y1=d,a.lineCoordinates.y2=d,a.boundingRect={x1:g,y1:d,x2:f,y2:k,width:f-g,height:k-d},c&&(g=e.x1+c.margin,d=10>e.y1?
233
+ 10:e.y1,f=e.x1+s+c.margin,k=e.y2-n-a.margin,c.lineCoordinates={x1:f,y1:d,x2:f,y2:k,height:Math.abs(k-d)},c.boundingRect={x1:g,y1:d,x2:f,y2:k,width:f-g,height:k-d}),b&&(g=a.lineCoordinates.x2,d=10>e.y1?10:e.y1,f=g+p+b.margin,k=e.y2-n-a.margin,b.lineCoordinates={x1:g,y1:d,x2:g,y2:k,height:Math.abs(k-d)},b.boundingRect={x1:g,y1:d,x2:f,y2:k,width:f-g,height:k-d}),a.calculateValueToPixelConvertionParameters(),c&&c.calculateValueToPixelConvertionParameters(),b&&b.calculateValueToPixelConvertionParameters(),
234
+ l.save(),l.rect(a.boundingRect.x1-40,a.boundingRect.y1,a.boundingRect.width+80,a.boundingRect.height),l.clip(),a.renderLabelsTicksAndTitle(),l.restore(),c&&c.renderLabelsTicksAndTitle(),b&&b.renderLabelsTicksAndTitle(),m.preparePlotArea(),e=a.chart.plotArea,l.save(),l.rect(e.x1,e.y1-Math.max(r,h)/2,Math.abs(e.x2-e.x1),Math.abs(e.y2-e.y1+Math.max(r,h)/2+Math.max(r,h,a.lineThickness)/2));else{var t=a.createLabelsAndCalculateWidth();c&&(c.lineCoordinates={},g=e.x1+t+a.margin+a.lineThickness/2,f=e.x2>
235
+ c.chart.width-10?c.chart.width-10:e.x2,c.lineCoordinates.x1=g,c.lineCoordinates.x2=f,c.lineCoordinates.width=Math.abs(f-g));b&&(b.lineCoordinates={},g=e.x1+t+a.margin+a.lineThickness/2,f=e.x2>b.chart.width-10?b.chart.width-10:e.x2,b.lineCoordinates.x1=g,b.lineCoordinates.x2=f,b.lineCoordinates.width=Math.abs(f-g));var q=c?c.createLabelsAndCalculateHeight():0,u=b?b.createLabelsAndCalculateHeight():0;c&&(d=e.y2-q-c.margin,k=e.y2-c.margin,c.lineCoordinates.y1=d,c.lineCoordinates.y2=d,c.boundingRect=
236
+ {x1:g,y1:d,x2:f,y2:k,width:f-g,height:q});b&&(d=e.y1+b.margin,k=e.y1+b.margin+u,b.lineCoordinates.y1=k,b.lineCoordinates.y2=k,b.boundingRect={x1:g,y1:d,x2:f,y2:k,width:f-g,height:u});g=e.x1+a.margin;d=10>e.y1+u+n/2?10:e.y1+u+n/2;f=e.x1+t+a.margin;k=e.y2-q-p-s/2;a.lineCoordinates={x1:f,y1:d,x2:f,y2:k,height:Math.abs(k-d)};a.boundingRect={x1:g,y1:d,x2:f,y2:k,width:f-g,height:k-d};a.calculateValueToPixelConvertionParameters();c&&c.calculateValueToPixelConvertionParameters();b&&b.calculateValueToPixelConvertionParameters();
237
+ l.save();c&&c.renderLabelsTicksAndTitle();b&&b.renderLabelsTicksAndTitle();a.renderLabelsTicksAndTitle();m.preparePlotArea();e=a.chart.plotArea;l.save();l.rect(e.x1-Math.max(a.lineThickness,h,r)/2,e.y1,Math.abs(e.x2-e.x1+Math.max(a.lineThickness,h,r)/2+Math.max(h,r)/2),Math.abs(e.y2-e.y1))}l.clip();a.renderInterlacedColors();c&&c.renderInterlacedColors();b&&b.renderInterlacedColors();l.restore();a.renderGrid();c&&c.renderGrid();b&&b.renderGrid();a.renderAxisLine();c&&c.renderAxisLine();b&&b.renderAxisLine()};
238
+ A.prototype.renderLabelsTicksAndTitle=function(){var a=!1,c=0,b=1,d=0;0!==this.labelAngle&&360!==this.labelAngle&&(b=1.2);if("undefined"===typeof this._options.interval){if("bottom"===this._position||"top"===this._position){for(e=0;e<this._labels.length;e++)g=this._labels[e],g.position<this.minimum||(g=g.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+g.textBlock.height*Math.sin(Math.PI/180*this.labelAngle),c+=g);c>this.lineCoordinates.width*b&&(a=!0)}if("left"===this._position||"right"===this._position){for(e=
239
+ 0;e<this._labels.length;e++)g=this._labels[e],g.position<this.minimum||(g=g.textBlock.height*Math.cos(Math.PI/180*this.labelAngle)+g.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),c+=g);c>this.lineCoordinates.height*b&&(a=!0)}}if("bottom"===this._position){var e=0;this.ctx.lineWidth=this.tickThickness;this.ctx.strokeStyle=this.tickColor;for(var g,e=0;e<this._labels.length;e++)g=this._labels[e],g.position<this.minimum||g.position>this.maximum||(c=this.getPixelCoordinatesOnAxis(g.position),this.tickThickness&&
240
+ (this.ctx.beginPath(),this.ctx.moveTo(c.x<<0,c.y<<0),this.ctx.lineTo(c.x<<0,c.y+this.tickLength<<0),this.ctx.stroke()),a&&0!==d++%2||(0===g.textBlock.angle?(c.x-=g.textBlock.width/2,c.y+=this.tickLength+g.textBlock.fontSize/2):(c.x-=0>this.labelAngle?g.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,c.y+=this.tickLength+Math.abs(0>this.labelAngle?g.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0)),g.textBlock.x=c.x,g.textBlock.y=c.y,g.textBlock.render(!0)));this.title&&(this._titleTextBlock=
241
+ new F(this.ctx,{x:this.lineCoordinates.x1,y:this.boundingRect.y2-this.titleFontSize-5,maxWidth:this.lineCoordinates.width,maxHeight:1.5*this.titleFontSize,angle:0,text:this.title,horizontalAlign:"center",fontSize:this.titleFontSize,fontFamily:this.titleFontFamily,fontWeight:this.titleFontWeight,fontColor:this.titleFontColor,fontStyle:this.titleFontStyle,textBaseline:"top"}),this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/
242
+ 2,this._titleTextBlock.y=this.boundingRect.y2-this._titleTextBlock.height-2,this._titleTextBlock.render(!0))}else if("top"===this._position){this.ctx.lineWidth=this.tickThickness;this.ctx.strokeStyle=this.tickColor;for(e=0;e<this._labels.length;e++)g=this._labels[e],g.position<this.minimum||g.position>this.maximum||(c=this.getPixelCoordinatesOnAxis(g.position),this.tickThickness&&(this.ctx.beginPath(),this.ctx.moveTo(c.x<<0,c.y<<0),this.ctx.lineTo(c.x<<0,c.y-this.tickLength<<0),this.ctx.stroke()),
243
+ a&&0!==d++%2||(0===g.textBlock.angle?(c.x-=g.textBlock.width/2,c.y-=this.tickLength+g.textBlock.height/2):(c.x-=0<this.labelAngle?g.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,c.y-=this.tickLength+Math.abs(0<this.labelAngle?g.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+5:5)),g.textBlock.x=c.x,g.textBlock.y=c.y,g.textBlock.render(!0)));this.title&&(this._titleTextBlock=new F(this.ctx,{x:this.lineCoordinates.x1,y:this.boundingRect.y1,maxWidth:this.lineCoordinates.width,maxHeight:1.5*
244
+ this.titleFontSize,angle:0,text:this.title,horizontalAlign:"center",fontSize:this.titleFontSize,fontFamily:this.titleFontFamily,fontWeight:this.titleFontWeight,fontColor:this.titleFontColor,fontStyle:this.titleFontStyle,textBaseline:"top"}),this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.render(!0))}else if("left"===this._position){this.ctx.lineWidth=this.tickThickness;this.ctx.strokeStyle=
245
+ this.tickColor;for(e=0;e<this._labels.length;e++)g=this._labels[e],g.position<this.minimum||g.position>this.maximum||(c=this.getPixelCoordinatesOnAxis(g.position),this.tickThickness&&(this.ctx.beginPath(),this.ctx.moveTo(c.x<<0,c.y<<0),this.ctx.lineTo(c.x-this.tickLength<<0,c.y<<0),this.ctx.stroke()),a&&0!==d++%2||(g.textBlock.x=c.x-g.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5,g.textBlock.y=0===this.labelAngle?c.y-g.textBlock.height/2+this.labelFontSize/2:c.y-g.textBlock.width*
246
+ Math.sin(Math.PI/180*this.labelAngle),g.textBlock.render(!0)));this.title&&(this._titleTextBlock=new F(this.ctx,{x:this.boundingRect.x1+5,y:this.lineCoordinates.y2,maxWidth:this.lineCoordinates.height,maxHeight:1.5*this.titleFontSize,angle:-90,text:this.title,horizontalAlign:"center",fontSize:this.titleFontSize,fontFamily:this.titleFontFamily,fontWeight:this.titleFontWeight,fontColor:this.titleFontColor,fontStyle:this.titleFontStyle,textBaseline:"top"}),this._titleTextBlock.measureText(),this._titleTextBlock.y=
247
+ this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this._titleTextBlock.render(!0))}else if("right"===this._position){this.ctx.lineWidth=this.tickThickness;this.ctx.strokeStyle=this.tickColor;for(e=0;e<this._labels.length;e++)g=this._labels[e],g.position<this.minimum||g.position>this.maximum||(c=this.getPixelCoordinatesOnAxis(g.position),this.tickThickness&&(this.ctx.beginPath(),this.ctx.moveTo(c.x<<0,c.y<<0),this.ctx.lineTo(c.x+this.tickLength<<0,c.y<<0),this.ctx.stroke()),
248
+ a&&0!==d++%2||(g.textBlock.x=c.x+this.tickLength+5,g.textBlock.y=0===this.labelAngle?c.y-g.textBlock.height/2+this.labelFontSize/2:c.y,g.textBlock.render(!0)));this.title&&(this._titleTextBlock=new F(this.ctx,{x:this.boundingRect.x2-5,y:this.lineCoordinates.y2,maxWidth:this.lineCoordinates.height,maxHeight:1.5*this.titleFontSize,angle:90,text:this.title,horizontalAlign:"center",fontSize:this.titleFontSize,fontFamily:this.titleFontFamily,fontWeight:this.titleFontWeight,fontColor:this.titleFontColor,
249
+ fontStyle:this.titleFontStyle,textBaseline:"top"}),this._titleTextBlock.measureText(),this._titleTextBlock.y=this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this._titleTextBlock.render(!0))}};A.prototype.renderInterlacedColors=function(){var a=this.chart.plotArea.ctx,c,b,d=this.chart.plotArea;if(("bottom"===this._position||"top"===this._position)&&this.interlacedColor){var e=0;a.fillStyle=this.interlacedColor;for(e=0;e<this._labels.length;e+=2)c=this.getPixelCoordinatesOnAxis(this._labels[e].position),
250
+ b=e+1>=this._labels.length?this.getPixelCoordinatesOnAxis(this.maximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(c.x,d.y1,Math.abs(b.x-c.x),Math.abs(d.y1-d.y2))}else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e<this._labels.length;e+=2)b=this.getPixelCoordinatesOnAxis(this._labels[e].position),c=e+1>=this._labels.length?this.getPixelCoordinatesOnAxis(this.maximum):this.getPixelCoordinatesOnAxis(this._labels[e+
251
+ 1].position),a.fillRect(d.x1,c.y,Math.abs(d.x1-d.x2),Math.abs(c.y-b.y))};A.prototype.renderGrid=function(){var a=this.chart.ctx,c,b=this.chart.plotArea;if("bottom"===this._position||"top"===this._position){if(this.gridThickness&&0<this.gridThickness)for(a.lineWidth=this.gridThickness,a.strokeStyle=this.gridColor,a.beginPath(),d=0;d<this._labels.length;d++)this._labels[d].position<this.minimum||this._labels[d].position>this.maximum||(c=this.getPixelCoordinatesOnAxis(this._labels[d].position),a.moveTo(c.x<<
252
+ 0,b.y1<<0),a.lineTo(c.x<<0,b.y2<<0),a.stroke())}else if(("left"===this._position||"right"===this._position)&&this.gridThickness&&0<this.gridThickness){a.lineWidth=this.gridThickness;a.strokeStyle=this.gridColor;a.beginPath();for(var d=0;d<this._labels.length;d++)this._labels[d].position<this.minimum||this._labels[d].position>this.maximum||(c=this.getPixelCoordinatesOnAxis(this._labels[d].position),a.moveTo(b.x1<<0,c.y<<0),a.lineTo(b.x2<<0,c.y<<0),a.stroke())}};A.prototype.renderAxisLine=function(){var a=
253
+ this.chart.ctx;"bottom"===this._position||"top"===this._position?this.lineThickness&&(a.lineWidth=this.lineThickness,a.strokeStyle=this.lineColor?this.lineColor:"black",a.beginPath(),a.moveTo(this.lineCoordinates.x1,this.lineCoordinates.y1),a.lineTo(this.lineCoordinates.x2,this.lineCoordinates.y2),a.stroke()):"left"!==this._position&&"right"!==this._position||!this.lineThickness||(a.lineWidth=this.lineThickness,a.strokeStyle=this.lineColor,a.beginPath(),a.moveTo(this.lineCoordinates.x1,this.lineCoordinates.y1),
254
+ a.lineTo(this.lineCoordinates.x2,this.lineCoordinates.y2),a.stroke())};A.prototype.getPixelCoordinatesOnAxis=function(a){var c={},b=this.lineCoordinates.width,d=this.lineCoordinates.height;if("bottom"===this._position||"top"===this._position)b/=Math.abs(this.maximum-this.minimum),c.x=this.lineCoordinates.x1+b*(a-this.minimum),c.y=this.lineCoordinates.y1;if("left"===this._position||"right"===this._position)b=d/Math.abs(this.maximum-this.minimum),c.y=this.lineCoordinates.y2-b*(a-this.minimum),c.x=this.lineCoordinates.x2;
255
+ return c};A.prototype.getXValueAt=function(a){if(!a)return null;var c=null;"left"===this._position?c=(this.chart.axisX.maximum-this.chart.axisX.minimum)/this.chart.axisX.lineCoordinates.height*(this.chart.axisX.lineCoordinates.y2-a.y)+this.chart.axisX.minimum:"bottom"===this._position&&(c=(this.chart.axisX.maximum-this.chart.axisX.minimum)/this.chart.axisX.lineCoordinates.width*(a.x-this.chart.axisX.lineCoordinates.x1)+this.chart.axisX.minimum);return c};A.prototype.calculateValueToPixelConvertionParameters=
256
+ function(a){a={pixelPerUnit:null,minimum:null,reference:null};var c=this.lineCoordinates.width,b=this.lineCoordinates.height;a.minimum=this.minimum;if("bottom"===this._position||"top"===this._position)a.pixelPerUnit=c/Math.abs(this.maximum-this.minimum),a.reference=this.lineCoordinates.x1;if("left"===this._position||"right"===this._position)a.pixelPerUnit=-1*b/Math.abs(this.maximum-this.minimum),a.reference=this.lineCoordinates.y2;this.convertionParameters=a};A.prototype.calculateAxisParameters=function(){var a=
257
+ this.chart.layoutManager.getFreeSpace();"bottom"===this._position||"top"===this._position?(this.maxWidth=a.width,this.maxHeight=a.height):(this.maxWidth=a.height,this.maxHeight=a.width);var a="axisX"===this.type?500>this.maxWidth?8:Math.max(6,Math.floor(this.maxWidth/62)):Math.floor(this.maxWidth/40),c,b,d,e;"axisX"===this.type?(c=null!==this.sessionVariables.internalMinimum?this.sessionVariables.internalMinimum:this.dataInfo.viewPortMin,b=null!==this.sessionVariables.internalMaximum?this.sessionVariables.internalMaximum:
258
+ this.dataInfo.viewPortMax,0===b-c&&(b+=0.4,c-=0.4),d=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1):"axisY"===this.type&&(c="undefined"===typeof this._options.minimum?this.dataInfo.viewPortMin:this._options.minimum,b="undefined"===typeof this._options.maximum?this.dataInfo.viewPortMax:this._options.maximum,0===b-c?(b+=5,c-=5):(0!==b&&(b+=Math.abs(0.05)),0!==c&&(c-=Math.abs(0.05))),this.includeZero&&"undefined"===typeof this._options.minimum&&0<c&&(c=0),this.includeZero&&"undefined"===typeof this._options.maximum&&
259
+ 0>b&&(b=0));"axisX"===this.type&&"dateTime"===this.chart.plotInfo.axisXValueType?(e=b-c,this.intervalType||(e/1<=a?(this.interval=1,this.intervalType="millisecond"):e/2<=a?(this.interval=2,this.intervalType="millisecond"):e/5<=a?(this.interval=5,this.intervalType="millisecond"):e/10<=a?(this.interval=10,this.intervalType="millisecond"):e/20<=a?(this.interval=20,this.intervalType="millisecond"):e/50<=a?(this.interval=50,this.intervalType="millisecond"):e/100<=a?(this.interval=100,this.intervalType=
260
+ "millisecond"):e/200<=a?(this.interval=200,this.intervalType="millisecond"):e/250<=a?(this.interval=250,this.intervalType="millisecond"):e/300<=a?(this.interval=300,this.intervalType="millisecond"):e/400<=a?(this.interval=400,this.intervalType="millisecond"):e/500<=a?(this.interval=500,this.intervalType="millisecond"):e/(1*y.secondDuration)<=a?(this.interval=1,this.intervalType="second"):e/(2*y.secondDuration)<=a?(this.interval=2,this.intervalType="second"):e/(5*y.secondDuration)<=a?(this.interval=
261
+ 5,this.intervalType="second"):e/(10*y.secondDuration)<=a?(this.interval=10,this.intervalType="second"):e/(15*y.secondDuration)<=a?(this.interval=15,this.intervalType="second"):e/(20*y.secondDuration)<=a?(this.interval=20,this.intervalType="second"):e/(30*y.secondDuration)<=a?(this.interval=30,this.intervalType="second"):e/(1*y.minuteDuration)<=a?(this.interval=1,this.intervalType="minute"):e/(2*y.minuteDuration)<=a?(this.interval=2,this.intervalType="minute"):e/(5*y.minuteDuration)<=a?(this.interval=
262
+ 5,this.intervalType="minute"):e/(10*y.minuteDuration)<=a?(this.interval=10,this.intervalType="minute"):e/(15*y.minuteDuration)<=a?(this.interval=15,this.intervalType="minute"):e/(20*y.minuteDuration)<=a?(this.interval=20,this.intervalType="minute"):e/(30*y.minuteDuration)<=a?(this.interval=30,this.intervalType="minute"):e/(1*y.hourDuration)<=a?(this.interval=1,this.intervalType="hour"):e/(2*y.hourDuration)<=a?(this.interval=2,this.intervalType="hour"):e/(3*y.hourDuration)<=a?(this.interval=3,this.intervalType=
263
+ "hour"):e/(6*y.hourDuration)<=a?(this.interval=6,this.intervalType="hour"):e/(1*y.dayDuration)<=a?(this.interval=1,this.intervalType="day"):e/(2*y.dayDuration)<=a?(this.interval=2,this.intervalType="day"):e/(4*y.dayDuration)<=a?(this.interval=4,this.intervalType="day"):e/(1*y.weekDuration)<=a?(this.interval=1,this.intervalType="week"):e/(2*y.weekDuration)<=a?(this.interval=2,this.intervalType="week"):e/(3*y.weekDuration)<=a?(this.interval=3,this.intervalType="week"):e/(1*y.monthDuration)<=a?(this.interval=
264
+ 1,this.intervalType="month"):e/(2*y.monthDuration)<=a?(this.interval=2,this.intervalType="month"):e/(3*y.monthDuration)<=a?(this.interval=3,this.intervalType="month"):e/(6*y.monthDuration)<=a?(this.interval=6,this.intervalType="month"):(this.interval=e/(1*y.yearDuration)<=a?1:e/(2*y.yearDuration)<=a?2:e/(4*y.yearDuration)<=a?4:Math.floor(A.getNiceNumber(e/(a-1),!0)/y.yearDuration),this.intervalType="year")),this.minimum=null!==this.sessionVariables.internalMinimum?this.sessionVariables.internalMinimum:
265
+ c-d/2,this.maximum=this.sessionVariables.internalMaximum?this.sessionVariables.internalMaximum:b+d/2,this.valueFormatString||("year"===this.intervalType?this.valueFormatString="YYYY":"month"===this.intervalType?this.valueFormatString="MMM YYYY":"week"===this.intervalType?this.valueFormatString="MMM DD YYYY":"day"===this.intervalType?this.valueFormatString="MMM DD YYYY":"hour"===this.intervalType?this.valueFormatString="hh:mm TT":"minute"===this.intervalType?this.valueFormatString="hh:mm TT":"second"===
266
+ this.intervalType?this.valueFormatString="hh:mm:ss TT":"millisecond"===this.intervalType&&(this.valueFormatString="fff'ms'")),this.intervalStartPosition=this.getLabelStartPoint(new Date(this.minimum),this.intervalType,this.interval)):(this.intervalType="number",e=A.getNiceNumber(b-c,!1),this.interval=this._options&&this._options.interval?this._options.interval:A.getNiceNumber(e/(a-1),!0),this.minimum=null!==this.sessionVariables.internalMinimum?this.sessionVariables.internalMinimum:Math.floor(c/this.interval)*
267
+ this.interval,this.maximum=null!==this.sessionVariables.internalMaximum?this.sessionVariables.internalMaximum:Math.ceil(b/this.interval)*this.interval,"axisX"===this.type?(null===this.sessionVariables.internalMinimum&&(this.minimum=c-d/2),this.sessionVariables.internalMaximum||(this.maximum=b+d/2),this.intervalStartPosition=Math.floor((this.minimum+this.interval)/this.interval)*this.interval):"axisY"===this.type&&(this.intervalStartPosition=this.minimum));"axisX"===this.type&&(this._absoluteMinimum=
268
+ this._options&&"undefined"!==typeof this._options.minimum?this._options.minimum:this.dataInfo.min-d/2,this._absoluteMaximum=this._options&&"undefined"!==typeof this._options.maximum?this._options.maximum:this.dataInfo.max+d/2);if(!this.valueFormatString&&(this.valueFormatString="#,##0.##",e=Math.abs(this.maximum-this.minimum),1>e&&(c=Math.floor(Math.abs(Math.log(e)/Math.LN10))+2,2<c)))for(b=0;b<c-2;b++)this.valueFormatString+="#"};A.getNiceNumber=function(a,c){var b=Math.floor(Math.log(a)/Math.LN10),
269
+ d=a/Math.pow(10,b);return(c?1.5>d?1:3>d?2:7>d?5:10:1>=d?1:2>=d?2:5>=d?5:10)*Math.pow(10,b)};A.prototype.getLabelStartPoint=function(){var a=R(this.interval,this.intervalType),a=new Date(Math.floor(this.minimum/a)*a);if("millisecond"!==this.intervalType)if("second"===this.intervalType)0<a.getMilliseconds()&&(a.setSeconds(a.getSeconds()+1),a.setMilliseconds(0));else if("minute"===this.intervalType){if(0<a.getSeconds()||0<a.getMilliseconds())a.setMinutes(a.getMinutes()+1),a.setSeconds(0),a.setMilliseconds(0)}else if("hour"===
270
+ this.intervalType){if(0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setHours(a.getHours()+1),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("day"===this.intervalType){if(0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setDate(a.getDate()+1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("week"===this.intervalType){if(0<a.getDay()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setDate(a.getDate()+
271
+ (7-a.getDay())),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("month"===this.intervalType){if(1<a.getDate()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setMonth(a.getMonth()+1),a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else"year"===this.intervalType&&(0<a.getMonth()||1<a.getDate()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())&&(a.setFullYear(a.getFullYear()+1),a.setMonth(0),
272
+ a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0));return a};N(L,I);L.prototype._initialize=function(){if(this.enabled){this.container=document.createElement("div");this.container.setAttribute("class","canvasjs-chart-tooltip");this.container.style.position="absolute";this.container.style.height="auto";this.container.style.boxShadow="1px 1px 2px 2px rgba(0,0,0,0.1)";this.container.style.zIndex="1000";this.container.style.display="none";var a;a='<div style=" width: auto;height: auto;min-width: 50px;';
273
+ a+="line-height: 20px;";a+="padding: 5px;";a+="font-family: Calibri, Arial, Georgia, serif;";a+="font-weight: 400;";a+="font-style: "+(u?"italic;":"normal;");a+="font-size: 14px;";a+="color: #000000;";a+="text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);";a+="text-align: left;";a+="border: 2px solid gray;";a+=u?"background: rgba(255,255,255,.9);":"background: rgb(255,255,255);";a+="text-indent: 0px;";a+="white-space: nowrap;";a+="border-radius: 10px;";u||(a+="filter: alpha(opacity = 90);",a+="filter: progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#666666');");
274
+ a+='} "> Sample Tooltip</div>';this.container.innerHTML=a;this.contentDiv=this.container.firstChild;this.container.style.borderRadius=this.contentDiv.style.borderRadius;this.chart._canvasJSContainer.appendChild(this.container)}};L.prototype.mouseMoveHandler=function(a,c){this._lastUpdated&&40>(new Date).getTime()-this._lastUpdated||(this._lastUpdated=(new Date).getTime(),this._updateToolTip(a,c))};L.prototype._updateToolTip=function(a,c){if(this.enabled){if("undefined"===typeof a||"undefined"===typeof c){if(isNaN(this._prevX)||
275
+ isNaN(this._prevY))return;a=this._prevX;c=this._prevY}else this._prevX=a,this._prevY=c;var b=null,d=null,e=[],g=0;if(this.shared&&"none"!==this.chart.plotInfo.axisPlacement){g="xySwapped"===this.chart.plotInfo.axisPlacement?(this.chart.axisX.maximum-this.chart.axisX.minimum)/this.chart.axisX.lineCoordinates.height*(this.chart.axisX.lineCoordinates.y2-c)+this.chart.axisX.minimum:(this.chart.axisX.maximum-this.chart.axisX.minimum)/this.chart.axisX.lineCoordinates.width*(a-this.chart.axisX.lineCoordinates.x1)+
276
+ this.chart.axisX.minimum;b=[];for(d=0;d<this.chart.data.length;d++){var f=this.chart.data[d].getDataPointAtX(g,!0);f&&0<=f.index&&(f.dataSeries=this.chart.data[d],b.push(f))}if(0===b.length)return;b.sort(function(a,b){return a.distance-b.distance});g=b[0];for(d=0;d<b.length;d++)b[d].dataPoint.x.valueOf()===g.dataPoint.x.valueOf()&&e.push(b[d]);b=null}else if((f=this.chart.getDataPointAtXY(a,c,!0))?(this.currentDataPointIndex=f.dataPointIndex,this.currentSeriesIndex=f.dataSeries.index):u?(f=ka(a,c,
277
+ this.chart._eventManager.ghostCtx),0<f&&"undefined"!==typeof this.chart._eventManager.objectMap[f]?(eventObject=this.chart._eventManager.objectMap[f],this.currentSeriesIndex=eventObject.dataSeriesIndex,this.currentDataPointIndex=0<=eventObject.dataPointIndex?eventObject.dataPointIndex:-1):this.currentDataPointIndex=-1):this.currentDataPointIndex=-1,0<=this.currentSeriesIndex){d=this.chart.data[this.currentSeriesIndex];f={};if(0<=this.currentDataPointIndex)b=d.dataPoints[this.currentDataPointIndex],
278
+ f.dataSeries=d,f.dataPoint=b,f.index=this.currentDataPointIndex,f.distance=Math.abs(b.x-g);else if("line"===d.type||"stepLine"===d.type||"spline"===d.type||"area"===d.type||"stepArea"===d.type||"splineArea"===d.type||"stackedArea"===d.type||"stackedArea100"===d.type)g=(this.chart.axisX.maximum-this.chart.axisX.minimum)/this.chart.axisX.lineCoordinates.width*(a-this.chart.axisX.lineCoordinates.x1)+this.chart.axisX.minimum.valueOf(),f=d.getDataPointAtX(g,!0),f.dataSeries=d,this.currentDataPointIndex=
279
+ f.index,b=f.dataPoint;else return;e.push(f)}if(0<e.length){this.highlightObjects(e);g="";g=this.getToolTipInnerHTML({entries:e});this.contentDiv.innerHTML=g;this.contentDiv.innerHTML=g;g=!1;"none"===this.container.style.display&&(g=!0,this.container.style.display="block");try{this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.borderColor?this.borderColor:e[0].dataPoint.color?e[0].dataPoint.color:e[0].dataSeries.color?e[0].dataSeries.color:
280
+ e[0].dataSeries._colorSet[e[0].index%e[0].dataSeries._colorSet.length]}catch(k){}"pie"===e[0].dataSeries.type||"doughnut"===e[0].dataSeries.type||"bar"===e[0].dataSeries.type||"stackedBar"===e[0].dataSeries.type||"stackedBar100"===e[0].dataSeries.type?toolTipLeft=a-10-this.container.clientWidth:(toolTipLeft=this.chart.axisX.lineCoordinates.width/Math.abs(this.chart.axisX.maximum-this.chart.axisX.minimum)*Math.abs(e[0].dataPoint.x-this.chart.axisX.minimum)+this.chart.axisX.lineCoordinates.x1+0.5-this.container.clientWidth<<
281
+ 0,toolTipLeft-=10);toolTipLeft=0<toolTipLeft?toolTipLeft+"px":toolTipLeft+this.container.clientWidth+20+"px";e=1!==e.length||this.shared||"line"!==e[0].dataSeries.type&&"stepLine"!==e[0].dataSeries.type&&"spline"!==e[0].dataSeries.type&&"area"!==e[0].dataSeries.type&&"stepArea"!==e[0].dataSeries.type&&"splineArea"!==e[0].dataSeries.type&&"stackedArea"!==e[0].dataSeries.type&&"stackedArea100"!==e[0].dataSeries.type?"bar"===e[0].dataSeries.type||"stackedBar"===e[0].dataSeries.type||"stackedBar100"===
282
+ e[0].dataSeries.type?e[0].dataSeries.axisX.lineCoordinates.y2-e[0].dataSeries.axisX.lineCoordinates.height/Math.abs(e[0].dataSeries.axisX.maximum-e[0].dataSeries.axisX.minimum)*Math.abs(e[0].dataPoint.x-e[0].dataSeries.axisX.minimum)+0.5<<0:c:e[0].dataSeries.axisY.lineCoordinates.y2-e[0].dataSeries.axisY.lineCoordinates.height/Math.abs(e[0].dataSeries.axisY.maximum-e[0].dataSeries.axisY.minimum)*Math.abs(e[0].dataPoint.y-e[0].dataSeries.axisY.minimum)+0.5<<0;e=-e+10;0<e+this.container.clientHeight+
283
+ 5&&(e-=e+this.container.clientHeight+5-0);this.container.style.left=toolTipLeft;this.container.style.bottom=e+"px";!this.animationEnabled||g?this.disableAnimation():this.enableAnimation()}}};L.prototype.highlightObjects=function(a){if(this.enabled){var c=this.chart.overlaidCanvasCtx;this.chart.resetOverlayedCanvas();c.save();var b=this.chart.plotArea;c.rect(b.x1,b.y1,b.width,b.height);c.clip();c.beginPath();for(b=0;b<a.length;b++){var d=a[b];if((d=this.chart._eventManager.objectMap[d.dataSeries.dataPointIds[d.index]])&&
284
+ d.objectType&&"dataPoint"===d.objectType){var e=this.chart.data[d.dataSeriesIndex],g=d.dataPointIndex;if("line"===e.type||"stepLine"===e.type||"spline"===e.type||"scatter"===e.type||"area"===e.type||"stepArea"===e.type||"splineArea"===e.type||"stackedArea"===e.type||"stackedArea100"===e.type)e=e.getMarkerProperties(g,d.x1,d.y1,this.chart.overlaidCanvasCtx),e.size=Math.max(1.5*e.size<<0,10),e.borderColor=e.borderColor||"#FFFFFF",e.borderThickness=e.borderThickness||Math.ceil(0.1*e.size),H.drawMarkers([e]);
285
+ else if("bubble"===e.type)e=e.getMarkerProperties(g,d.x1,d.y1,this.chart.overlaidCanvasCtx),e.size=d.size,e.color="white",e.borderColor="white",c.globalAlpha=0.3,H.drawMarkers([e]),c.globalAlpha=1;else if("column"===e.type||"stackedColumn"===e.type||"stackedColumn100"===e.type||"bar"===e.type||"stackedBar"===e.type||"stackedBar100"===e.type)c.globalAlpha=0.3,J(c,d.x1,d.y1,d.x2,d.y2,"white",!1,!1,!1,!1),c.globalAlpha=1;else if("pie"===e.type||"doughnut"===e.type)c.globalAlpha=0.3,ga(c,d.center,d.radius,
286
+ "white",e.type,d.startAngle,d.endAngle),c.globalAlpha=1}}c.globalAlpha=1;c.restore()}};L.prototype.getToolTipInnerHTML=function(a){a=a.entries;for(var c="",b=null,d=null,e=0,g="",f=!0,k=0;k<a.length;k++)if(a[k].dataSeries.toolTipContent||a[k].dataPoint.toolTipContent){f=!1;break}if(f&&this.content&&"function"===typeof this.content)c=this.content({entries:a});else if(1<a.length)for(k=0;k<a.length;k++){b=a[k].dataSeries;d=a[k].dataPoint;e=a[k].index;g="";0===k&&(f&&!this.content)&&(g+="undefined"!==
287
+ typeof this.chart.axisX.labels[d.x]?this.chart.axisX.labels[d.x]:"{x}",g+="</br>");if("line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"column"===b.type||"bar"===b.type||"scatter"===b.type||"stackedColumn"===b.type||"stackedColumn100"===b.type||"stackedBar"===b.type||"stackedBar100"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type)g+=d.toolTipContent?d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==
288
+ typeof this.content?this.content:"<span style='\"'color:{color};'\"'>{name}:</span>&nbsp;&nbsp;{y}";else if("bubble"===b.type)g+=d.toolTipContent?d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\"'color:{color};'\"'>{name}:</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}";else if("pie"===b.type||"doughnut"===b.type)g+=d.toolTipContent?d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?
289
+ this.content:"&nbsp;&nbsp;{y}";c+=this.chart.replaceKeywordsWithValue(g,d,b,e);k<a.length-1&&(c+="</br>")}else{b=a[0].dataSeries;d=a[0].dataPoint;e=a[0].index;if("line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"column"===b.type||"bar"===b.type||"scatter"===b.type||"stackedColumn"===b.type||"stackedColumn100"===b.type||"stackedBar"===b.type||"stackedBar100"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type)g=d.toolTipContent?
290
+ d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\"'color:{color};'\"'>"+(d.label?"{label}":"{x}")+" :</span>&nbsp;&nbsp;{y}";else if("bubble"===b.type)g=d.toolTipContent?d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\"'color:{color};'\"'>"+(d.label?"{label}":"{x}")+":</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}";else if("pie"===b.type||"doughnut"===
291
+ b.type)g=d.toolTipContent?d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:(d.name?"{name}:&nbsp;&nbsp;":d.label?"{label}:&nbsp;&nbsp;":"")+"{y}";c+=this.chart.replaceKeywordsWithValue(g,d,b,e)}return c};L.prototype.enableAnimation=function(){this.container.style.WebkitTransition||(this.container.style.WebkitTransition="left .2s ease-out, bottom .2s ease-out",this.container.style.MozTransition="left .2s ease-out, bottom .2s ease-out",this.container.style.MsTransition=
292
+ "left .2s ease-out, bottom .2s ease-out",this.container.style.transition="left .2s ease-out, bottom .2s ease-out")};L.prototype.disableAnimation=function(){this.container.style.WebkitTransition&&(this.container.style.WebkitTransition="",this.container.style.MozTransition="",this.container.style.MsTransition="",this.container.style.transition="")};L.prototype.hide=function(){this.enabled&&(this.container.style.display="none",this.currentSeriesIndex=-1,this._prevY=this._prevX=NaN,this.chart.resetOverlayedCanvas())};
293
+ v.prototype.replaceKeywordsWithValue=function(a,c,b,d){var e=this;return a.replace(/\{\s*[a-zA-Z]+\s*\}|"[^"]*"|'[^']*'/g,function(a){if('"'===a[0]&&'"'===a[a.length-1]||"'"===a[0]&&"'"===a[a.length-1])return a.slice(1,a.length-1);a=aa(a.slice(1,a.length-1));var f=null;if("color"===a)return c.color?c.color:b.color?b.color:b._colorSet[d%b._colorSet.length];if(c.hasOwnProperty(a))f=c;else if(b.hasOwnProperty(a))f=b;else return"";return"x"===a?e.axisX&&"dateTime"===e.plotInfo.axisXValueType?qa(f[a],
294
+ c.xValueFormatString?c.xValueFormatString:b.xValueFormatString?b.xValueFormatString:e.axisX&&e.axisX.valueFormatString?e.axisX.valueFormatString:"DD MMM YY",e._cultureInfo):fa(f[a],c.xValueFormatString?c.xValueFormatString:b.xValueFormatString?b.xValueFormatString:"#,##0.########",e._cultureInfo):"y"===a?fa(f[a],c.yValueFormatString?c.yValueFormatString:b.yValueFormatString?b.yValueFormatString:"#,##0.########",e._cultureInfo):f[a]})};Z.prototype.reset=function(){this.lastObjectId=0;this.objectMap=
295
+ [];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;u&&(this.ghostCtx.clearRect(0,0,this.chart.width,this.chart.height),this.ghostCtx.beginPath())};Z.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId};Z.prototype.mouseEventHandler=function(a){if("mousemove"===a.type||"click"===a.type){var c=null,b=null,d=null,e=-1,g=!1,f=!1,k=ra(a),d=b=null;(d=this.chart.getDataPointAtXY(k.x,k.y,!1))?b=d.dataSeries.dataPointIds[d.dataPointIndex]:u&&(b=ka(k.x,k.y,
296
+ this.ghostCtx));d=this.chart.plotArea;if(b&&k.x>d.x1&&k.x<d.x2&&k.y>d.y1&&k.y<d.y2)if("undefined"!==typeof this.objectMap[b]&&"dataPoint"===this.objectMap[b].objectType){c=this.objectMap[b];b=this.chart.data[c.dataSeriesIndex];d=b.dataPoints[c.dataPointIndex];e=c.dataPointIndex;if(null===this.previousDataPointEventObject||this.previousDataPointEventObject.dataSeriesIndex!==c.dataSeriesIndex||this.previousDataPointEventObject.dataPointIndex!==c.dataPointIndex)this.previousDataPointEventObject&&(g=
297
+ !0),d.mouseover&&d.mouseover.call(d,{x:k.x,y:k.y,dataPoint:d,dataSeries:b,dataPointIndex:e}),!b.mouseover||null!==this.previousDataPointEventObject&&this.previousDataPointEventObject.dataSeriesIndex===c.dataSeriesIndex||(b.mouseover&&b.mouseover.call(b,{x:k.x,y:k.y,dataPoint:d,dataSeries:b,dataPointIndex:e}),this.previousDataPointEventObject&&(f=!0));"mousemove"===a.type?(d.cursor&&d.cursor!==a.target.style.cursor?a.target.style.cursor=d.cursor:b.cursor&&b.cursor!==a.target.style.cursor&&(a.target.style.cursor=
298
+ b.cursor),d.mousemove&&d.mousemove.call(d,{x:k.x,y:k.y,dataPoint:d,dataSeries:b,dataPointIndex:e}),b.mousemove&&b.mousemove.call(b,{x:k.x,y:k.y,dataPoint:d,dataSeries:b,dataPointIndex:e})):"click"===a.type&&5>Math.sqrt(Math.pow(this.chart.dragStartPoint.x-k.x,2)+Math.pow(this.chart.dragStartPoint.y-k.y,2))&&(d.click&&d.click.call(d,{x:k.x,y:k.y,dataPoint:d,dataSeries:b,dataPointIndex:e}),b.click&&b.click.call(b,{x:k.x,y:k.y,dataPoint:d,dataSeries:b,dataPointIndex:e}),this.chart.pieDoughnutClickHandler&&
299
+ this.chart.pieDoughnutClickHandler.call(b,{x:k.x,y:k.y,dataPoint:d,dataSeries:b,dataPointIndex:e}))}else this.previousDataPointEventObject&&(f=g=!0);else this.previousDataPointEventObject&&(f=g=!0);if(g||f)a.target.style.cursor=this.chart._defaultCursor,a=this.chart.data[this.previousDataPointEventObject.dataSeriesIndex],b=a.dataPoints[this.previousDataPointEventObject.dataPointIndex],d=this.previousDataPointEventObject.dataPointIndex,g&&b.mouseout&&b.mouseout.call(b,{x:k.x,y:k.y,dataPoint:b,dataSeries:a,
300
+ dataPointIndex:d}),f&&a.mouseout&&a.mouseout.call(a,{x:k.x,y:k.y,dataPoint:b,dataSeries:a,dataPointIndex:d});this.previousDataPointEventObject=c}};N(oa,I);var H={drawMarker:function(a,c,b,d,e,g,f,k){if(b){var m=1;b.fillStyle=g?g:"#000000";b.strokeStyle=f?f:"#000000";b.lineWidth=k?k:0;"circle"===d?(b.moveTo(a,c),b.beginPath(),b.arc(a,c,e/2,0,2*Math.PI,!1),g&&b.fill(),k&&(f?b.stroke():(m=b.globalAlpha,b.globalAlpha=0.15,b.strokeStyle="black",b.stroke(),b.globalAlpha=m))):"square"===d?(b.beginPath(),
301
+ b.rect(a-e/2,c-e/2,e,e),g&&b.fill(),k&&(f?b.stroke():(m=b.globalAlpha,b.globalAlpha=0.15,b.strokeStyle="black",b.stroke(),b.globalAlpha=m))):"triangle"===d?(b.beginPath(),b.moveTo(a-e/2,c+e/2),b.lineTo(a+e/2,c+e/2),b.lineTo(a,c-e/2),b.closePath(),g&&b.fill(),k&&(f?b.stroke():(m=b.globalAlpha,b.globalAlpha=0.15,b.strokeStyle="black",b.stroke(),b.globalAlpha=m)),b.beginPath()):"cross"===d&&(b.strokeStyle=g,b.lineWidth=e/4,b.beginPath(),b.moveTo(a-e/2,c-e/2),b.lineTo(a+e/2,c+e/2),b.stroke(),b.moveTo(a+
302
+ e/2,c-e/2),b.lineTo(a-e/2,c+e/2),b.stroke())}},drawMarkers:function(a){for(var c=0;c<a.length;c++){var b=a[c];H.drawMarker(b.x,b.y,b.ctx,b.type,b.size,b.color,b.borderColor,b.borderThickness)}}},sa={Chart:function(a,c){var b=new v(a,c,this);this.render=function(){b.render()};this.options=b._options},addColorSet:function(a,c){U[a]=c},addCultureInfo:function(a,c){ea[a]=c}};sa.Chart.version="1.3.0 Beta 4";window.CanvasJS=sa})();
303
+ /*
304
+ excanvas is used to support IE678 which do not implement HTML5 Canvas Element. You can safely remove the following excanvas code if you don't need to support older browsers.
305
+
306
+ Copyright 2006 Google Inc. https://code.google.com/p/explorercanvas/
307
+ Licensed under the Apache License, Version 2.0
308
+ */
309
+ document.createElement("canvas").getContext||function(){function V(){return this.context_||(this.context_=new C(this))}function W(a,b,c){var g=M.call(arguments,2);return function(){return a.apply(b,g.concat(M.call(arguments)))}}function N(a){return String(a).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function O(a){a.namespaces.g_vml_||a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");a.namespaces.g_o_||a.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");
310
+ a.styleSheets.ex_canvas_||(a=a.createStyleSheet(),a.owningElement.id="ex_canvas_",a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}")}function X(a){var b=a.srcElement;switch(a.propertyName){case "width":b.getContext().clearRect();b.style.width=b.attributes.width.nodeValue+"px";b.firstChild.style.width=b.clientWidth+"px";break;case "height":b.getContext().clearRect(),b.style.height=b.attributes.height.nodeValue+"px",b.firstChild.style.height=b.clientHeight+
311
+ "px"}}function Y(a){a=a.srcElement;a.firstChild&&(a.firstChild.style.width=a.clientWidth+"px",a.firstChild.style.height=a.clientHeight+"px")}function D(){return[[1,0,0],[0,1,0],[0,0,1]]}function t(a,b){for(var c=D(),g=0;3>g;g++)for(var e=0;3>e;e++){for(var f=0,d=0;3>d;d++)f+=a[g][d]*b[d][e];c[g][e]=f}return c}function P(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=
312
+ a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.globalAlpha=a.globalAlpha;b.font=a.font;b.textAlign=a.textAlign;b.textBaseline=a.textBaseline;b.arcScaleX_=a.arcScaleX_;b.arcScaleY_=a.arcScaleY_;b.lineScale_=a.lineScale_}function Q(a){var b=a.indexOf("(",3),c=a.indexOf(")",b+1),b=a.substring(b+1,c).split(",");if(4!=b.length||"a"!=a.charAt(3))b[3]=1;return b}function E(a,b,c){return Math.min(c,Math.max(b,a))}function F(a,b,c){0>c&&c++;1<c&&c--;return 1>6*c?a+6*(b-a)*c:
313
+ 1>2*c?b:2>3*c?a+6*(b-a)*(2/3-c):a}function G(a){if(a in H)return H[a];var b,c=1;a=String(a);if("#"==a.charAt(0))b=a;else if(/^rgb/.test(a)){c=Q(a);b="#";for(var g,e=0;3>e;e++)g=-1!=c[e].indexOf("%")?Math.floor(255*(parseFloat(c[e])/100)):+c[e],b+=v[E(g,0,255)];c=+c[3]}else if(/^hsl/.test(a)){e=c=Q(a);b=parseFloat(e[0])/360%360;0>b&&b++;g=E(parseFloat(e[1])/100,0,1);e=E(parseFloat(e[2])/100,0,1);if(0==g)g=e=b=e;else{var f=0.5>e?e*(1+g):e+g-e*g,d=2*e-f;g=F(d,f,b+1/3);e=F(d,f,b);b=F(d,f,b-1/3)}b="#"+
314
+ v[Math.floor(255*g)]+v[Math.floor(255*e)]+v[Math.floor(255*b)];c=c[3]}else b=Z[a]||a;return H[a]={color:b,alpha:c}}function C(a){this.m_=D();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=1*q;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=a;var b="width:"+a.clientWidth+"px;height:"+a.clientHeight+"px;overflow:hidden;position:absolute",
315
+ c=a.ownerDocument.createElement("div");c.style.cssText=b;a.appendChild(c);b=c.cloneNode(!1);b.style.backgroundColor="red";b.style.filter="alpha(opacity=0)";a.appendChild(b);this.element_=c;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}function R(a,b,c,g){a.currentPath_.push({type:"bezierCurveTo",cp1x:b.x,cp1y:b.y,cp2x:c.x,cp2y:c.y,x:g.x,y:g.y});a.currentX_=g.x;a.currentY_=g.y}function S(a,b){var c=G(a.strokeStyle),g=c.color,c=c.alpha*a.globalAlpha,e=a.lineScale_*a.lineWidth;1>e&&(c*=e);b.push("<g_vml_:stroke",
316
+ ' opacity="',c,'"',' joinstyle="',a.lineJoin,'"',' miterlimit="',a.miterLimit,'"',' endcap="',$[a.lineCap]||"square",'"',' weight="',e,'px"',' color="',g,'" />')}function T(a,b,c,g){var e=a.fillStyle,f=a.arcScaleX_,d=a.arcScaleY_,k=g.x-c.x,n=g.y-c.y;if(e instanceof w){var h=0,l=g=0,u=0,m=1;if("gradient"==e.type_){h=e.x1_/f;c=e.y1_/d;var p=s(a,e.x0_/f,e.y0_/d),h=s(a,h,c),h=180*Math.atan2(h.x-p.x,h.y-p.y)/Math.PI;0>h&&(h+=360);1E-6>h&&(h=0)}else p=s(a,e.x0_,e.y0_),g=(p.x-c.x)/k,l=(p.y-c.y)/n,k/=f*q,
317
+ n/=d*q,m=x.max(k,n),u=2*e.r0_/m,m=2*e.r1_/m-u;f=e.colors_;f.sort(function(a,b){return a.offset-b.offset});d=f.length;p=f[0].color;c=f[d-1].color;k=f[0].alpha*a.globalAlpha;a=f[d-1].alpha*a.globalAlpha;for(var n=[],r=0;r<d;r++){var t=f[r];n.push(t.offset*m+u+" "+t.color)}b.push('<g_vml_:fill type="',e.type_,'"',' method="none" focus="100%"',' color="',p,'"',' color2="',c,'"',' colors="',n.join(","),'"',' opacity="',a,'"',' g_o_:opacity2="',k,'"',' angle="',h,'"',' focusposition="',g,",",l,'" />')}else e instanceof
318
+ I?k&&n&&b.push("<g_vml_:fill",' position="',-c.x/k*f*f,",",-c.y/n*d*d,'"',' type="tile"',' src="',e.src_,'" />'):(e=G(a.fillStyle),b.push('<g_vml_:fill color="',e.color,'" opacity="',e.alpha*a.globalAlpha,'" />'))}function s(a,b,c){a=a.m_;return{x:q*(b*a[0][0]+c*a[1][0]+a[2][0])-r,y:q*(b*a[0][1]+c*a[1][1]+a[2][1])-r}}function z(a,b,c){isFinite(b[0][0])&&(isFinite(b[0][1])&&isFinite(b[1][0])&&isFinite(b[1][1])&&isFinite(b[2][0])&&isFinite(b[2][1]))&&(a.m_=b,c&&(a.lineScale_=aa(ba(b[0][0]*b[1][1]-b[0][1]*
319
+ b[1][0]))))}function w(a){this.type_=a;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}function I(a,b){if(!a||1!=a.nodeType||"IMG"!=a.tagName)throw new A("TYPE_MISMATCH_ERR");if("complete"!=a.readyState)throw new A("INVALID_STATE_ERR");switch(b){case "repeat":case null:case "":this.repetition_="repeat";break;case "repeat-x":case "repeat-y":case "no-repeat":this.repetition_=b;break;default:throw new A("SYNTAX_ERR");}this.src_=a.src;this.width_=a.width;this.height_=a.height}
320
+ function A(a){this.code=this[a];this.message=a+": DOM Exception "+this.code}var x=Math,k=x.round,J=x.sin,K=x.cos,ba=x.abs,aa=x.sqrt,q=10,r=q/2;navigator.userAgent.match(/MSIE ([\d.]+)?/);var M=Array.prototype.slice;O(document);var U={init:function(a){a=a||document;a.createElement("canvas");a.attachEvent("onreadystatechange",W(this.init_,this,a))},init_:function(a){a=a.getElementsByTagName("canvas");for(var b=0;b<a.length;b++)this.initElement(a[b])},initElement:function(a){if(!a.getContext){a.getContext=
321
+ V;O(a.ownerDocument);a.innerHTML="";a.attachEvent("onpropertychange",X);a.attachEvent("onresize",Y);var b=a.attributes;b.width&&b.width.specified?a.style.width=b.width.nodeValue+"px":a.width=a.clientWidth;b.height&&b.height.specified?a.style.height=b.height.nodeValue+"px":a.height=a.clientHeight}return a}};U.init();for(var v=[],d=0;16>d;d++)for(var B=0;16>B;B++)v[16*d+B]=d.toString(16)+B.toString(16);var Z={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",
322
+ bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",
323
+ darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",
324
+ ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",
325
+ mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",
326
+ peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"},
327
+ H={},L={},$={butt:"flat",round:"round"},d=C.prototype;d.clearRect=function(){this.textMeasureEl_&&(this.textMeasureEl_.removeNode(!0),this.textMeasureEl_=null);this.element_.innerHTML=""};d.beginPath=function(){this.currentPath_=[]};d.moveTo=function(a,b){var c=s(this,a,b);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};d.lineTo=function(a,b){var c=s(this,a,b);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};d.bezierCurveTo=
328
+ function(a,b,c,g,e,f){e=s(this,e,f);a=s(this,a,b);c=s(this,c,g);R(this,a,c,e)};d.quadraticCurveTo=function(a,b,c,g){a=s(this,a,b);c=s(this,c,g);g={x:this.currentX_+2/3*(a.x-this.currentX_),y:this.currentY_+2/3*(a.y-this.currentY_)};R(this,g,{x:g.x+(c.x-this.currentX_)/3,y:g.y+(c.y-this.currentY_)/3},c)};d.arc=function(a,b,c,g,e,f){c*=q;var d=f?"at":"wa",k=a+K(g)*c-r,n=b+J(g)*c-r;g=a+K(e)*c-r;e=b+J(e)*c-r;k!=g||f||(k+=0.125);a=s(this,a,b);k=s(this,k,n);g=s(this,g,e);this.currentPath_.push({type:d,
329
+ x:a.x,y:a.y,radius:c,xStart:k.x,yStart:k.y,xEnd:g.x,yEnd:g.y})};d.rect=function(a,b,c,g){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+g);this.lineTo(a,b+g);this.closePath()};d.strokeRect=function(a,b,c,g){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+g);this.lineTo(a,b+g);this.closePath();this.stroke();this.currentPath_=e};d.fillRect=function(a,b,c,g){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+
330
+ c,b+g);this.lineTo(a,b+g);this.closePath();this.fill();this.currentPath_=e};d.createLinearGradient=function(a,b,c,g){var e=new w("gradient");e.x0_=a;e.y0_=b;e.x1_=c;e.y1_=g;return e};d.createRadialGradient=function(a,b,c,g,e,f){var d=new w("gradientradial");d.x0_=a;d.y0_=b;d.r0_=c;d.x1_=g;d.y1_=e;d.r1_=f;return d};d.drawImage=function(a,b){var c,g,e,d,r,y,n,h;e=a.runtimeStyle.width;d=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var l=a.width,u=a.height;a.runtimeStyle.width=
331
+ e;a.runtimeStyle.height=d;if(3==arguments.length)c=arguments[1],g=arguments[2],r=y=0,n=e=l,h=d=u;else if(5==arguments.length)c=arguments[1],g=arguments[2],e=arguments[3],d=arguments[4],r=y=0,n=l,h=u;else if(9==arguments.length)r=arguments[1],y=arguments[2],n=arguments[3],h=arguments[4],c=arguments[5],g=arguments[6],e=arguments[7],d=arguments[8];else throw Error("Invalid number of arguments");var m=s(this,c,g),p=[];p.push(" <g_vml_:group",' coordsize="',10*q,",",10*q,'"',' coordorigin="0,0"',' style="width:',
332
+ 10,"px;height:",10,"px;position:absolute;");if(1!=this.m_[0][0]||this.m_[0][1]||1!=this.m_[1][1]||this.m_[1][0]){var t=[];t.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",k(m.x/q),",","Dy=",k(m.y/q),"");var v=s(this,c+e,g),w=s(this,c,g+d);c=s(this,c+e,g+d);m.x=x.max(m.x,v.x,w.x,c.x);m.y=x.max(m.y,v.y,w.y,c.y);p.push("padding:0 ",k(m.x/q),"px ",k(m.y/q),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",t.join(""),", sizingmethod='clip');")}else p.push("top:",
333
+ k(m.y/q),"px;left:",k(m.x/q),"px;");p.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',q*e,"px;"," height:",q*d,'px"',' cropleft="',r/l,'"',' croptop="',y/u,'"',' cropright="',(l-r-n)/l,'"',' cropbottom="',(u-y-h)/u,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",p.join(""))};d.stroke=function(a){var b=[];b.push("<g_vml_:shape",' filled="',!!a,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',' coordorigin="0,0"',' coordsize="',10*q,",",10*q,'"',
334
+ ' stroked="',!a,'"',' path="');for(var c={x:null,y:null},d={x:null,y:null},e=0;e<this.currentPath_.length;e++){var f=this.currentPath_[e];switch(f.type){case "moveTo":b.push(" m ",k(f.x),",",k(f.y));break;case "lineTo":b.push(" l ",k(f.x),",",k(f.y));break;case "close":b.push(" x ");f=null;break;case "bezierCurveTo":b.push(" c ",k(f.cp1x),",",k(f.cp1y),",",k(f.cp2x),",",k(f.cp2y),",",k(f.x),",",k(f.y));break;case "at":case "wa":b.push(" ",f.type," ",k(f.x-this.arcScaleX_*f.radius),",",k(f.y-this.arcScaleY_*
335
+ f.radius)," ",k(f.x+this.arcScaleX_*f.radius),",",k(f.y+this.arcScaleY_*f.radius)," ",k(f.xStart),",",k(f.yStart)," ",k(f.xEnd),",",k(f.yEnd))}if(f){if(null==c.x||f.x<c.x)c.x=f.x;if(null==d.x||f.x>d.x)d.x=f.x;if(null==c.y||f.y<c.y)c.y=f.y;if(null==d.y||f.y>d.y)d.y=f.y}}b.push(' ">');a?T(this,b,c,d):S(this,b);b.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",b.join(""))};d.fill=function(){this.stroke(!0)};d.closePath=function(){this.currentPath_.push({type:"close"})};d.save=function(){var a=
336
+ {};P(this,a);this.aStack_.push(a);this.mStack_.push(this.m_);this.m_=t(D(),this.m_)};d.restore=function(){this.aStack_.length&&(P(this.aStack_.pop(),this),this.m_=this.mStack_.pop())};d.translate=function(a,b){z(this,t([[1,0,0],[0,1,0],[a,b,1]],this.m_),!1)};d.rotate=function(a){var b=K(a);a=J(a);z(this,t([[b,a,0],[-a,b,0],[0,0,1]],this.m_),!1)};d.scale=function(a,b){this.arcScaleX_*=a;this.arcScaleY_*=b;z(this,t([[a,0,0],[0,b,0],[0,0,1]],this.m_),!0)};d.transform=function(a,b,c,d,e,f){z(this,t([[a,
337
+ b,0],[c,d,0],[e,f,1]],this.m_),!0)};d.setTransform=function(a,b,c,d,e,f){z(this,[[a,b,0],[c,d,0],[e,f,1]],!0)};d.drawText_=function(a,b,c,d,e){var f=this.m_;d=0;var r=1E3,t=0,n=[],h;h=this.font;if(L[h])h=L[h];else{var l=document.createElement("div").style;try{l.font=h}catch(u){}h=L[h]={style:l.fontStyle||"normal",variant:l.fontVariant||"normal",weight:l.fontWeight||"normal",size:l.fontSize||10,family:l.fontFamily||"sans-serif"}}var l=h,m=this.element_;h={};for(var p in l)h[p]=l[p];p=parseFloat(m.currentStyle.fontSize);
338
+ m=parseFloat(l.size);"number"==typeof l.size?h.size=l.size:-1!=l.size.indexOf("px")?h.size=m:-1!=l.size.indexOf("em")?h.size=p*m:-1!=l.size.indexOf("%")?h.size=p/100*m:-1!=l.size.indexOf("pt")?h.size=m/0.75:h.size=p;h.size*=0.981;p=h.style+" "+h.variant+" "+h.weight+" "+h.size+"px "+h.family;m=this.element_.currentStyle;l=this.textAlign.toLowerCase();switch(l){case "left":case "center":case "right":break;case "end":l="ltr"==m.direction?"right":"left";break;case "start":l="rtl"==m.direction?"right":
339
+ "left";break;default:l="left"}switch(this.textBaseline){case "hanging":case "top":t=h.size/1.75;break;case "middle":break;default:case null:case "alphabetic":case "ideographic":case "bottom":t=-h.size/2.25}switch(l){case "right":d=1E3;r=0.05;break;case "center":d=r=500}b=s(this,b+0,c+t);n.push('<g_vml_:line from="',-d,' 0" to="',r,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!e,'" stroked="',!!e,'" style="position:absolute;width:1px;height:1px;">');e?S(this,n):T(this,n,{x:-d,y:0},
340
+ {x:r,y:h.size});e=f[0][0].toFixed(3)+","+f[1][0].toFixed(3)+","+f[0][1].toFixed(3)+","+f[1][1].toFixed(3)+",0,0";b=k(b.x/q)+","+k(b.y/q);n.push('<g_vml_:skew on="t" matrix="',e,'" ',' offset="',b,'" origin="',d,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',N(a),'" style="v-text-align:',l,";font:",N(p),'" /></g_vml_:line>');this.element_.insertAdjacentHTML("beforeEnd",n.join(""))};d.fillText=function(a,b,c,d){this.drawText_(a,b,c,d,!1)};d.strokeText=function(a,
341
+ b,c,d){this.drawText_(a,b,c,d,!0)};d.measureText=function(a){this.textMeasureEl_||(this.element_.insertAdjacentHTML("beforeEnd",'<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>'),this.textMeasureEl_=this.element_.lastChild);var b=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(b.createTextNode(a));return{width:this.textMeasureEl_.offsetWidth}};d.clip=function(){};
342
+ d.arcTo=function(){};d.createPattern=function(a,b){return new I(a,b)};w.prototype.addColorStop=function(a,b){b=G(b);this.colors_.push({offset:a,color:b.color,alpha:b.alpha})};d=A.prototype=Error();d.INDEX_SIZE_ERR=1;d.DOMSTRING_SIZE_ERR=2;d.HIERARCHY_REQUEST_ERR=3;d.WRONG_DOCUMENT_ERR=4;d.INVALID_CHARACTER_ERR=5;d.NO_DATA_ALLOWED_ERR=6;d.NO_MODIFICATION_ALLOWED_ERR=7;d.NOT_FOUND_ERR=8;d.NOT_SUPPORTED_ERR=9;d.INUSE_ATTRIBUTE_ERR=10;d.INVALID_STATE_ERR=11;d.SYNTAX_ERR=12;d.INVALID_MODIFICATION_ERR=
343
+ 13;d.NAMESPACE_ERR=14;d.INVALID_ACCESS_ERR=15;d.VALIDATION_ERR=16;d.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=U;CanvasRenderingContext2D=C;CanvasGradient=w;CanvasPattern=I;DOMException=A}();