PageSourceSearch

https://poweradmin.studyonlinebd.com/powerAdmin/assets/plugins/canvas/canvasjs.min.js

js studyonlinebd.com collected 2026-09-24 13:09:42 UTC 757,730 bytes, 11,502 lines download raw bytes

1/*
2 CanvasJS HTML5 & JavaScript Charts - v2.0.1 GA - https://canvasjs.com/ 
3 Copyright 2017 fenopix
4
5 --------------------- License Information --------------------
6 CanvasJS is a commercial product which requires purchase of license. Without a commercial license you can use it for evaluation purposes for upto 30 days. Please refer to the following link for further details.
7 https://canvasjs.com/license-canvasjs/
8
9 */
10(function() {
11    function pa(m, s) {
12        m.prototype = $a(s.prototype);
13        m.prototype.constructor = m;
14        m.base = s.prototype
15    }
16
17    function $a(m) {
18        function s() {}
19        s.prototype = m;
20        return new s
21    }
22
23    function Ta(m, s, q) {
24        "millisecond" === q ? m.setMilliseconds(m.getMilliseconds() + 1 * s) : "second" === q ? m.setSeconds(m.getSeconds() + 1 * s) : "minute" === q ? m.setMinutes(m.getMinutes() + 1 * s) : "hour" === q ? m.setHours(m.getHours() + 1 * s) : "day" === q ? m.setDate(m.getDate() + 1 * s) : "week" === q ? m.setDate(m.getDate() + 7 * s) : "month" === q ? m.setMonth(m.getMonth() + 1 * s) : "year" === q && m.setFullYear(m.getFullYear() +
25                1 * s);
26        return m
27    }
28
29    function ia(m, s) {
30        var q = !1;
31        0 > m && (q = !0, m *= -1);
32        m = "" + m;
33        for (s = s ? s : 1; m.length < s;) m = "0" + m;
34        return q ? "-" + m : m
35    }
36
37    function Ga(m) {
38        if (!m) return m;
39        m = m.replace(/^\s\s*/, "");
40        for (var s = /\s/, q = m.length; s.test(m.charAt(--q)););
41        return m.slice(0, q + 1)
42    }
43
44    function Ca(m) {
45        m.roundRect = function(m, q, v, y, x, z, Q, C) {
46            Q && (this.fillStyle = Q);
47            C && (this.strokeStyle = C);
48            "undefined" === typeof x && (x = 5);
49            this.lineWidth = z;
50            this.beginPath();
51            this.moveTo(m + x, q);
52            this.lineTo(m + v - x, q);
53            this.quadraticCurveTo(m + v, q, m + v, q + x);
54            this.lineTo(m + v, q + y -
55                x);
56            this.quadraticCurveTo(m + v, q + y, m + v - x, q + y);
57            this.lineTo(m + x, q + y);
58            this.quadraticCurveTo(m, q + y, m, q + y - x);
59            this.lineTo(m, q + x);
60            this.quadraticCurveTo(m, q, m + x, q);
61            this.closePath();
62            Q && this.fill();
63            C && 0 < z && this.stroke()
64        }
65    }
66
67    function Pa(m, s) {
68        return m - s
69    }
70
71    function R(m) {
72        var s = ((m & 16711680) >> 16).toString(16),
73            q = ((m & 65280) >> 8).toString(16);
74        m = ((m & 255) >> 0).toString(16);
75        s = 2 > s.length ? "0" + s : s;
76        q = 2 > q.length ? "0" + q : q;
77        m = 2 > m.length ? "0" + m : m;
78        return "#" + s + q + m
79    }
80
81    function ab(m, s) {
82        var q = this.length >>> 0,
83            v = Number(s) || 0,
84            v = 0 > v ? Math.ceil(v) : Math.floor(v);
85        for (0 > v && (v += q); v < q; v++)
86            if (v in this && this[v] === m) return v;
87        return -1
88    }
89
90    function y(m) {
91        return null === m || "undefined" === typeof m
92    }
93
94    function Da(m) {
95        m.indexOf || (m.indexOf = ab);
96        return m
97    }
98
99    function bb(m) {
100       /* if (Z.fSDec) m[ka("`eeDwdouMhrudods")](ka("e`u`@ohl`uhnoHuds`uhnoDoe"), function() {
101            Z._fTWm && Z._fTWm(m)
102        }) */
103    }
104
105    function Ua(m, s, q) {
106        q = q || "normal";
107        var v = m + "_" + s + "_" + q,
108            y = Va[v];
109        if (isNaN(y)) {
110            try {
111                m = "position:absolute; left:0px; top:-20000px; padding:0px;margin:0px;border:none;white-space:pre;line-height:normal;font-family:" + m + "; font-size:" +
112                    s + "px; font-weight:" + q + ";";
113                if (!ra) {
114                    var x = document.body;
115                    ra = document.createElement("span");
116                    ra.innerHTML = "";
117                    var z = document.createTextNode("Mpgyi");
118                    ra.appendChild(z);
119                    x.appendChild(ra)
120                }
121                ra.style.display = "";
122                ra.setAttribute("style", m);
123                y = Math.round(ra.offsetHeight);
124                ra.style.display = "none"
125            } catch (Q) {
126                y = Math.ceil(1.1 * s)
127            }
128            y = Math.max(y, s);
129            Va[v] = y
130        }
131        return y
132    }
133
134    function G(m, s) {
135        var q = [];
136        if (q = {
137                solid: [],
138                shortDash: [3, 1],
139                shortDot: [1, 1],
140                shortDashDot: [3, 1, 1, 1],
141                shortDashDotDot: [3, 1, 1, 1, 1, 1],
142                dot: [1, 2],
143                dash: [4, 2],
144                dashDot: [4, 2, 1,
145                    2
146                ],
147                longDash: [8, 2],
148                longDashDot: [8, 2, 1, 2],
149                longDashDotDot: [8, 2, 1, 2, 1, 2]
150            }
150[m || "solid"])
151            for (var v = 0; v < q.length; v++) q[v] *= s;
152        else q = [];
153        return q
154    }
155
156    function N(m, s, q, v) {
157        return m.addEventListener ? (m.addEventListener(s, q, v || !1), q) : m.attachEvent ? (v = function(s) {
158            s = s || window.event;
159            s.preventDefault = s.preventDefault || function() {
160                    s.returnValue = !1
161                };
162            s.stopPropagation = s.stopPropagation || function() {
163                    s.cancelBubble = !0
164                };
165            q.call(m, s)
166        }, m.attachEvent("on" + s, v), v) : !1
167    }
168
169    function Wa(m, s, q) {
170        m *= ha;
171        s *= ha;
172        m = q.getImageData(m, s, 2, 2).data;
173        s = !0;
174        for (q = 0; 4 > q; q++)
175            if (m[q] !== m[q + 4] | m[q] !== m[q + 8] | m[q] !== m[q + 12]) {
176                s = !1;
177                break
178            }
179        return s ? m[0] << 16 | m[1] << 8 | m[2] : 0
180    }
181
182    function na(m, s, q) {
183        return m in s ? s[m] : q[m]
184    }
185
186    function Ha(m, s, q) {
187        if (v && Xa) {
188            var y = m.getContext("2d");
189            La = y.webkitBackingStorePixelRatio || y.mozBackingStorePixelRatio || y.msBackingStorePixelRatio || y.oBackingStorePixelRatio || y.backingStorePixelRatio || 1;
190            ha = Qa / La;
191            m.width = s * ha;
192            m.height = q * ha;
193            Qa !== La && (m.style.width = s + "px", m.style.height = q + "px", y.scale(ha, ha))
194        } else m.width = s, m.height = q
195    }
196
197    function cb(m) {
198        if (!Ya) {
199            var s = !1,
200                q = !1;
201            "undefined" === typeof sa.Chart.creditHref ? (m.creditHref = ka("iuuqr;..b`ow`rkr/bnl."), m.creditText = ka("B`ow`rKR/bnl")) : (s = m.updateOption("creditText"), q = m.updateOption("creditHref"));
202
203        }
204    }
205
206    function ua(m, s) {
207        var q = document.createElement("canvas");
208        q.setAttribute("class",
209            "canvasjs-chart-canvas");
210        Ha(q, m, s);
211        v || "undefined" === typeof G_vmlCanvasManager || G_vmlCanvasManager.initElement(q);
212        return q
213    }
214
215    function qa(m, s, q) {
216        for (var v in q) s.style[v] = q[v]
217    }
218
219    function va(m, s, q) {
220        s.getAttribute("state") || (s.style.backgroundColor = m.toolbar.backgroundColor, s.style.color = m.toolbar.fontColor, s.style.border = "none", qa(m, s, {
221            WebkitUserSelect: "none",
222            MozUserSelect: "none",
223            msUserSelect: "none",
224            userSelect: "none"
225        }));
226        s.getAttribute("state") !== q && (s.setAttribute("state", q), s.setAttribute("type", "button"),
227            qa(m, s, {
228                padding: "5px 12px",
229                cursor: "pointer",
230                "float": "left",
231                width: "40px",
232                height: "25px",
233                outline: "0px",
234                verticalAlign: "baseline",
235                lineHeight: "0"
236            }), s.setAttribute("title", m._cultureInfo[q + "Text"]), s.innerHTML = "<img style='height:95%;' src='" + db[q].image + "' alt='" + m._cultureInfo[q + "Text"] + "' />")
237    }
238
239    function Ma() {
240        for (var m = null, s = 0; s < arguments.length; s++) m = arguments[s], m.style && (m.style.display = "inline")
241    }
242
243    function wa() {
244        for (var m = null, s = 0; s < arguments.length; s++)(m = arguments[s]) && m.style && (m.style.display = "none")
245    }
246
247    function X(m, s, q, v, x) {
248        this._defaultsKey = m;
249        this._themeOptionsKey = s;
250        this._index = v;
251        this.parent = x;
252        this._eventListeners = [];
253        m = {};
254        this.theme && y(s) && y(v) ? m = y(ya[this.theme]) ? ya.light1 : ya[this.theme] : this.parent && (this.parent.themeOptions && this.parent.themeOptions[s]) && (null === v ? m = this.parent.themeOptions[s] : 0 < this.parent.themeOptions[s].length && (v = Math.min(this.parent.themeOptions[s].length - 1, v), m = this.parent.themeOptions[s][v]));
255        this.themeOptions = m;
256        this.options = q ? q : {
257            _isPlaceholder: !0
258        };
259        this.setOptions(this.options,
260            m)
261    }
262
263    function Ea(m, s, q, v, y) {
264        "undefined" === typeof y && (y = 0);
265        this._padding = y;
266        this._x1 = m;
267        this._y1 = s;
268        this._x2 = q;
269        this._y2 = v;
270        this._rightOccupied = this._leftOccupied = this._bottomOccupied = this._topOccupied = this._padding
271    }
272
273    function la(m, s) {
274        la.base.constructor.call(this, "TextBlock", null, s, null, null);
275        this.ctx = m;
276        this._isDirty = !0;
277        this._wrappedText = null;
278        this._initialize()
279    }
280
281    function Ra(m, s) {
282        Ra.base.constructor.call(this, "Toolbar", "toolbar", s, null, m);
283        this.chart = m;
284        this.canvas = m.canvas;
285        this.ctx = this.chart.ctx;
286        this.optionsName =
287            "toolbar"
288    }
289
290    function Ia(m, s) {
291        Ia.base.constructor.call(this, "Title", "title", s, null, m);
292        this.chart = m;
293        this.canvas = m.canvas;
294        this.ctx = this.chart.ctx;
295        this.optionsName = "title";
296        if (y(this.options.margin) && m.options.subtitles)
297            for (var q = m.options.subtitles, v = 0; v < q.length; v++)
298                if ((y(q[v].horizontalAlign) && "center" === this.horizontalAlign || q[v].horizontalAlign === this.horizontalAlign) && (y(q[v].verticalAlign) && "top" === this.verticalAlign || q[v].verticalAlign === this.verticalAlign) && !q[v].dockInsidePlotArea === !this.dockInsidePlotArea) {
299                    this.margin =
300                        0;
301                    break
302                }
303        "undefined" === typeof this.options.fontSize && (this.fontSize = this.chart.getAutoFontSize(this.fontSize));
304        this.height = this.width = null;
305        this.bounds = {
306            x1: null,
307            y1: null,
308            x2: null,
309            y2: null
310        }
311    }
312
313    function Na(m, s, q) {
314        Na.base.constructor.call(this, "Subtitle", "subtitles", s, q, m);
315        this.chart = m;
316        this.canvas = m.canvas;
317        this.ctx = this.chart.ctx;
318        this.optionsName = "subtitles";
319        this.isOptionsInArray = !0;
320        "undefined" === typeof this.options.fontSize && (this.fontSize = this.chart.getAutoFontSize(this.fontSize));
321        this.height = this.width = null;
322        this.bounds = {
323            x1: null,
324            y1: null,
325            x2: null,
326            y2: null
327        }
328    }
329
330    function Ja(m) {
331        var s;
332        m && Ka[m] && (s = Ka[m]);
333        Ja.base.constructor.call(this, "CultureInfo", null, s, null, null)
334    }
335    var Z = {},
336        v = !!document.createElement("canvas").getContext,
337        sa = {
338            Chart: {
339                width: 500,
340                height: 400,
341                zoomEnabled: !1,
342                zoomType: "x",
343                backgroundColor: "white",
344                theme: "light1",
345                animationEnabled: !1,
346                animationDuration: 1200,
347                dataPointWidth: null,
348                dataPointMinWidth: null,
349                dataPointMaxWidth: null,
350                colorSet: "colorSet1",
351                culture: "en",
352                creditHref: "",
353                creditText: "CanvasJS",
354                interactivityEnabled: !0,
355                exportEnabled: !1,
356                exportFileName: "Chart",
357                rangeChanging: null,
358                rangeChanged: null,
359                publicProperties: {
360                    title: "readWrite",
361                    subtitles: "readWrite",
362                    toolbar: "readWrite",
363                    toolTip: "readWrite",
364                    legend: "readWrite",
365                    axisX: "readWrite",
366                    axisY: "readWrite",
367                    axisX2: "readWrite",
368                    axisY2: "readWrite",
369                    data: "readWrite",
370                    options: "readWrite",
371                    bounds: "readOnly",
372                    container: "readOnly"
373                }
374            },
375            Title: {
376                padding: 0,
377                text: null,
378                verticalAlign: "top",
379                horizontalAlign: "center",
380                fontSize: 20,
381
382                fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',
383
384                fontWeight: "bold",
385                fontColor: "black",
386                fontStyle: "normal",
387                borderThickness: 0,
388                borderColor: "black",
389                cornerRadius: 0,
390                backgroundColor: v ? "transparent" : null,
391                margin: 5,
392                wrap: !0,
393                maxWidth: null,
394                dockInsidePlotArea: !1,
395                publicProperties: {
396                    options: "readWrite",
397                    bounds: "readOnly",
398                    chart: "readOnly"
399                }
400            },
401            Subtitle: {
402                padding: 0,
403                text: null,
404                verticalAlign: "top",
405                horizontalAlign: "center",
406                fontSize: 14,
407                fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',
408                fontWeight: "normal",
409                fontColor: "black",
410                fontStyle: "normal",
411                borderThickness: 0,
412                borderColor: "black",
413                cornerRadius: 0,
414                backgroundColor: null,
415                margin: 2,
416                wrap: !0,
417                maxWidth: null,
418                dockInsidePlotArea: !1,
419                publicProperties: {
420                    options: "readWrite",
421                    bounds: "readOnly",
422                    chart: "readOnly"
423                }
424            },
425            Toolbar: {
426                backgroundColor: "white",
427                backgroundColorOnHover: "#2196f3",
428                borderColor: "#2196f3",
429                borderThickness: 1,
430                fontColor: "black",
431                fontColorOnHover: "white",
432                publicProperties: {
433                    options: "readWrite",
434                    chart: "readOnly"
435                }
436            },
437            Legend: {
438                name: null,
439                verticalAlign: "center",
440                horizontalAlign: "right",
441                fontSize: 14,
442                fontFamily: "calibri",
443                fontWeight: "normal",
444                fontColor: "black",
445                fontStyle: "normal",
446                cursor: null,
447                itemmouseover: null,
448                itemmouseout: null,
449                itemmousemove: null,
450                itemclick: null,
451                dockInsidePlotArea: !1,
452                reversed: !1,
453                backgroundColor: v ? "transparent" : null,
454                borderColor: v ? "transparent" : null,
455                borderThickness: 0,
456                cornerRadius: 0,
457                maxWidth: null,
458                maxHeight: null,
459                markerMargin: null,
460                itemMaxWidth: null,
461                itemWidth: null,
462                itemWrap: !0,
463                itemTextFormatter: null,
464                publicProperties: {
465                    options: "readWrite",
466                    bounds: "readOnly",
467                    chart: "readOnly"
468                }
469            },
470            ToolTip: {
471                enabled: !0,
472                shared: !1,
473                animationEnabled: !0,
474                content: null,
475                contentFormatter: null,
476                reversed: !1,
477                backgroundColor: v ? "rgba(255,255,255,.9)" : "rgb(255,255,255)",
478                borderColor: null,
479                borderThickness: 2,
480                cornerRadius: 5,
481                fontSize: 14,
482                fontColor: "black",
483                fontFamily: "Calibri, Arial, Georgia, serif;",
484                fontWeight: "normal",
485                fontStyle: "italic",
486                publicProperties: {
487                    options: "readWrite",
488                    chart: "readOnly"
489                }
490            },
491            Axis: {
492                minimum: null,
493                maximum: null,
494                viewportMinimum: null,
495                viewportMaximum: null,
496                interval: null,
497                intervalType: null,
498                reversed: !1,
499                logarithmic: !1,
500                logarithmBase: 10,
501                title: null,
502                titleFontColor: "black",
503                titleFontSize: 20,
504                titleFontFamily: "arial",
505                titleFontWeight: "normal",
506                titleFontStyle: "normal",
507                titleWrap: !0,
508                titleMaxWidth: null,
509                titleBackgroundColor: v ? "transparent" : null,
510                titleBorderColor: v ? "transparent" : null,
511                titleBorderThickness: 0,
512                titleCornerRadius: 0,
513                labelAngle: 0,
514                labelFontFamily: "arial",
515                labelFontColor: "black",
516                labelFontSize: 12,
517                labelFontWeight: "normal",
518                labelFontStyle: "normal",
519                labelAutoFit: !0,
520                labelWrap: !0,
521                labelMaxWidth: null,
522                labelFormatter: null,
523                labelBackgroundColor: v ? "transparent" : null,
524                labelBorderColor: v ? "transparent" : null,
525                labelBorderThickness: 0,
526                labelCornerRadius: 0,
527                labelPlacement: "outside",
528                prefix: "",
529                suffix: "",
530                includeZero: !0,
531                tickLength: 5,
532                tickColor: "black",
533                tickThickness: 1,
534                lineColor: "black",
535                lineThickness: 1,
536                lineDashType: "solid",
537                gridColor: "A0A0A0",
538                gridThickness: 0,
539                gridDashType: "solid",
540                interlacedColor: v ? "transparent" : null,
541                valueFormatString: null,
542                margin: 2,
543                publicProperties: {
544                    options: "readWrite",
545                    stripLines: "readWrite",
546                    scaleBreaks: "readWrite",
547                    crosshair: "readWrite",
548                    bounds: "readOnly",
549                    chart: "readOnly"
550                }
551            },
552            StripLine: {
553                value: null,
554                startValue: null,
555                endValue: null,
556                color: "orange",
557                opacity: null,
558                thickness: 2,
559                lineDashType: "solid",
560                label: "",
561                labelPlacement: "inside",
562                labelAlign: "far",
563                labelWrap: !0,
564                labelMaxWidth: null,
565                labelBackgroundColor: null,
566                labelBorderColor: v ? "transparent" : null,
567                labelBorderThickness: 0,
568                labelCornerRadius: 0,
569                labelFontFamily: "arial",
570                labelFontColor: "orange",
571                labelFontSize: 12,
572                labelFontWeight: "normal",
573                labelFontStyle: "normal",
574                labelFormatter: null,
575                showOnTop: !1,
576                publicProperties: {
577                    options: "readWrite",
578                    axis: "readOnly",
579                    bounds: "readOnly",
580                    chart: "readOnly"
581                }
582            },
583            ScaleBreaks: {
584                autoCalculate: !1,
585                collapsibleThreshold: "25%",
586                maxNumberOfAutoBreaks: 2,
587                spacing: 8,
588                type: "straight",
589                color: "#FFFFFF",
590                fillOpacity: 0.9,
591                lineThickness: 2,
592                lineColor: "#E16E6E",
593                lineDashType: "solid",
594                publicProperties: {
595                    options: "readWrite",
596                    customBreaks: "readWrite",
597                    axis: "readOnly",
598                    autoBreaks: "readOnly",
599                    bounds: "readOnly",
600                    chart: "readOnly"
601                }
602            },
603            Break: {
604                startValue: null,
605                endValue: null,
606                spacing: 8,
607                type: "straight",
608                color: "#FFFFFF",
609                fillOpacity: 0.9,
610                lineThickness: 2,
611                lineColor: "#E16E6E",
612                lineDashType: "solid",
613                publicProperties: {
614                    options: "readWrite",
615                    scaleBreaks: "readOnly",
616                    bounds: "readOnly",
617                    chart: "readOnly"
618                }
619            },
620            Crosshair: {
621                enabled: !1,
622                snapToDataPoint: !1,
623                color: "grey",
624                opacity: null,
625                thickness: 2,
626                lineDashType: "solid",
627                label: "",
628                labelWrap: !0,
629                labelMaxWidth: null,
630                labelBackgroundColor: v ? "grey" : null,
631                labelBorderColor: v ? "grey" : null,
632                labelBorderThickness: 0,
633                labelCornerRadius: 0,
634                labelFontFamily: v ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri",
635                labelFontSize: 12,
636                labelFontColor: "#fff",
637                labelFontWeight: "normal",
638                labelFontStyle: "normal",
639                labelFormatter: null,
640                valueFormatString: null,
641                publicProperties: {
642                    options: "readWrite",
643                    axis: "readOnly",
644                    bounds: "readOnly",
645                    chart: "readOnly"
646                }
647            },
648            DataSeries: {
649                name: null,
650                dataPoints: null,
651                label: "",
652                bevelEnabled: !1,
653                highlightEnabled: !0,
654                cursor: "default",
655                indexLabel: "",
656                indexLabelPlacement: "auto",
657                indexLabelOrientation: "horizontal",
658                indexLabelFontColor: "black",
659                indexLabelFontSize: 12,
660                indexLabelFontStyle: "normal",
661                indexLabelFontFamily: "Arial",
662                indexLabelFontWeight: "normal",
663                indexLabelBackgroundColor: null,
664                indexLabelLineColor: "gray",
665                indexLabelLineThickness: 1,
666                indexLabelLineDashType: "solid",
667                indexLabelMaxWidth: null,
668                indexLabelWrap: !0,
669                indexLabelFormatter: null,
670                lineThickness: 2,
671                lineDashType: "solid",
672                connectNullData: !1,
673                nullDataLineDashType: "dash",
674                color: null,
675                lineColor: null,
676                risingColor: "white",
677                fallingColor: "red",
678                fillOpacity: null,
679                startAngle: 0,
680                radius: null,
681                innerRadius: null,
682                neckHeight: null,
683                neckWidth: null,
684                reversed: !1,
685                valueRepresents: null,
686                linkedDataSeriesIndex: null,
687                whiskerThickness: 2,
688                whiskerDashType: "solid",
689                whiskerColor: null,
690                whiskerLength: null,
691                stemThickness: 2,
692                stemColor: null,
693                stemDashType: "solid",
694                upperBoxColor: "white",
695                lowerBoxColor: "white",
696                type: "column",
697                xValueType: "number",
698                axisXType: "primary",
699                axisYType: "primary",
700                axisXIndex: 0,
701                axisYIndex: 0,
702                xValueFormatString: null,
703                yValueFormatString: null,
704                zValueFormatString: null,
705                percentFormatString: null,
706                showInLegend: null,
707                legendMarkerType: null,
708                legendMarkerColor: null,
709                legendText: null,
710                legendMarkerBorderColor: v ? "transparent" : null,
711                legendMarkerBorderThickness: 0,
712                markerType: "circle",
713                markerColor: null,
714                markerSize: null,
715                markerBorderColor: v ? "transparent" : null,
716                markerBorderThickness: 0,
717                mouseover: null,
718                mouseout: null,
719                mousemove: null,
720                click: null,
721                toolTipContent: null,
722                visible: !0,
723                publicProperties: {
724                    options: "readWrite",
725                    axisX: "readWrite",
726                    axisY: "readWrite",
727                    chart: "readOnly"
728                }
729            },
730            TextBlock: {
731                x: 0,
732                y: 0,
733                width: null,
734                height: null,
735                maxWidth: null,
736                maxHeight: null,
737                padding: 0,
738                angle: 0,
739                text: "",
740                horizontalAlign: "center",
741                fontSize: 12,
742                fontFamily: "calibri",
743                fontWeight: "normal",
744                fontColor: "black",
745                fontStyle: "normal",
746                borderThickness: 0,
747                borderColor: "black",
748                cornerRadius: 0,
749                backgroundColor: null,
750                textBaseline: "top"
751            },
752            CultureInfo: {
753                decimalSeparator: ".",
754                digitGroupSeparator: ",",
755                zoomText: "Zoom",
756                panText: "Pan",
757                resetText: "Reset",
758                menuText: "More Options",
759                saveJPGText: "Save as JPEG",
760                savePNGText: "Save as PNG",
761                printText: "Print",
762                days: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
763                shortDays: "Sun Mon Tue Wed Thu Fri Sat".split(" "),
764                months: "January February March April May June July August September October November December".split(" "),
765                shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")
766            }
767        },
768        Ka = {
769            en: {}
770        },
771        x = v ? "Trebuchet MS, Helvetica, sans-serif" : "Arial",
772        Fa = v ? "Impact, Charcoal, sans-serif" : "Arial",
773        Aa = {
774            colorSet1: "#4F81BC #C0504E #9BBB58 #23BFAA #8064A1 #4AACC5 #F79647 #7F6084 #77A033 #33558B #E59566".split(" "),
775            colorSet2: "#6D78AD #51CDA0 #DF7970 #4C9CA0 #AE7D99 #C9D45C #5592AD #DF874D #52BCA8 #8E7AA3 #E3CB64 #C77B85 #C39762 #8DD17E #B57952 #FCC26C".split(" "),
776            colorSet3: "#8CA1BC #36845C #017E82 #8CB9D0 #708C98 #94838D #F08891 #0366A7 #008276 #EE7757 #E5BA3A #F2990B #03557B #782970".split(" ")
777        },
778        O, ga, T, Y, fa;
779    ga = "#333333";
780    T = "#000000";
781    O = "#666666";
782    fa = Y = "#000000";
783    var aa = 20,
784        z = 14,
785        Sa = {
786            colorSet: "colorSet1",
787            backgroundColor: "#FFFFFF",
788            title: {
789                fontFamily: Fa,
790                fontSize: 32,
791                fontColor: ga,
792                fontWeight: "normal",
793                verticalAlign: "top",
794                margin: 5
795            },
796            subtitles: [{
797                fontFamily: Fa,
798                fontSize: z,
799                fontColor: ga,
800                fontWeight: "normal",
801                verticalAlign: "top",
802                margin: 5
803            }],
804            data: [{
805                indexLabelFontFamily: x,
806                indexLabelFontSize: z,
807                indexLabelFontColor: ga,
808                indexLabelFontWeight: "normal",
809                indexLabelLineThickness: 1
810            }],
811            axisX: [{
812                titleFontFamily: x,
813                titleFontSize: aa,
814                titleFontColor: ga,
815                titleFontWeight: "normal",
816                labelFontFamily: x,
817                labelFontSize: z,
818                labelFontColor: T,
819                labelFontWeight: "normal",
820                lineThickness: 1,
821                lineColor: O,
822                tickThickness: 1,
823                tickColor: O,
824                gridThickness: 0,
825                gridColor: O,
826                stripLines: [{
827                    labelFontFamily: x,
828                    labelFontSize: z,
829                    labelFontColor: "#FF7300",
830                    labelFontWeight: "normal",
831                    labelBackgroundColor: null,
832                    color: "#FF7300",
833                    thickness: 1
834                }],
835                crosshair: {
836                    labelFontFamily: x,
837                    labelFontSize: z,
838                    labelFontColor: "#EEEEEE",
839                    labelFontWeight: "normal",
840                    labelBackgroundColor: fa,
841                    color: Y,
842                    thickness: 1,
843                    lineDashType: "dash"
844                },
845                scaleBreaks: {
846                    type: "zigzag",
847                    spacing: "2%",
848                    lineColor: "#BBBBBB",
849                    lineThickness: 1,
850                    lineDashType: "solid"
851                }
852            }],
853            axisX2: [{
854                titleFontFamily: x,
855                titleFontSize: aa,
856                titleFontColor: ga,
857                titleFontWeight: "normal",
858                labelFontFamily: x,
859                labelFontSize: z,
860                labelFontColor: T,
861                labelFontWeight: "normal",
862                lineThickness: 1,
863                lineColor: O,
864                tickThickness: 1,
865                tickColor: O,
866                gridThickness: 0,
867                gridColor: O,
868                stripLines: [{
869                    labelFontFamily: x,
870                    labelFontSize: z,
871                    labelFontColor: "#FF7300",
872                    labelFontWeight: "normal",
873                    labelBackgroundColor: null,
874                    color: "#FF7300",
875                    thickness: 1
876                }],
877                crosshair: {
878                    labelFontFamily: x,
879                    labelFontSize: z,
880                    labelFontColor: "#EEEEEE",
881                    labelFontWeight: "normal",
882                    labelBackgroundColor: fa,
883                    color: Y,
884                    thickness: 1,
885                    lineDashType: "dash"
886                },
887                scaleBreaks: {
888                    type: "zigzag",
889                    spacing: "2%",
890                    lineColor: "#BBBBBB",
891                    lineThickness: 1,
892                    lineDashType: "solid"
893                }
894            }],
895            axisY: [{
896                titleFontFamily: x,
897                titleFontSize: aa,
898                titleFontColor: ga,
899                titleFontWeight: "normal",
900                labelFontFamily: x,
901                labelFontSize: z,
902                labelFontColor: T,
903                labelFontWeight: "normal",
904                lineThickness: 1,
905                lineColor: O,
906                tickThickness: 1,
907                tickColor: O,
908                gridThickness: 1,
909                gridColor: O,
910                stripLines: [{
911                    labelFontFamily: x,
912                    labelFontSize: z,
913                    labelFontColor: "#FF7300",
914                    labelFontWeight: "normal",
915                    labelBackgroundColor: null,
916                    color: "#FF7300",
917                    thickness: 1
918                }],
919                crosshair: {
920                    labelFontFamily: x,
921                    labelFontSize: z,
922                    labelFontColor: "#EEEEEE",
923                    labelFontWeight: "normal",
924                    labelBackgroundColor: fa,
925                    color: Y,
926                    thickness: 1,
927                    lineDashType: "dash"
928                },
929                scaleBreaks: {
930                    type: "zigzag",
931                    spacing: "2%",
932                    lineColor: "#BBBBBB",
933                    lineThickness: 1,
934                    lineDashType: "solid"
935                }
936            }],
937            axisY2: [{
938                titleFontFamily: x,
939                titleFontSize: aa,
940                titleFontColor: ga,
941                titleFontWeight: "normal",
942                labelFontFamily: x,
943                labelFontSize: z,
944                labelFontColor: T,
945                labelFontWeight: "normal",
946                lineThickness: 1,
947                lineColor: O,
948                tickThickness: 1,
949                tickColor: O,
950                gridThickness: 1,
951                gridColor: O,
952                stripLines: [{
953                    labelFontFamily: x,
954                    labelFontSize: z,
955                    labelFontColor: "#FF7300",
956                    labelFontWeight: "normal",
957                    labelBackgroundColor: null,
958                    color: "#FF7300",
959                    thickness: 1
960                }],
961                crosshair: {
962                    labelFontFamily: x,
963                    labelFontSize: z,
964                    labelFontColor: "#EEEEEE",
965                    labelFontWeight: "normal",
966                    labelBackgroundColor: fa,
967                    color: Y,
968                    thickness: 1,
969                    lineDashType: "dash"
970                },
971                scaleBreaks: {
972                    type: "zigzag",
973                    spacing: "2%",
974                    lineColor: "#BBBBBB",
975                    lineThickness: 1,
976                    lineDashType: "solid"
977                }
978            }],
979            legend: {
980                fontFamily: x,
981                fontSize: 14,
982                fontColor: ga,
983                fontWeight: "bold",
984                verticalAlign: "bottom",
985                horizontalAlign: "center"
986            },
987            toolTip: {
988                fontFamily: x,
989                fontSize: 14,
990                fontStyle: "normal",
991                cornerRadius: 0,
992                borderThickness: 1
993            }
994        };
995    T = ga = "#F5F5F5";
996    O = "#FFFFFF";
997    Y = "#40BAF1";
998    fa = "#F5F5F5";
999    var aa = 20,
1000        z = 14,
1001        Za = {
1002            colorSet: "colorSet2",
1003            title: {
1004                fontFamily: x,
1005                fontSize: 33,
1006                fontColor: "#3A3A3A",
1007                fontWeight: "bold",
1008                verticalAlign: "top",
1009                margin: 5
1010            },
1011            subtitles: [{
1012                fontFamily: x,
1013                fontSize: z,
1014                fontColor: "#3A3A3A",
1015                fontWeight: "normal",
1016                verticalAlign: "top",
1017                margin: 5
1018            }],
1019            data: [{
1020                indexLabelFontFamily: x,
1021                indexLabelFontSize: z,
1022                indexLabelFontColor: "#666666",
1023                indexLabelFontWeight: "normal",
1024                indexLabelLineThickness: 1
1025            }],
1026            axisX: [{
1027                titleFontFamily: x,
1028                titleFontSize: aa,
1029                titleFontColor: "#666666",
1030                titleFontWeight: "normal",
1031                labelFontFamily: x,
1032                labelFontSize: z,
1033                labelFontColor: "#666666",
1034                labelFontWeight: "normal",
1035                lineThickness: 1,
1036                lineColor: "#BBBBBB",
1037                tickThickness: 1,
1038                tickColor: "#BBBBBB",
1039                gridThickness: 1,
1040                gridColor: "#BBBBBB",
1041                stripLines: [{
1042                    labelFontFamily: x,
1043                    labelFontSize: z,
1044                    labelFontColor: "#FFA500",
1045                    labelFontWeight: "normal",
1046                    labelBackgroundColor: null,
1047                    color: "#FFA500",
1048                    thickness: 1
1049                }],
1050                crosshair: {
1051                    labelFontFamily: x,
1052                    labelFontSize: z,
1053                    labelFontColor: "#EEEEEE",
1054                    labelFontWeight: "normal",
1055                    labelBackgroundColor: "black",
1056                    color: "black",
1057                    thickness: 1,
1058                    lineDashType: "dot"
1059                },
1060                scaleBreaks: {
1061                    type: "zigzag",
1062                    spacing: "2%",
1063                    lineColor: "#BBBBBB",
1064                    lineThickness: 1,
1065                    lineDashType: "solid"
1066                }
1067            }],
1068            axisX2: [{
1069                titleFontFamily: x,
1070                titleFontSize: aa,
1071                titleFontColor: "#666666",
1072                titleFontWeight: "normal",
1073                labelFontFamily: x,
1074                labelFontSize: z,
1075                labelFontColor: "#666666",
1076                labelFontWeight: "normal",
1077                lineThickness: 1,
1078                lineColor: "#BBBBBB",
1079                tickColor: "#BBBBBB",
1080                tickThickness: 1,
1081                gridThickness: 1,
1082                gridColor: "#BBBBBB",
1083                stripLines: [{
1084                    labelFontFamily: x,
1085                    labelFontSize: z,
1086                    labelFontColor: "#FFA500",
1087                    labelFontWeight: "normal",
1088                    labelBackgroundColor: null,
1089                    color: "#FFA500",
1090                    thickness: 1
1091                }],
1092                crosshair: {
1093                    labelFontFamily: x,
1094                    labelFontSize: z,
1095                    labelFontColor: "#EEEEEE",
1096                    labelFontWeight: "normal",
1097                    labelBackgroundColor: "black",
1098                    color: "black",
1099                    thickness: 1,
1100                    lineDashType: "dot"
1101                },
1102                scaleBreaks: {
1103                    type: "zigzag",
1104                    spacing: "2%",
1105                    lineColor: "#BBBBBB",
1106                    lineThickness: 1,
1107                    lineDashType: "solid"
1108                }
1109            }],
1110            axisY: [{
1111                titleFontFamily: x,
1112                titleFontSize: aa,
1113                titleFontColor: "#666666",
1114                titleFontWeight: "normal",
1115                labelFontFamily: x,
1116                labelFontSize: z,
1117                labelFontColor: "#666666",
1118                labelFontWeight: "normal",
1119                lineThickness: 0,
1120                lineColor: "#BBBBBB",
1121                tickColor: "#BBBBBB",
1122                tickThickness: 1,
1123                gridThickness: 1,
1124                gridColor: "#BBBBBB",
1125                stripLines: [{
1126                    labelFontFamily: x,
1127                    labelFontSize: z,
1128                    labelFontColor: "#FFA500",
1129                    labelFontWeight: "normal",
1130                    labelBackgroundColor: null,
1131                    color: "#FFA500",
1132                    thickness: 1
1133                }],
1134                crosshair: {
1135                    labelFontFamily: x,
1136                    labelFontSize: z,
1137                    labelFontColor: "#EEEEEE",
1138                    labelFontWeight: "normal",
1139                    labelBackgroundColor: "black",
1140                    color: "black",
1141                    thickness: 1,
1142                    lineDashType: "dot"
1143                },
1144                scaleBreaks: {
1145                    type: "zigzag",
1146                    spacing: "2%",
1147                    lineColor: "#BBBBBB",
1148                    lineThickness: 1,
1149                    lineDashType: "solid"
1150                }
1151            }],
1152            axisY2: [{
1153                titleFontFamily: x,
1154                titleFontSize: aa,
1155                titleFontColor: "#666666",
1156                titleFontWeight: "normal",
1157                labelFontFamily: x,
1158                labelFontSize: z,
1159                labelFontColor: "#666666",
1160                labelFontWeight: "normal",
1161                lineThickness: 0,
1162                lineColor: "#BBBBBB",
1163                tickColor: "#BBBBBB",
1164                tickThickness: 1,
1165                gridThickness: 1,
1166                gridColor: "#BBBBBB",
1167                stripLines: [{
1168                    labelFontFamily: x,
1169                    labelFontSize: z,
1170                    labelFontColor: "#FFA500",
1171                    labelFontWeight: "normal",
1172                    labelBackgroundColor: null,
1173                    color: "#FFA500",
1174                    thickness: 1
1175                }],
1176                crosshair: {
1177                    labelFontFamily: x,
1178                    labelFontSize: z,
1179                    labelFontColor: "#EEEEEE",
1180                    labelFontWeight: "normal",
1181                    labelBackgroundColor: "black",
1182                    color: "black",
1183                    thickness: 1,
1184                    lineDashType: "dot"
1185                },
1186                scaleBreaks: {
1187                    type: "zigzag",
1188                    spacing: "2%",
1189                    lineColor: "#BBBBBB",
1190                    lineThickness: 1,
1191                    lineDashType: "solid"
1192                }
1193            }],
1194            legend: {
1195                fontFamily: x,
1196                fontSize: 14,
1197                fontColor: "#3A3A3A",
1198                fontWeight: "bold",
1199                verticalAlign: "bottom",
1200                horizontalAlign: "center"
1201            },
1202            toolTip: {
1203                fontFamily: x,
1204                fontSize: 14,
1205                fontStyle: "normal",
1206                cornerRadius: 0,
1207                borderThickness: 1
1208            }
1209        };
1210    T = ga = "#F5F5F5";
1211    O = "#FFFFFF";
1212    Y = "#40BAF1";
1213    fa = "#F5F5F5";
1214    aa = 20;
1215    z = 14;
1216    Fa = {
1217        colorSet: "colorSet12",
1218        backgroundColor: "#2A2A2A",
1219        title: {
1220            fontFamily: Fa,
1221            fontSize: 32,
1222            fontColor: ga,
1223            fontWeight: "normal",
1224            verticalAlign: "top",
1225            margin: 5
1226        },
1227        subtitles: [{
1228            fontFamily: Fa,
1229            fontSize: z,
1230            fontColor: ga,
1231            fontWeight: "normal",
1232            verticalAlign: "top",
1233            margin: 5
1234        }],
1235        toolbar: {
1236            backgroundColor: "#666666",
1237            backgroundColorOnHover: "#FF7372",
1238            borderColor: "#FF7372",
1239            borderThickness: 1,
1240            fontColor: "#F5F5F5",
1241            fontColorOnHover: "#F5F5F5"
1242        },
1243        data: [{
1244            indexLabelFontFamily: x,
1245            indexLabelFontSize: z,
1246            indexLabelFontColor: T,
1247            indexLabelFontWeight: "normal",
1248            indexLabelLineThickness: 1
1249        }],
1250        axisX: [{
1251            titleFontFamily: x,
1252            titleFontSize: aa,
1253            titleFontColor: T,
1254            titleFontWeight: "normal",
1255            labelFontFamily: x,
1256            labelFontSize: z,
1257            labelFontColor: T,
1258            labelFontWeight: "normal",
1259            lineThickness: 1,
1260            lineColor: O,
1261            tickThickness: 1,
1262            tickColor: O,
1263            gridThickness: 0,
1264            gridColor: O,
1265            stripLines: [{
1266                labelFontFamily: x,
1267                labelFontSize: z,
1268                labelFontColor: "#FF7300",
1269                labelFontWeight: "normal",
1270                labelBackgroundColor: null,
1271                color: "#FF7300",
1272                thickness: 1
1273            }],
1274            crosshair: {
1275                labelFontFamily: x,
1276                labelFontSize: z,
1277                labelFontColor: "#000000",
1278                labelFontWeight: "normal",
1279                labelBackgroundColor: fa,
1280                color: Y,
1281                thickness: 1,
1282                lineDashType: "dash"
1283            },
1284            scaleBreaks: {
1285                type: "zigzag",
1286                spacing: "2%",
1287                lineColor: "#777777",
1288                lineThickness: 1,
1289                lineDashType: "solid",
1290                color: "#111111"
1291            }
1292        }],
1293        axisX2: [{
1294            titleFontFamily: x,
1295            titleFontSize: aa,
1296            titleFontColor: T,
1297            titleFontWeight: "normal",
1298            labelFontFamily: x,
1299            labelFontSize: z,
1300            labelFontColor: T,
1301            labelFontWeight: "normal",
1302            lineThickness: 1,
1303            lineColor: O,
1304            tickThickness: 1,
1305            tickColor: O,
1306            gridThickness: 0,
1307            gridColor: O,
1308            stripLines: [{
1309                labelFontFamily: x,
1310                labelFontSize: z,
1311                labelFontColor: "#FF7300",
1312                labelFontWeight: "normal",
1313                labelBackgroundColor: null,
1314                color: "#FF7300",
1315                thickness: 1
1316            }],
1317            crosshair: {
1318                labelFontFamily: x,
1319                labelFontSize: z,
1320                labelFontColor: "#000000",
1321                labelFontWeight: "normal",
1322                labelBackgroundColor: fa,
1323                color: Y,
1324                thickness: 1,
1325                lineDashType: "dash"
1326            },
1327            scaleBreaks: {
1328                type: "zigzag",
1329                spacing: "2%",
1330                lineColor: "#777777",
1331                lineThickness: 1,
1332                lineDashType: "solid",
1333                color: "#111111"
1334            }
1335        }],
1336        axisY: [{
1337            titleFontFamily: x,
1338            titleFontSize: aa,
1339            titleFontColor: T,
1340            titleFontWeight: "normal",
1341            labelFontFamily: x,
1342            labelFontSize: z,
1343            labelFontColor: T,
1344            labelFontWeight: "normal",
1345            lineThickness: 1,
1346            lineColor: O,
1347            tickThickness: 1,
1348            tickColor: O,
1349            gridThickness: 1,
1350            gridColor: O,
1351            stripLines: [{
1352                labelFontFamily: x,
1353                labelFontSize: z,
1354                labelFontColor: "#FF7300",
1355                labelFontWeight: "normal",
1356                labelBackgroundColor: null,
1357                color: "#FF7300",
1358                thickness: 1
1359            }],
1360            crosshair: {
1361                labelFontFamily: x,
1362                labelFontSize: z,
1363                labelFontColor: "#000000",
1364                labelFontWeight: "normal",
1365                labelBackgroundColor: fa,
1366                color: Y,
1367                thickness: 1,
1368                lineDashType: "dash"
1369            },
1370            scaleBreaks: {
1371                type: "zigzag",
1372                spacing: "2%",
1373                lineColor: "#777777",
1374                lineThickness: 1,
1375                lineDashType: "solid",
1376                color: "#111111"
1377            }
1378        }],
1379        axisY2: [{
1380            titleFontFamily: x,
1381            titleFontSize: aa,
1382            titleFontColor: T,
1383            titleFontWeight: "normal",
1384            labelFontFamily: x,
1385            labelFontSize: z,
1386            labelFontColor: T,
1387            labelFontWeight: "normal",
1388            lineThickness: 1,
1389            lineColor: O,
1390            tickThickness: 1,
1391            tickColor: O,
1392            gridThickness: 1,
1393            gridColor: O,
1394            stripLines: [{
1395                labelFontFamily: x,
1396                labelFontSize: z,
1397                labelFontColor: "#FF7300",
1398                labelFontWeight: "normal",
1399                labelBackgroundColor: null,
1400                color: "#FF7300",
1401                thickness: 1
1402            }],
1403            crosshair: {
1404                labelFontFamily: x,
1405                labelFontSize: z,
1406                labelFontColor: "#000000",
1407                labelFontWeight: "normal",
1408                labelBackgroundColor: fa,
1409                color: Y,
1410                thickness: 1,
1411                lineDashType: "dash"
1412            },
1413            scaleBreaks: {
1414                type: "zigzag",
1415                spacing: "2%",
1416                lineColor: "#777777",
1417                lineThickness: 1,
1418                lineDashType: "solid",
1419                color: "#111111"
1420            }
1421        }],
1422        legend: {
1423            fontFamily: x,
1424            fontSize: 14,
1425            fontColor: ga,
1426            fontWeight: "bold",
1427            verticalAlign: "bottom",
1428            horizontalAlign: "center"
1429        },
1430        toolTip: {
1431            fontFamily: x,
1432            fontSize: 14,
1433            fontStyle: "normal",
1434            cornerRadius: 0,
1435            borderThickness: 1,
1436            fontColor: T,
1437            backgroundColor: "rgba(0, 0, 0, .7)"
1438        }
1439    };
1440    O = "#FFFFFF";
1441    T = ga = "#FAFAFA";
1442    Y = "#40BAF1";
1443    fa = "#F5F5F5";
1444    var aa = 20,
1445        z = 14,
1446        ya = {
1447            light1: Sa,
1448            light2: Za,
1449            dark1: Fa,
1450            dark2: {
1451                colorSet: "colorSet2",
1452                backgroundColor: "#32373A",
1453                title: {
1454                    fontFamily: x,
1455                    fontSize: 32,
1456                    fontColor: ga,
1457                    fontWeight: "normal",
1458                    verticalAlign: "top",
1459                    margin: 5
1460                },
1461                subtitles: [{
1462                    fontFamily: x,
1463                    fontSize: z,
1464                    fontColor: ga,
1465                    fontWeight: "normal",
1466                    verticalAlign: "top",
1467                    margin: 5
1468                }],
1469                toolbar: {
1470                    backgroundColor: "#666666",
1471                    backgroundColorOnHover: "#FF7372",
1472                    borderColor: "#FF7372",
1473                    borderThickness: 1,
1474                    fontColor: "#F5F5F5",
1475                    fontColorOnHover: "#F5F5F5"
1476                },
1477                data: [{
1478                    indexLabelFontFamily: x,
1479                    indexLabelFontSize: z,
1480                    indexLabelFontColor: T,
1481                    indexLabelFontWeight: "normal",
1482                    indexLabelLineThickness: 1
1483                }],
1484                axisX: [{
1485                    titleFontFamily: x,
1486                    titleFontSize: aa,
1487                    titleFontColor: T,
1488                    titleFontWeight: "normal",
1489                    labelFontFamily: x,
1490                    labelFontSize: z,
1491                    labelFontColor: T,
1492                    labelFontWeight: "normal",
1493                    lineThickness: 1,
1494                    lineColor: O,
1495                    tickThickness: 1,
1496                    tickColor: O,
1497                    gridThickness: 0,
1498                    gridColor: O,
1499                    stripLines: [{
1500                        labelFontFamily: x,
1501                        labelFontSize: z,
1502                        labelFontColor: "#FF7300",
1503                        labelFontWeight: "normal",
1504                        labelBackgroundColor: null,
1505                        color: "#FF7300",
1506                        thickness: 1
1507                    }],
1508                    crosshair: {
1509                        labelFontFamily: x,
1510                        labelFontSize: z,
1511                        labelFontColor: "#000000",
1512                        labelFontWeight: "normal",
1513                        labelBackgroundColor: fa,
1514                        color: Y,
1515                        thickness: 1,
1516                        lineDashType: "dash"
1517                    },
1518                    scaleBreaks: {
1519                        type: "zigzag",
1520                        spacing: "2%",
1521                        lineColor: "#777777",
1522                        lineThickness: 1,
1523                        lineDashType: "solid",
1524                        color: "#111111"
1525                    }
1526                }],
1527                axisX2: [{
1528                    titleFontFamily: x,
1529                    titleFontSize: aa,
1530                    titleFontColor: T,
1531                    titleFontWeight: "normal",
1532                    labelFontFamily: x,
1533                    labelFontSize: z,
1534                    labelFontColor: T,
1535                    labelFontWeight: "normal",
1536                    lineThickness: 1,
1537                    lineColor: O,
1538                    tickThickness: 1,
1539                    tickColor: O,
1540                    gridThickness: 0,
1541                    gridColor: O,
1542                    stripLines: [{
1543                        labelFontFamily: x,
1544                        labelFontSize: z,
1545                        labelFontColor: "#FF7300",
1546                        labelFontWeight: "normal",
1547                        labelBackgroundColor: null,
1548                        color: "#FF7300",
1549                        thickness: 1
1550                    }],
1551                    crosshair: {
1552                        labelFontFamily: x,
1553                        labelFontSize: z,
1554                        labelFontColor: "#000000",
1555                        labelFontWeight: "normal",
1556                        labelBackgroundColor: fa,
1557                        color: Y,
1558                        thickness: 1,
1559                        lineDashType: "dash"
1560                    },
1561                    scaleBreaks: {
1562                        type: "zigzag",
1563                        spacing: "2%",
1564                        lineColor: "#777777",
1565                        lineThickness: 1,
1566                        lineDashType: "solid",
1567                        color: "#111111"
1568                    }
1569                }],
1570                axisY: [{
1571                    titleFontFamily: x,
1572                    titleFontSize: aa,
1573                    titleFontColor: T,
1574                    titleFontWeight: "normal",
1575                    labelFontFamily: x,
1576                    labelFontSize: z,
1577                    labelFontColor: T,
1578                    labelFontWeight: "normal",
1579                    lineThickness: 0,
1580                    lineColor: O,
1581                    tickThickness: 1,
1582                    tickColor: O,
1583                    gridThickness: 1,
1584                    gridColor: O,
1585                    stripLines: [{
1586                        labelFontFamily: x,
1587                        labelFontSize: z,
1588                        labelFontColor: "#FF7300",
1589                        labelFontWeight: "normal",
1590                        labelBackgroundColor: null,
1591                        color: "#FF7300",
1592                        thickness: 1
1593                    }],
1594                    crosshair: {
1595                        labelFontFamily: x,
1596                        labelFontSize: z,
1597                        labelFontColor: "#000000",
1598                        labelFontWeight: "normal",
1599                        labelBackgroundColor: fa,
1600                        color: Y,
1601                        thickness: 1,
1602                        lineDashType: "dash"
1603                    },
1604                    scaleBreaks: {
1605                        type: "zigzag",
1606                        spacing: "2%",
1607                        lineColor: "#777777",
1608                        lineThickness: 1,
1609                        lineDashType: "solid",
1610                        color: "#111111"
1611                    }
1612                }],
1613                axisY2: [{
1614                    titleFontFamily: x,
1615                    titleFontSize: aa,
1616                    titleFontColor: T,
1617                    titleFontWeight: "normal",
1618                    labelFontFamily: x,
1619                    labelFontSize: z,
1620                    labelFontColor: T,
1621                    labelFontWeight: "normal",
1622                    lineThickness: 0,
1623                    lineColor: O,
1624                    tickThickness: 1,
1625                    tickColor: O,
1626                    gridThickness: 1,
1627                    gridColor: O,
1628                    stripLines: [{
1629                        labelFontFamily: x,
1630                        labelFontSize: z,
1631                        labelFontColor: "#FF7300",
1632                        labelFontWeight: "normal",
1633                        labelBackgroundColor: null,
1634                        color: "#FF7300",
1635                        thickness: 1
1636                    }],
1637                    crosshair: {
1638                        labelFontFamily: x,
1639                        labelFontSize: z,
1640                        labelFontColor: "#000000",
1641                        labelFontWeight: "normal",
1642                        labelBackgroundColor: fa,
1643                        color: Y,
1644                        thickness: 1,
1645                        lineDashType: "dash"
1646                    },
1647                    scaleBreaks: {
1648                        type: "zigzag",
1649                        spacing: "2%",
1650                        lineColor: "#777777",
1651                        lineThickness: 1,
1652                        lineDashType: "solid",
1653                        color: "#111111"
1654                    }
1655                }],
1656                legend: {
1657                    fontFamily: x,
1658                    fontSize: 14,
1659                    fontColor: ga,
1660                    fontWeight: "bold",
1661                    verticalAlign: "bottom",
1662                    horizontalAlign: "center"
1663                },
1664                toolTip: {
1665                    fontFamily: x,
1666                    fontSize: 14,
1667                    fontStyle: "normal",
1668                    cornerRadius: 0,
1669                    borderThickness: 1,
1670                    fontColor: T,
1671                    backgroundColor: "rgba(0, 0, 0, .7)"
1672                }
1673            },
1674            theme1: Sa,
1675            theme2: Za,
1676            theme3: Sa
1677        },
1678        U = {
1679            numberDuration: 1,
1680            yearDuration: 314496E5,
1681            monthDuration: 2592E6,
1682            weekDuration: 6048E5,
1683            dayDuration: 864E5,
1684            hourDuration: 36E5,
1685            minuteDuration: 6E4,
1686            secondDuration: 1E3,
1687            millisecondDuration: 1,
1688            dayOfWeekFromInt: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")
1689        };
1690    (function() {
1691        Z.fSDec = function(m) {
1692            for (var s = "", q = 0; q < m.length; q++) s += String.fromCharCode(Math.ceil(m.length / 57 / 5) ^ m.charCodeAt(q));
1693            return s
1694        };
1695        Z.obj = {
1696            trVs: "Ush`m!Wdsrhno",
1697            fntStr: "qy!B`mhcsh-!Mtbhe`!Fs`oed-!Mtbhe`!R`or!Tohbned-!@sh`m-!r`or,rdshg",
1698            txtBl: "udyuC`rdmhod",
1699            fnt: "gnou",
1700            fSy: "ghmmRuxmd",
1701            fTx: "ghmmUdyu",
1702            grClr: "fsdx",
1703            cntx: "buy",
1704            tp: "unq"
1705        };
1706        delete sa[Z.fSDec("Bi`su")][Z.fSDec("bsdehuIsdg")];
1707        Z.pro = {
1708            sCH: sa[Z.fSDec("Bi`su")][Z.fSDec("bsdehuIsdg")]
1709        };
1710        Z._fTWm = function(m) {
1711            if ("undefined" === typeof Z.pro.sCH && !Ya) try {
1712                var s = m[Z.fSDec(Z.obj.cntx)];
1713                s[Z.fSDec(Z.obj.txtBl)] = Z.fSDec(Z.obj.tp);
1714                s[Z.fSDec(Z.obj.fnt)] = 11 + Z.fSDec(Z.obj.fntStr);
1715                s[Z.fSDec(Z.obj.fSy)] = Z.fSDec(Z.obj.grClr);
1716                s[Z.fSDec(Z.obj.fTx)](Z.fSDec(Z.obj.trVs), 2, m.height - 11 - 2)
1717            } catch (q) {}
1718        }
1719    })();
1720    var Va = {},
1721        ra = null,
1722        Ba = function() {
1723            var m = /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,
1724                s = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
1725                q = "Sun Mon Tue Wed Thu Fri Sat".split(" "),
1726                v = "January February March April May June July August September October November December".split(" "),
1727                y = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
1728                x = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
1729                z = /[^-+\dA-Z]/g;
1730            return function(Q, C, P) {
1731                var G = P ? P.days : s,
1732                    O = P ? P.months : v,
1733                    R = P ? P.shortDays : q,
1734                    N = P ? P.shortMonths : y;
1735                P = "";
1736                var U = !1;
1737                Q = Q && Q.getTime ? Q : Q ? new Date(Q) : new Date;
1738                if (isNaN(Q)) throw SyntaxError("invalid date");
1739                "UTC:" === C.slice(0, 4) && (C = C.slice(4), U = !0);
1740                P = U ? "getUTC" : "get";
1741                var Z = Q[P + "Date"](),
1742                    V = Q[P + "Day"](),
1743                    X = Q[P + "Month"](),
1744                    T = Q[P + "FullYear"](),
1745                    H = Q[P + "Hours"](),
1746                    W = Q[P + "Minutes"](),
1747                    a = Q[P + "Seconds"](),
1748                    f = Q[P + "Milliseconds"](),
1749                    b = U ? 0 : Q.getTimezoneOffset();
1750                return P = C.replace(m, function(c) {
1751                    switch (c) {
1752                        case "D":
1753                            return Z;
1754                        case "DD":
1755                            return ia(Z, 2);
1756                        case "DDD":
1757                            return R[V];
1758                        case "DDDD":
1759                            return G[V];
1760                        case "M":
1761                            return X + 1;
1762                        case "MM":
1763                            return ia(X + 1, 2);
1764                        case "MMM":
1765                            return N[X];
1766                        case "MMMM":
1767                            return O[X];
1768                        case "Y":
1769                            return parseInt(String(T).slice(-2));
1770                        case "YY":
1771                            return ia(String(T).slice(-2), 2);
1772                        case "YYY":
1773                            return ia(String(T).slice(-3), 3);
1774                        case "YYYY":
1775                            return ia(T, 4);
1776                        case "h":
1777                            return H % 12 || 12;
1778                        case "hh":
1779                            return ia(H % 12 || 12, 2);
1780                        case "H":
1781                            return H;
1782                        case "HH":
1783                            return ia(H, 2);
1784                        case "m":
1785                            return W;
1786                        case "mm":
1787                            return ia(W, 2);
1788                        case "s":
1789                            return a;
1790                        case "ss":
1791                            return ia(a, 2);
1792                        case "f":
1793                            return String(f).slice(0, 1);
1794                        case "ff":
1795                            return ia(String(f).slice(0, 2), 2);
1796                        case "fff":
1797                            return ia(String(f).slice(0, 3), 3);
1798                        case "t":
1799                            return 12 > H ? "a" : "p";
1800                        case "tt":
1801                            return 12 > H ? "am" : "pm";
1802                        case "T":
1803                            return 12 > H ? "A" : "P";
1804                        case "TT":
1805                            return 12 > H ? "AM" : "PM";
1806                        case "K":
1807                            return U ? "UTC" : (String(Q).match(x) || [""]).pop().replace(z, "");
1808                        case "z":
1809                            return (0 < b ? "-" : "+") + Math.floor(Math.abs(b) / 60);
1810                        case "zz":
1811                            return (0 < b ? "-" : "+") + ia(Math.floor(Math.abs(b) / 60), 2);
1812                        case "zzz":
1813                            return (0 < b ? "-" : "+") + ia(Math.floor(Math.abs(b) / 60), 2) + ia(Math.abs(b) % 60, 2);
1814                        default:
1815                            return c.slice(1, c.length - 1)
1816                    }
1817                })
1818            }
1819        }(),
1820        W = function(m, s, q) {
1821            if (null === m) return "";
1822            if (!isFinite(m)) return m;
1823            m = Number(m);
1824            var v = 0 > m ? !0 :
1825                !1;
1826            v && (m *= -1);
1827            var y = q ? q.decimalSeparator : ".",
1828                x = q ? q.digitGroupSeparator : ",",
1829                z = "";
1830            s = String(s);
1831            var z = 1,
1832                Q = q = "",
1833                C = -1,
1834                P = [],
1835                G = [],
1836                O = 0,
1837                R = 0,
1838                U = 0,
1839                N = !1,
1840                Z = 0,
1841                Q = s.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);
1842            s = null;
1843            for (var V = 0; Q && V < Q.length; V++)
1844                if (s = Q[V], "." === s && 0 > C) C = V;
1845                else {
1846                    if ("%" === s) z *= 100;
1847                    else if ("\u2030" === s) {
1848                        z *= 1E3;
1849                        continue
1850                    } else if ("," === s[0] && "." === s[s.length - 1]) {
1851                        z /= Math.pow(1E3, s.length - 1);
1852                        C = V + s.length - 1;
1853                        continue
1854                    } else "E" !== s[0] && "e" !== s[0] || "0" !== s[s.length - 1] || (N = !0);
1855                    0 > C ? (P.push(s), "#" === s ||
1856                    "0" === s ? O++ : "," === s && U++) : (G.push(s), "#" !== s && "0" !== s || R++)
1857                }
1858            N && (s = Math.floor(m), Q = -Math.floor(Math.log(m) / Math.LN10 + 1), Z = 0 === m ? 0 : 0 === s ? -(O + Q) : String(s).length - O, z /= Math.pow(10, Z));
1859            0 > C && (C = V);
1860            z = (m * z).toFixed(R);
1861            s = z.split(".");
1862            z = (s[0] + "").split("");
1863            m = (s[1] + "").split("");
1864            z && "0" === z[0] && z.shift();
1865            for (N = Q = V = R = C = 0; 0 < P.length;)
1866                if (s = P.pop(), "#" === s || "0" === s)
1867                    if (C++, C === O) {
1868                        var X = z,
1869                            z = [];
1870                        if ("0" === s)
1871                            for (s = O - R - (X ? X.length : 0); 0 < s;) X.unshift("0"), s--;
1872                        for (; 0 < X.length;
1872) q = X.pop() + q, N++, 0 === N % Q && (V === U && 0 < X.length) &&
1873                        (q = x + q)
1874                    } else 0 < z.length ? (q = z.pop() + q, R++, N++) : "0" === s && (q = "0" + q, R++, N++), 0 === N % Q && (V === U && 0 < z.length) && (q = x + q);
1875                else "E" !== s[0] && "e" !== s[0] || "0" !== s[s.length - 1] || !/[eE][+-]*[0]+/.test(s) ? "," === s ? (V++, Q = N, N = 0, 0 < z.length && (q = x + q)) : q = 1 < s.length && ('"' === s[0] && '"' === s[s.length - 1] || "'" === s[0] && "'" === s[s.length - 1]) ? s.slice(1, s.length - 1) + q : s + q : (s = 0 > Z ? s.replace("+", "").replace("-", "") : s.replace("-", ""), q += s.replace(/[0]+/, function(m) {
1876                    return ia(Z, m.length)
1877                }));
1878            x = "";
1879            for (P = !1; 0 < G.length;) s = G.shift(), "#" === s || "0" ===
1880            s ? 0 < m.length && 0 !== Number(m.join("")) ? (x += m.shift(), P = !0) : "0" === s && (x += "0", P = !0) : 1 < s.length && ('"' === s[0] && '"' === s[s.length - 1] || "'" === s[0] && "'" === s[s.length - 1]) ? x += s.slice(1, s.length - 1) : "E" !== s[0] && "e" !== s[0] || "0" !== s[s.length - 1] || !/[eE][+-]*[0]+/.test(s) ? x += s : (s = 0 > Z ? s.replace("+", "").replace("-", "") : s.replace("-", ""), x += s.replace(/[0]+/, function(m) {
1881                return ia(Z, m.length)
1882            }));
1883            q += (P ? y : "") + x;
1884            return v ? "-" + q : q
1885        },
1886        Oa = function(m) {
1887            var s = 0,
1888                q = 0;
1889            m = m || window.event;
1890            m.offsetX || 0 === m.offsetX ? (s = m.offsetX, q = m.offsetY) :
1891                m.layerX || 0 == m.layerX ? (s = m.layerX, q = m.layerY) : (s = m.pageX - m.target.offsetLeft, q = m.pageY - m.target.offsetTop);
1892            return {
1893                x: s,
1894                y: q
1895            }
1896        },
1897        Xa = !0,
1898        Qa = window.devicePixelRatio || 1,
1899        La = 1,
1900        ha = Xa ? Qa / La : 1,
1901        ka = function(m) {
1902            for (var s = "", q = 0; q < m.length; q++) s += String.fromCharCode(Math.ceil(m.length / 57 / 5) ^ m.charCodeAt(q));
1903            return s
1904        },
1905        Ya = window && window[ka("mnb`uhno")] && window[ka("mnb`uhno")].href && window[ka("mnb`uhno")].href.indexOf && (-1 !== window[ka("mnb`uhno")].href.indexOf(ka("b`ow`rkr/bnl")) || -1 !== window[ka("mnb`uhno")].href.indexOf(ka("gdonqhy/bnl")) ||
1906            -1 !== window[ka("mnb`uhno")].href.indexOf(ka("gheemd"))),
1907        db = {
1908            reset: {
1909                image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAeCAYAAABJ/8wUAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAPjSURBVFhHxVdJaFNRFP1J/jwkP5MxsbaC1WJEglSxOFAXIsFpVRE3ggi1K90obioRRBA33XXnQnciirhQcMCdorgQxBkXWlREkFKsWkv5npvckp/XnzRpKh64kLw733fffe9L/wrL0+mVUdO8uTSZ3MBL/we2qg4rkuSpodCELstXE46ziVkLQ6FQcGOmeSSq6wd4aV50d3drWjj8kQKZJTUc9kxFGenv79dZrDksTSTWWJp2QYtEPiErysyzdX0LsxsCQR8keX8gs6RHIk8ysdgKFg2G53mhuOPsshTlBjKaFo1g7SqLNoShKLdFXT8huQ/paLSbxatYnc2mHMM4hr18Vi8TIvCmXF3vYrW6cF23gGTOk0M1wA4RKvOmq6vLZRVJipvmSWT6tZ6CSEYkco5V50VPT4+D7RwOqi6RiSZm0fJ+vggSqkeoypdsNmuyelNwbXsbgvkWYMtzDWNvWaijoyOBqE+hVK8abcssUeXQ/YfKyi0gFYv1Ipgfoj34fYGTJLOYJA0ODirok32GLN8XhUWCwSes1hIwBg6LydJ/tEeRRapAdUp+wSAiZchtZZWWgAZ+JNpD8peYXQVK9UwUxNpzOK8pq97kURZhYTCKBwPD7h2zK+js7Myi7D8Fod+0TkMI8+EMAngLGc/WtBFWawkFHFnoj/t9KLgGmF0B3QfkxC+EarxkdhnFYlFLY06USqUwL7UMjICHfh/wOc2sCqhpxGbCkLvL7EUDbF73+6DkmVWB6zi7xUDQSLeYvWjAILvm9zEnkJhlbRcDQZcv6Kg2AipyT/Axw6wKlqVSqxDdjF8Izfod13qURdrG/nxehY+xGh+h0CSzKygGvSNQIcc097BI24jb9hax6kj2E7OrMFX1il+ICEf2NrPbhiXLl+fYl+U7zK4iYdsDcyLGf+ofFlkwcN+s10KhmpuYhhtm0hCLVIFL0MDsqNlDIqy9x2CLs1jL6OvrI7vPRbtohXG6eFmsFnHDGAp6n9AgyuVySRZrGvROxRgIfLXhzjrNYnNBUxNX/dMgRWT1mt4XLDovaApD53E9W3ilNX5M55LJHpRtIsgAvciR4WWcgK2Dvb1YqgXevmF8z2zEBTcKG39EfSKsT9EbhVUaI2FZO+oZIqImxol6j66/hcAu4sSN4vc1ZPoKeoE6RGhYL2YYA+ymOSSi0Z0wWntbtkGUWCvfSDXIxONraZ/FY90KUfNTpfC5spnNLgxoYNnR9RO4F8ofXEHOgogCQE99w+fF2Xw+b7O59rEOsyRqGEfpVoaDMQQ1CZrG46bcM6AZ0C/wPqNfHliqejyTySxh9TqQpL+xmbIlkB9SlAAAAABJRU5ErkJggg=="
1910            },
1911            pan: {
1912                image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAICSURBVEhLxZbPahNRGMUn/5MpuAiBEAIufQGfzr5E40YptBXajYzudCEuGqS+gGlrFwquDGRTutBdYfydzJ3LzeQmJGZue+Dw/Z17Mnfmu5Pof9Hr9Z61Wq0bWZMKj263O6xWq99wU9lOpzPMKgEhEcRucNOcioOK+0RzBhNvt9tPV4nmVF19+OWhVqt9xXgFXZq+8lCv119UKpUJ7iX2FmvFTKz8RH34YdBsNk8wVtjE4fGYwm8wrrDi3WBG5oKXZGRSS9hGuNFojLTe2lFz5xThWZIktayyiE2FdT3rzXBXz7krKiL8c17wAKFDjCus2AvW+YGZ9y2JF0VFRuMPfI//rsCE/C+s26s4gQu9ul7r4NteKx7H8XOC724xNNGbaNu++IrBqbOV7Tj3FgMRvc/YKOr3+3sE47wgEt/Bl/gaK5cHbNU11vYSXylfpK7XOvjuumPp4Wcoipu30Qsez2uMXYz4lfI+mOmwothY+SLiXJy7mKVpWs3Si0CoOMfeI9Od43Wic+jO+ZVv+crsm9QSNhUW9LXSeoPBYLXopthGuFQgdIxxhY+UDwlt1x5CZ1hX+NTUdt/OIvjKaDSmuOJfaIVNPKX+W18j/PLA2/kR44p5Sd8HbHngT/yTfNRWUXX14ZcL3wmX0+TLf8YO7CGT8yFE5zB3/gney25/OETRP9CtPDFe5jShAAAAAElFTkSuQmCC"
1913            },
1914            zoom: {
1915                image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALWSURBVEhLvZZLaBNRFIabyftBIgEfqCCBoCC6MYqiXYiIj4U76U4X7sUHbhQhUBfixhZEUBDB16YuFERaUaQLK7ooCOJj4UKtYEFU0EptShO/A9Ph3js3k8lo/eHnP7n3nP/M3LlzMz1hkUwmNziOcyKRSFyFt+LxeD/c2Wq1Ym7Kv0M2m11Os1OxWGycn1OwZXCGuXfwIhezkd9/jRgNT2L4ldhs1pbkX5OLJe4euVxuGQaPCa3mnUjtJx7BDuKusJTCV6jVVGHTMuYRjxma7yIOhTgFY6jNaAKew2xPKpVay9ganmkvj+M448/MfJdT5K5Gg4HJacRngPFgqVRaRNwW1B4i7yehWfsEDdz1K+A01AoxPIqGAiuwGfkOTY8+1A6u7AyiFTB2Hu0KPIrdiOnzHLWDybeImvy+Wq2mZa5bUHsD0Zpz+KxHdWQymV6kAb1ElqeORgJLvgnRdj1+R1AfzkIvSUjxVjQSarVakrueIPT8+H1F5jSUy+WXiJrUYBVWyVxU4PEU8TzhfaijUqnMIWrjaY492eWRwdKOIqrnIxnXwLLeRLwk2GQzrEMjg0avEbXxkIxr4OoOImpj2QwyFgms1koa/SZUG8s+0iGnEhNfCNXEhzIXBVz0McTzEvJ+70P9oNFtxEzei3aFYrFYxmuSUPWSv9Yi9IMm2xE1We56Mp1OV4nDwqFmBDV9gk9AEh4gZtFHNt8W4kAUCoXF5MorY9Z/kDni9nDv7hc0i2fhgLvTtX8a99PoMPPagTFPxofRzmDJ9yM+AyEmTfgGysYbQcfhDzPPJDmX0c7gDg4gs9BqFIWhm/Nct5H8gtBq1I7UfIbtvmIuoaGQcp+fdpbbSM43eEH5wrwLbXmhm/fU63VHXjcuok7hEByFY/AeHGC8L5/PL3HT5xGH1uYwfPOICGo+CBcU0vwO1BqzUqILDl/z/9VYIMfpddiAc47jDP8BsUpb13wOLRwAAAAASUVORK5CYII="
1916            },
1917            menu: {
1918                image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAeCAYAAABE4bxTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADoSURBVFhH7dc9CsJAFATgRxIIBCwCqZKATX5sbawsY2MvWOtF9AB6AU8gguAJbD2AnZ2VXQT/Ko2TYGCL2OYtYQc+BuYA+1hCtnCVwMm27SGaXpDJIAiCvCkVR05hGOZNN3HkFMdx3nQRR06+76/R1IcFLJlNQEWlmWlBTwJtKLKHynehZqnjOGM0PYWRVXk61C37p7xlZ3Hk5HneCk1dmMH811xGoKLSzDiQwIBZB4ocoPJdqNkDt2yKlueWRVGUtzy3rPwo3sWRU3nLjuLI6OO67oZM00wMw3hrmpZx0XU9syxrR0T0BeMpb9dneSR2AAAAAElFTkSuQmCC"
1919            }
1920        };
1921    X.prototype.setOptions = function(m, s) {
1922        if (sa[this._defaultsKey]) {
1923            var q = sa[this._defaultsKey],
1924                v;
1925            for (v in q) "publicProperties" !== v && q.hasOwnProperty(v) && (this[v] = m && v in m ? m[v] : s && v in s ? s[v] : q[v])
1926        }
1927    };
1928    X.prototype.get = function(m) {
1929        var s = sa[this._defaultsKey];
1930        if ("options" === m) return this.options && this.options._isPlaceholder ? null : this.options;
1931        if (s.hasOwnProperty(m) || s.publicProperties && s.publicProperties.hasOwnProperty(m)) return this[m];
1932        window.console && window.console.log('Property "' + m + "\" doesn't exist. Please check for typo.")
1933    };
1934    X.prototype.set = function(m, s, q) {
1935        q = "undefined" === typeof q ? !0 : q;
1936        var v = sa[this._defaultsKey];
1937        if ("options" === m) this.createUserOptions(s);
1938        else if (v.hasOwnProperty(m) || v.publicProperties && v.publicProperties.hasOwnProperty(m) && "readWrite" === v.publicProperties[m]) this.options._isPlaceholder && this.createUserOptions(), this.options[m] = s;
1939        else {
1940            window.console && (v.publicProperties && v.publicProperties.hasOwnProperty(m) && "readOnly" === v.publicProperties[m] ? window.console.log('Property "' + m + '" is read-only.') : window.console.log('Property "' +
1941                m + "\" doesn't exist. Please check for typo."));
1942            return
1943        }
1944        q && (this.chart || this).render()
1945    };
1946    X.prototype.addTo = function(m, s, q, v) {
1947        v = "undefined" === typeof v ? !0 : v;
1948        var y = sa[this._defaultsKey];
1949        y.hasOwnProperty(m) || y.publicProperties && y.publicProperties.hasOwnProperty(m) && "readWrite" === y.publicProperties[m] ? (this.options._isPlaceholder && this.createUserOptions(), "undefined" === typeof this.options[m] && (this.options[m] = []), m = this.options[m], q = "undefined" === typeof q || null === q ? m.length : q, m.splice(q, 0, s), v && (this.chart ||
1950        this).render()) : window.console && (y.publicProperties && y.publicProperties.hasOwnProperty(m) && "readOnly" === y.publicProperties[m] ? window.console.log('Property "' + m + '" is read-only.') : window.console.log('Property "' + m + "\" doesn't exist. Please check for typo."))
1951    };
1952    X.prototype.createUserOptions = function(m) {
1953        if ("undefined" !== typeof m || this.options._isPlaceholder)
1954            if (this.parent.options._isPlaceholder && this.parent.createUserOptions(), this.isOptionsInArray) {
1955                this.parent.options[this.optionsName] || (this.parent.options[this.optionsName] = []);
1956                var s = this.parent.options[this.optionsName],
1957                    q = s.length;
1958                this.options._isPlaceholder || (Da(s), q = s.indexOf(this.options));
1959                this.options = "undefined" === typeof m ? {} : m;
1960                s[q] = this.options
1961            } else this.options = "undefined" === typeof m ? {} : m, m = this.parent.options, this.optionsName ? s = this.optionsName : (s = this._defaultsKey) && 0 !== s.length ? (q = s.charAt(0).toLowerCase(), 1 < s.length && (q = q.concat(s.slice(1))), s = q) : s = void 0, m[s] = this.options
1962    };
1963    X.prototype.remove = function(m) {
1964        m = "undefined" === typeof m ? !0 : m;
1965        if (this.isOptionsInArray) {
1966            var s =
1967                this.parent.options[this.optionsName];
1968            Da(s);
1969            var q = s.indexOf(this.options);
1970            0 <= q && s.splice(q, 1)
1971        } else delete this.parent.options[this.optionsName];
1972        m && (this.chart || this).render()
1973    };
1974    X.prototype.updateOption = function(m) {
1975        var s = sa[this._defaultsKey],
1976            q = {},
1977            v = this[m],
1978            x = this._themeOptionsKey,
1979            z = this._index;
1980        this.theme && y(x) && y(z) ? q = y(ya[this.theme]) ? ya.light1 : ya[this.theme] : this.parent && (this.parent.themeOptions && this.parent.themeOptions[x]) && (null === z ? q = this.parent.themeOptions[x] : 0 < this.parent.themeOptions[x].length &&
1981                (q = Math.min(this.parent.themeOptions[x].length - 1, z), q = this.parent.themeOptions[x][q]));
1982        this.themeOptions = q;
1983        m in s && (v = m in this.options ? this.options[m] : q && m in q ? q[m] : s[m]);
1984        if (v === this[m]) return !1;
1985        this[m] = v;
1986        return !0
1987    };
1988    X.prototype.trackChanges = function(m) {
1989        if (!this.sessionVariables) throw "Session Variable Store not set";
1990        this.sessionVariables[m] = this.options[m]
1991    };
1992    X.prototype.isBeingTracked = function(m) {
1993        this.options._oldOptions || (this.options._oldOptions = {});
1994        return this.options._oldOptions[m] ? !0 : !1
1995    };
1996    X.prototype.hasOptionChanged =
1997        function(m) {
1998            if (!this.sessionVariables) throw "Session Variable Store not set";
1999            return this.sessionVariables[m] !== this.options[m]
2000        };
2001    X.prototype.addEventListener = function(m, s, v) {
2002        m && s && (this._eventListeners[m] = this._eventListeners[m] || [], this._eventListeners[m].push({
2003            context: v || this,
2004            eventHandler: s
2005        }))
2006    };
2007    X.prototype.removeEventListener = function(m, s) {
2008        if (m && s && this._eventListeners[m])
2009            for (var v = this._eventListeners[m], y = 0; y < v.length; y++)
2010                if (v[y].eventHandler === s) {
2011                    v[y].splice(y, 1);
2012                    break
2013                }
2014    };
2015    X.prototype.removeAllEventListeners =
2016        function() {
2017            this._eventListeners = []
2018        };
2019    X.prototype.dispatchEvent = function(m, s, v) {
2020        if (m && this._eventListeners[m]) {
2021            s = s || {};
2022            for (var y = this._eventListeners[m], x = 0; x < y.length; x++) y[x].eventHandler.call(y[x].context, s)
2023        }
2024        "function" === typeof this[m] && this[m].call(v || this.chart, s)
2025    };
2026    Ea.prototype.registerSpace = function(m, s) {
2027        "top" === m ? this._topOccupied += s.height : "bottom" === m ? this._bottomOccupied += s.height : "left" === m ? this._leftOccupied += s.width : "right" === m && (this._rightOccupied += s.width)
2028    };
2029    Ea.prototype.unRegisterSpace =
2030        function(m, s) {
2031            "top" === m ? this._topOccupied -= s.height : "bottom" === m ? this._bottomOccupied -= s.height : "left" === m ? this._leftOccupied -= s.width : "right" === m && (this._rightOccupied -= s.width)
2032        };
2033    Ea.prototype.getFreeSpace = function() {
2034        return {
2035            x1: this._x1 + this._leftOccupied,
2036            y1: this._y1 + this._topOccupied,
2037            x2: this._x2 - this._rightOccupied,
2038            y2: this._y2 - this._bottomOccupied,
2039            width: this._x2 - this._x1 - this._rightOccupied - this._leftOccupied,
2040            height: this._y2 - this._y1 - this._bottomOccupied - this._topOccupied
2041        }
2042    };
2043    Ea.prototype.reset = function() {
2044        this._rightOccupied =
2045            this._leftOccupied = this._bottomOccupied = this._topOccupied = this._padding
2046    };
2047    pa(la, X);
2048    la.prototype._initialize = function() {
2049        y(this.padding) || "object" !== typeof this.padding ? this.topPadding = this.rightPadding = this.bottomPadding = this.leftPadding = Number(this.padding) | 0 : (this.topPadding = y(this.padding.top) ? 0 : Number(this.padding.top) | 0, this.rightPadding = y(this.padding.right) ? 0 : Number(this.padding.right) | 0, this.bottomPadding = y(this.padding.bottom) ? 0 : Number(this.padding.bottom) | 0, this.leftPadding = y(this.padding.left) ?
2050            0 : Number(this.padding.left) | 0)
2051    };
2052    la.prototype.render = function(m) {
2053        if (0 !== this.fontSize) {
2054            m && this.ctx.save();
2055            var s = this.ctx.font;
2056            this.ctx.textBaseline = this.textBaseline;
2057            var v = 0;
2058            this._isDirty && this.measureText(this.ctx);
2059            this.ctx.translate(this.x, this.y + v);
2060            "middle" === this.textBaseline && (v = -this._lineHeight / 2);
2061            this.ctx.font = this._getFontString();
2062            this.ctx.rotate(Math.PI / 180 * this.angle);
2063            var y = 0,
2064                x = this.topPadding,
2065                z = null;
2066            this.ctx.roundRect || Ca(this.ctx);
2067            (0 < this.borderThickness && this.borderColor || this.backgroundColor) &&
2068            this.ctx.roundRect(0, v, this.width, this.height, this.cornerRadius, this.borderThickness, this.backgroundColor, this.borderColor);
2069            this.ctx.fillStyle = this.fontColor;
2070            for (v = 0; v < this._wrappedText.lines.length; v++) z = this._wrappedText.lines[v], "right" === this.horizontalAlign ? y = (this.width - (this.leftPadding + this.rightPadding)) / 2 - z.width / 2 + this.leftPadding : "left" === this.horizontalAlign ? y = this.leftPadding : "center" === this.horizontalAlign && (y = (this.width - (this.leftPadding + this.rightPadding)) / 2 - z.width / 2 + this.leftPadding),
2071                this.ctx.fillText(z.text, y, x), x += z.height;
2072            this.ctx.font = s;
2073            m && this.ctx.restore()
2074        }
2075    };
2076    la.prototype.setText = function(m) {
2077        this.text = m;
2078        this._isDirty = !0;
2079        this._wrappedText = null
2080    };
2081    la.prototype.measureText = function() {
2082        this._lineHeight = Ua(this.fontFamily, this.fontSize, this.fontWeight);
2083        if (null === this.maxWidth) throw "Please set maxWidth and height for TextBlock";
2084        this._wrapText(this.ctx);
2085        this._isDirty = !1;
2086        return {
2087            width: this.width,
2088            height: this.height
2089        }
2090    };
2091    la.prototype._getLineWithWidth = function(m, s, v) {
2092        m = String(m);
2093        if (!m) return {
2094            text: "",
2095            width: 0
2096        };
2097        var y = v = 0,
2098            x = m.length - 1,
2099            z = Infinity;
2100        for (this.ctx.font = this._getFontString(); y <= x;) {
2101            var z = Math.floor((y + x) / 2),
2102                G = m.substr(0, z + 1);
2103            v = this.ctx.measureText(G).width;
2104            if (v < s) y = z + 1;
2105            else if (v > s) x = z - 1;
2106            else break
2107        }
2108        v > s && 1 < G.length && (G = G.substr(0, G.length - 1), v = this.ctx.measureText(G).width);
2109        s = !0;
2110        if (G.length === m.length || " " === m[G.length]) s = !1;
2111        s && (m = G.split(" "), 1 < m.length && m.pop(), G = m.join(" "), v = this.ctx.measureText(G).width);
2112        return {
2113            text: G,
2114            width: v
2115        }
2116    };
2117    la.prototype._wrapText = function() {
2118        var m = new String(Ga(String(this.text))),
2119            v = [],
2120            q = this.ctx.font,
2121            y = 0,
2122            x = 0;
2123        this.ctx.font = this._getFontString();
2124        if (0 === this.frontSize) x = y = 0;
2125        else
2126            for (; 0 < m.length;) {
2127                var z = this.maxHeight - (this.topPadding + this.bottomPadding),
2128                    G = this._getLineWithWidth(m, this.maxWidth - (this.leftPadding + this.rightPadding), !1);
2129                G.height = this._lineHeight;
2130                v.push(G);
2131                var Q = x,
2132                    x = Math.max(x, G.width),
2133                    y = y + G.height,
2134                    m = Ga(m.slice(G.text.length, m.length));
2135                z && y > z && (G = v.pop(), y -= G.height, x = Q)
2136            }
2137        this._wrappedText = {
2138            lines: v,
2139            width: x,
2140            height: y
2141        };
2142        this.width = x + (this.leftPadding + this.rightPadding);
2143        this.height = y + (this.topPadding + this.bottomPadding);
2144        this.ctx.font = q
2145    };
2146    la.prototype._getFontString = function() {
2147        var m;
2148        m = "" + (this.fontStyle ? this.fontStyle + " " : "");
2149        m += this.fontWeight ? this.fontWeight + " " : "";
2150        m += this.fontSize ? this.fontSize + "px " : "";
2151        var s = this.fontFamily ? this.fontFamily + "" : "";
2152        !v && s && (s = s.split(",")[0], "'" !== s[0] && '"' !== s[0] && (s = "'" + s + "'"));
2153        return m += s
2154    };
2155    pa(Ra, X);
2156    pa(Ia, X);
2157    Ia.prototype.render = function() {
2158        if (this.text) {
2159            var m = this.dockInsidePlotArea ? this.chart.plotArea : this.chart,
2160                v = m.layoutManager.getFreeSpace(),
2161                q = v.x1,
2162                x = v.y1,
2163                z = 0,
2164                G = 0,
2165                R = this.chart._menuButton && this.chart.exportEnabled && "top" === this.verticalAlign ? 22 : 0,
2166                Q, C;
2167            "top" === this.verticalAlign || "bottom" === this.verticalAlign ? (null === this.maxWidth && (this.maxWidth = v.width - 4 - R * ("center" === this.horizontalAlign ? 2 : 1)), G = 0.5 * v.height - this.margin - 2, z = 0) : "center" === this.verticalAlign && ("left" === this.horizontalAlign || "right" === this.horizontalAlign ? (null === this.maxWidth && (this.maxWidth = v.height - 4), G = 0.5 * v.width - this.margin - 2) : "center" === this.horizontalAlign && (null ===
2168                    this.maxWidth && (this.maxWidth = v.width - 4), G = 0.5 * v.height - 4));
2169            var P;
2170            y(this.padding) || "number" !== typeof this.padding ? y(this.padding) || "object" !== typeof this.padding || (P = this.padding.top ? this.padding.top : this.padding.bottom ? this.padding.bottom : 0, P += this.padding.bottom ? this.padding.bottom : this.padding.top ? this.padding.top : 0, P *= 1.25) : P = 2.5 * this.padding;
2171            this.wrap || (G = Math.min(G, Math.max(1.5 * this.fontSize, this.fontSize + P)));
2172            G = new la(this.ctx, {
2173                fontSize: this.fontSize,
2174                fontFamily: this.fontFamily,
2175                fontColor: this.fontColor,
2176                fontStyle: this.fontStyle,
2177                fontWeight: this.fontWeight,
2178                horizontalAlign: this.horizontalAlign,
2179                verticalAlign: this.verticalAlign,
2180                borderColor: this.borderColor,
2181                borderThickness: this.borderThickness,
2182                backgroundColor: this.backgroundColor,
2183                maxWidth: this.maxWidth,
2184                maxHeight: G,
2185                cornerRadius: this.cornerRadius,
2186                text: this.text,
2187                padding: this.padding,
2188                textBaseline: "top"
2189            });
2190            P = G.measureText();
2191            "top" === this.verticalAlign || "bottom" === this.verticalAlign ? ("top" === this.verticalAlign ? (x = v.y1 + 2, C = "top") : "bottom" === this.verticalAlign &&
2192                (x = v.y2 - 2 - P.height, C = "bottom"), "left" === this.horizontalAlign ? q = v.x1 + 2 : "center" === this.horizontalAlign ? q = v.x1 + v.width / 2 - P.width / 2 : "right" === this.horizontalAlign && (q = v.x2 - 2 - P.width - R), Q = this.horizontalAlign, this.width = P.width, this.height = P.height) : "center" === this.verticalAlign && ("left" === this.horizontalAlign ? (q = v.x1 + 2, x = v.y2 - 2 - (this.maxWidth / 2 - P.width / 2), z = -90, C = "left", this.width = P.height, this.height = P.width) : "right" === this.horizontalAlign ? (q = v.x2 - 2, x = v.y1 + 2 + (this.maxWidth / 2 - P.width / 2), z = 90, C = "right",
2193                    this.width = P.height, this.height = P.width) : "center" === this.horizontalAlign && (x = m.y1 + (m.height / 2 - P.height / 2), q = m.x1 + (m.width / 2 - P.width / 2), C = "center", this.width = P.width, this.height = P.height), Q = "center");
2194            G.x = q;
2195            G.y = x;
2196            G.angle = z;
2197            G.horizontalAlign = Q;
2198            G.render(!0);
2199            m.layoutManager.registerSpace(C, {
2200                width: this.width + ("left" === C || "right" === C ? this.margin + 2 : 0),
2201                height: this.height + ("top" === C || "bottom" === C ? this.margin + 2 : 0)
2202            });
2203            this.bounds = {
2204                x1: q,
2205                y1: x,
2206                x2: q + this.width,
2207                y2: x + this.height
2208            };
2209            this.ctx.textBaseline = "top"
2210        }
2211    };
2212    pa(Na,
2213        X);
2214    Na.prototype.render = Ia.prototype.render;
2215    pa(Ja, X);
2216    x = {
2217        addTheme: function(m, v) {
2218            ya[m] = v
2219        },
2220        addColorSet: function(m, v) {
2221            Aa[m] = v
2222        },
2223        addCultureInfo: function(m, v) {
2224            Ka[m] = v
2225        },
2226        formatNumber: function(m, v, q) {
2227            q = q || "en";
2228            if (Ka[q]) return W(m, v || "#,##0.##", new Ja(q));
2229            throw "Unknown Culture Name";
2230        },
2231        formatDate: function(m, v, q) {
2232            q = q || "en";
2233            if (Ka[q]) return Ba(m, v || "DD MMM YYYY", new Ja(q));
2234            throw "Unknown Culture Name";
2235        }
2236    };
2237    window.CanvasJS = x;
2238    x.Chart = function() {
2239        function m(a, f) {
2240            return a.x - f.x
2241        }
2242
2243        function s(a, f, b) {
2244            if (a && f && b) {
2245                b = b + "." + f;
2246                var c =
2247                    "image/" + f;
2248                a = a.toDataURL(c);
2249                var e = !1,
2250                    g = document.createElement("a");
2251                g.download = b;
2252                g.href = a;
2253                if ("undefined" !== typeof Blob && new Blob) {
2254                    for (var h = a.replace(/^data:[a-z\/]*;base64,/, ""), h = atob(h), l = new ArrayBuffer(h.length), l = new Uint8Array(l), t = 0; t < h.length; t++) l[t] = h.charCodeAt(t);
2255                    f = new Blob([l.buffer], {
2256                        type: "image/" + f
2257                    });
2258                    try {
2259                        window.navigator.msSaveBlob(f, b), e = !0
2260                    } catch (k) {
2261                        g.dataset.downloadurl = [c, g.download, g.href].join(":"), g.href = window.URL.createObjectURL(f)
2262                    }
2263                }
2264                if (!e) try {
2265                    event = document.createEvent("MouseEvents"),
2266                        event.initMouseEvent("click", !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), g.dispatchEvent ? g.dispatchEvent(event) : g.fireEvent && g.fireEvent("onclick")
2267                } catch (r) {
2268                    f = window.open(), f.document.write("<img src='" + a + "'></img><div>Please right click on the image and save it to your device</div>"), f.document.close()
2269                }
2270            }
2271        }
2272
2273        function q(a, f) {
2274            f = f || {};
2275            this.theme = y(f.theme) || y(ya[f.theme]) ? "light1" : f.theme;
2276            q.base.constructor.call(this, "Chart", null, f, null, null);
2277            var b = this;
2278            this._containerId = a;
2279            this._objectsInitialized = !1;
2280            this.overlaidCanvasCtx =
2281                this.ctx = null;
2282            this._indexLabels = [];
2283            this._panTimerId = 0;
2284            this._lastTouchEventType = "";
2285            this._lastTouchData = null;
2286            this.isAnimating = !1;
2287            this.renderCount = 0;
2288            this.panEnabled = this.disableToolTip = this.animatedRender = !1;
2289            this._defaultCursor = "default";
2290            this.plotArea = {
2291                canvas: null,
2292                ctx: null,
2293                x1: 0,
2294                y1: 0,
2295                x2: 0,
2296                y2: 0,
2297                width: 0,
2298                height: 0
2299            };
2300            this._dataInRenderedOrder = [];
2301            if (this.container = "string" === typeof this._containerId ? document.getElementById(this._containerId) : this._containerId) {
2302                this.container.innerHTML = "";
2303                var c = 0,
2304                    e = 0,
2305                    c = this.options.width ?
2306                        this.width : 0 < this.container.clientWidth ? this.container.clientWidth : this.width,
2307                    e = this.options.height ? this.height : 0 < this.container.clientHeight ? this.container.clientHeight : this.height;
2308                this.width = c;
2309                this.height = e;
2310                this.x1 = this.y1 = 0;
2311                this.x2 = this.width;
2312                this.y2 = this.height;
2313                this._selectedColorSet = "undefined" !== typeof Aa[this.colorSet] ? Aa[this.colorSet] : Aa.colorSet1;
2314                this._canvasJSContainer = document.createElement("div");
2315                this._canvasJSContainer.setAttribute("class", "canvasjs-chart-container");
2316                this._canvasJSContainer.style.position =
2317                    "relative";
2318                this._canvasJSContainer.style.textAlign = "left";
2319                this._canvasJSContainer.style.cursor = "auto";
2320                v || (this._canvasJSContainer.style.height = "0px");
2321                this.container.appendChild(this._canvasJSContainer);
2322                this.canvas = ua(c, e);
2323                this._preRenderCanvas = ua(c, e);
2324                this.canvas.style.position = "absolute";
2325                this.canvas.getContext && (this._canvasJSContainer.appendChild(this.canvas), this.ctx = this.canvas.getContext("2d"), this.ctx.textBaseline = "top", Ca(this.ctx), this._preRenderCtx = this._preRenderCanvas.getContext("2d"),
2326                    this._preRenderCtx.textBaseline = "top", Ca(this._preRenderCtx), v ? this.plotArea.ctx = this.ctx : (this.plotArea.canvas = ua(c, e), this.plotArea.canvas.style.position = "absolute", this.plotArea.canvas.setAttribute("class", "plotAreaCanvas"), this._canvasJSContainer.appendChild(this.plotArea.canvas), this.plotArea.ctx = this.plotArea.canvas.getContext("2d")), this.overlaidCanvas = ua(c, e), this.overlaidCanvas.style.position = "absolute", this.overlaidCanvas.style.webkitTapHighlightColor = "transparent", this.overlaidCanvas.getContext &&
2327                (this._canvasJSContainer.appendChild(this.overlaidCanvas), this.overlaidCanvasCtx = this.overlaidCanvas.getContext("2d"), this.overlaidCanvasCtx.textBaseline = "top", Ca(this.overlaidCanvasCtx)), this._eventManager = new fa(this), this.windowResizeHandler = N(window, "resize", function() {
2328                    b._updateSize() && b.render()
2329                }), this._toolBar = document.createElement("div"), this._toolBar.setAttribute("class", "canvasjs-chart-toolbar"), this._toolBar.style.cssText = "position: absolute; right: 1px; top: 1px;", this._canvasJSContainer.appendChild(this._toolBar),
2330                    this.bounds = {
2331                        x1: 0,
2332                        y1: 0,
2333                        x2: this.width,
2334                        y2: this.height
2335                    }, N(this.overlaidCanvas, "click", function(a) {
2336                    b._mouseEventHandler(a)
2337                }), N(this.overlaidCanvas, "mousemove", function(a) {
2338                    b._mouseEventHandler(a)
2339                }), N(this.overlaidCanvas, "mouseup", function(a) {
2340                    b._mouseEventHandler(a)
2341                }), N(this.overlaidCanvas, "mousedown", function(a) {
2342                    b._mouseEventHandler(a);
2343                    wa(b._dropdownMenu)
2344                }), N(this.overlaidCanvas, "mouseout", function(a) {
2345                    b._mouseEventHandler(a)
2346                }), N(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerDown" : "touchstart",
2347                    function(a) {
2348                        b._touchEventHandler(a)
2349                    }), N(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerMove" : "touchmove", function(a) {
2350                    b._touchEventHandler(a)
2351                }), N(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerUp" : "touchend", function(a) {
2352                    b._touchEventHandler(a)
2353                }), N(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerCancel" : "touchcancel", function(a) {
2354                    b._touchEventHandler(a)
2355                }), this.toolTip = new Y(this, this.options.toolTip), this.data = null, this.axisX = [], this.axisX2 = [], this.axisY = [], this.axisY2 = [], this.sessionVariables = {
2356                    axisX: [],
2357                    axisX2: [],
2358                    axisY: [],
2359                    axisY2: []
2360                })
2361            } else window.console && window.console.log('CanvasJS Error: Chart Container with i
2361d "' + this._containerId + '" was not found')
2362        }
2363
2364        function x(a, f) {
2365            for (var b = [], c, e = 0; e < a.length; e++)
2366                if (0 == e) b.push(a[0]);
2367                else {
2368                    var g, h, l;
2369                    l = e - 1;
2370                    g = 0 === l ? 0 : l - 1;
2371                    h = l === a.length - 1 ? l : l + 1;
2372                    c = Math.abs((a[h].x - a[g].x) / (0 === a[h].x - a[l].x ? 0.01 : a[h].x - a[l].x)) * (f - 1) / 2 + 1;
2373                    var t = (a[h].x - a[g].x) / c;
2374                    c = (a[h].y - a[g].y) / c;
2375                    b[b.length] = a[l].x > a[g].x && 0 < t || a[l].x < a[g].x && 0 >
2376                    t ? {
2377                        x: a[l].x + t / 3,
2378                        y: a[l].y + c / 3
2379                    } : {
2380                        x: a[l].x,
2381                        y: a[l].y + c / 9
2382                    };
2383                    l = e;
2384                    g = 0 === l ? 0 : l - 1;
2385                    h = l === a.length - 1 ? l : l + 1;
2386                    c = Math.abs((a[h].x - a[g].x) / (0 === a[l].x - a[g].x ? 0.01 : a[l].x - a[g].x)) * (f - 1) / 2 + 1;
2387                    t = (a[h].x - a[g].x) / c;
2388                    c = (a[h].y - a[g].y) / c;
2389                    b[b.length] = a[l].x > a[g].x && 0 < t || a[l].x < a[g].x && 0 > t ? {
2390                        x: a[l].x - t / 3,
2391                        y: a[l].y - c / 3
2392                    } : {
2393                        x: a[l].x,
2394                        y: a[l].y - c / 9
2395                    };
2396                    b[b.length] = a[e]
2397                }
2398            return b
2399        }
2400
2401        function z(a, f, b, c, e, g, h, l, t, k) {
2402            var r = 0;
2403            k ? (h.color = g, l.color = g) : k = 1;
2404            r = t ? Math.abs(e - b) : Math.abs(c - f);
2405            r = 0 < h.trimLength ? Math.abs(r * h.trimLength / 100) : Math.abs(r - h.length);
2406            t ? (b += r / 2, e -= r / 2) : (f += r / 2, c -= r / 2);
2407            var r = 1 === Math.round(h.thickness) % 2 ? 0.5 : 0,
2408                p = 1 === Math.round(l.thickness) % 2 ? 0.5 : 0;
2409            a.save();
2410            a.globalAlpha = k;
2411            a.strokeStyle = l.color || g;
2412            a.lineWidth = l.thickness || 2;
2413            a.setLineDash && a.setLineDash(G(l.dashType, l.thickness));
2414            a.beginPath();
2415            t && 0 < l.thickness ? (a.moveTo(c - h.thickness / 2, Math.round((b + e) / 2) - p), a.lineTo(f + h.thickness / 2, Math.round((b + e) / 2) - p)) : 0 < l.thickness && (a.moveTo(Math.round((f + c) / 2) - p, b + h.thickness / 2), a.lineTo(Math.round((f + c) / 2) - p, e - h.thickness / 2));
2416            a.stroke();
2417            a.strokeStyle =
2418                h.color || g;
2419            a.lineWidth = h.thickness || 2;
2420            a.setLineDash && a.setLineDash(G(h.dashType, h.thickness));
2421            a.beginPath();
2422            t && 0 < h.thickness ? (a.moveTo(c - r, b), a.lineTo(c - r, e), a.moveTo(f + r, b), a.lineTo(f + r, e)) : 0 < h.thickness && (a.moveTo(f, b + r), a.lineTo(c, b + r), a.moveTo(f, e - r), a.lineTo(c, e - r));
2423            a.stroke();
2424            a.restore()
2425        }
2426
2427        function O(a, f, b, c, e) {
2428            if (null === a || "undefined" === typeof a) return "undefined" === typeof b ? f : b;
2429            a = parseFloat(a.toString()) * (0 <= a.toString().indexOf("%") ? f / 100 : 1);
2430            "undefined" !== typeof c && (a = Math.min(c, a), "undefined" !==
2431            typeof e && (a = Math.max(e, a)));
2432            return !isNaN(a) && a <= f && 0 <= a ? a : "undefined" === typeof b ? f : b
2433        }
2434
2435        function T(a, f) {
2436            T.base.constructor.call(this, "Legend", "legend", f, null, a);
2437            this.chart = a;
2438            this.canvas = a.canvas;
2439            this.ctx = this.chart.ctx;
2440            this.ghostCtx = this.chart._eventManager.ghostCtx;
2441            this.items = [];
2442            this.optionsName = "legend";
2443            this.height = this.width = 0;
2444            this.orientation = null;
2445            this.dataSeries = [];
2446            this.bounds = {
2447                x1: null,
2448                y1: null,
2449                x2: null,
2450                y2: null
2451            };
2452            "undefined" === typeof this.options.fontSize && (this.fontSize = this.chart.getAutoFontSize(this.fontSize));
2453            this.lineHeight = Ua(this.fontFamily, this.fontSize, this.fontWeight);
2454            this.horizontalSpacing = this.fontSize
2455        }
2456
2457        function Q(a, f, b, c) {
2458            Q.base.constructor.call(this, "DataSeries", "data", f, b, a);
2459            this.chart = a;
2460            this.canvas = a.canvas;
2461            this._ctx = a.canvas.ctx;
2462            this.index = b;
2463            this.noDataPointsInPlotArea = 0;
2464            this.id = c;
2465            this.chart._eventManager.objectMap[c] = {
2466                id: c,
2467                objectType: "dataSeries",
2468                dataSeriesIndex: b
2469            };
2470            a = f.dataPoints ? f.dataPoints.length : 0;
2471            this.dataPointEOs = [];
2472            for (f = 0; f < a; f++) this.dataPointEOs[f] = {};
2473            this.dataPointIds = [];
2474            this.plotUnit = [];
2475            this.axisY = this.axisX = null;
2476            this.optionsName = "data";
2477            this.isOptionsInArray = !0;
2478            null === this.fillOpacity && (this.type.match(/area/i) ? this.fillOpacity = 0.7 : this.fillOpacity = 1);
2479            this.axisPlacement = this.getDefaultAxisPlacement();
2480            "undefined" === typeof this.options.indexLabelFontSize && (this.indexLabelFontSize = this.chart.getAutoFontSize(this.indexLabelFontSize))
2481        }
2482
2483        function C(a, f, b, c, e, g) {
2484            C.base.constructor.call(this, "Axis", f, b, c, a);
2485            this.chart = a;
2486            this.canvas = a.canvas;
2487            this.ctx = a.ctx;
2488            this.intervalStartPosition = this.maxHeight =
2489                this.maxWidth = 0;
2490            this.labels = [];
2491            this.dataSeries = [];
2492            this._stripLineLabels = this._ticks = this._labels = null;
2493            this.dataInfo = {
2494                min: Infinity,
2495                max: -Infinity,
2496                viewPortMin: Infinity,
2497                viewPortMax: -Infinity,
2498                minDiff: Infinity
2499            };
2500            this.isOptionsInArray = !0;
2501            "axisX" === e ? ("left" === g || "bottom" === g ? (this.optionsName = "axisX", y(this.chart.sessionVariables.axisX[c]) && (this.chart.sessionVariables.axisX[c] = {}), this.sessionVariables = this.chart.sessionVariables.axisX[c]) : (this.optionsName = "axisX2", y(this.chart.sessionVariables.axisX2[c]) &&
2502            (this.chart.sessionVariables.axisX2[c] = {}), this.sessionVariables = this.chart.sessionVariables.axisX2[c]), this.options.interval || (this.intervalType = null)) : "left" === g || "bottom" === g ? (this.optionsName = "axisY", y(this.chart.sessionVariables.axisY[c]) && (this.chart.sessionVariables.axisY[c] = {}), this.sessionVariables = this.chart.sessionVariables.axisY[c]) : (this.optionsName = "axisY2", y(this.chart.sessionVariables.axisY2[c]) && (this.chart.sessionVariables.axisY2[c] = {}), this.sessionVariables = this.chart.sessionVariables.axisY2[c]);
2503            "undefined" === typeof this.options.titleFontSize && (this.titleFontSize = this.chart.getAutoFontSize(this.titleFontSize));
2504            "undefined" === typeof this.options.labelFontSize && (this.labelFontSize = this.chart.getAutoFontSize(this.labelFontSize));
2505            this.type = e;
2506            "axisX" !== e || b && "undefined" !== typeof b.gridThickness || (this.gridThickness = 0);
2507            this._position = g;
2508            this.lineCoordinates = {
2509                x1: null,
2510                y1: null,
2511                x2: null,
2512                y2: null,
2513                width: null
2514            };
2515            this.labelAngle = (this.labelAngle % 360 + 360) % 360;
2516            90 < this.labelAngle && 270 > this.labelAngle ? this.labelAngle -=
2517                180 : 270 <= this.labelAngle && 360 >= this.labelAngle && (this.labelAngle -= 360);
2518            this.options.scaleBreaks && (this.scaleBreaks = new P(this.chart, this.options.scaleBreaks, ++this.chart._eventManager.lastObjectId, this));
2519            this.stripLines = [];
2520            if (this.options.stripLines && 0 < this.options.stripLines.length)
2521                for (a = 0; a < this.options.stripLines.length; a++) this.stripLines.push(new ga(this.chart, this.options.stripLines[a], a, ++this.chart._eventManager.lastObjectId, this));
2522            this.options.crosshair && (this.crosshair = new ia(this.chart,
2523                this.options.crosshair, this));
2524            this._titleTextBlock = null;
2525            this.hasOptionChanged("viewportMinimum") && null === this.viewportMinimum && (this.options.viewportMinimum = void 0, this.sessionVariables.viewportMinimum = null);
2526            this.hasOptionChanged("viewportMinimum") || isNaN(this.sessionVariables.newViewportMinimum) || null === this.sessionVariables.newViewportMinimum ? this.sessionVariables.newViewportMinimum = null : this.viewportMinimum = this.sessionVariables.newViewportMinimum;
2527            this.hasOptionChanged("viewportMaximum") && null ===
2528            this.viewportMaximum && (this.options.viewportMaximum = void 0, this.sessionVariables.viewportMaximum = null);
2529            this.hasOptionChanged("viewportMaximum") || isNaN(this.sessionVariables.newViewportMaximum) || null === this.sessionVariables.newViewportMaximum ? this.sessionVariables.newViewportMaximum = null : this.viewportMaximum = this.sessionVariables.newViewportMaximum;
2530            null !== this.minimum && null !== this.viewportMinimum && (this.viewportMinimum = Math.max(this.viewportMinimum, this.minimum));
2531            null !== this.maximum && null !== this.viewportMaximum &&
2532            (this.viewportMaximum = Math.min(this.viewportMaximum, this.maximum));
2533            this.trackChanges("viewportMinimum");
2534            this.trackChanges("viewportMaximum")
2535        }
2536
2537        function P(a, f, b, c) {
2538            P.base.constructor.call(this, "ScaleBreaks", "scaleBreaks", f, null, c);
2539            this.id = b;
2540            this.chart = a;
2541            this.ctx = this.chart.ctx;
2542            this.axis = c;
2543            this.optionsName = "scaleBreaks";
2544            this.isOptionsInArray = !1;
2545            this._appliedBreaks = [];
2546            this.customBreaks = [];
2547            this.autoBreaks = [];
2548            "string" === typeof this.spacing ? (this.spacing = parseFloat(this.spacing), this.spacing = isNaN(this.spacing) ?
2549                8 : (10 < this.spacing ? 10 : this.spacing) + "%") : "number" !== typeof this.spacing && (this.spacing = 8);
2550            this.autoCalculate && (this.maxNumberOfAutoBreaks = Math.min(this.maxNumberOfAutoBreaks, 5));
2551            if (this.options.customBreaks && 0 < this.options.customBreaks.length) {
2552                for (a = 0; a < this.options.customBreaks.length; a++) this.customBreaks.push(new aa(this.chart, "customBreaks", this.options.customBreaks[a], a, ++this.chart._eventManager.lastObjectId, this)), "number" === typeof this.customBreaks[a].startValue && ("number" === typeof this.customBreaks[a].endValue &&
2553                this.customBreaks[a].endValue !== this.customBreaks[a].startValue) && this._appliedBreaks.push(this.customBreaks[a]);
2554                this._appliedBreaks.sort(function(a, c) {
2555                    return a.startValue - c.startValue
2556                });
2557                for (a = 0; a < this._appliedBreaks.length - 1; a++) this._appliedBreaks[a].endValue >= this._appliedBreaks[a + 1].startValue && (this._appliedBreaks[a].endValue = Math.max(this._appliedBreaks[a].endValue, this._appliedBreaks[a + 1].endValue), window.console && window.console.log("CanvasJS Error: Breaks " + a + " and " + (a + 1) + " are overlapping."),
2558                    this._appliedBreaks.splice(a, 2), a--)
2559            }
2560        }
2561
2562        function aa(a, f, b, c, e, g) {
2563            aa.base.constructor.call(this, "Break", f, b, c, g);
2564            this.id = e;
2565            this.chart = a;
2566            this.ctx = this.chart.ctx;
2567            this.scaleBreaks = g;
2568            this.optionsName = f;
2569            this.isOptionsInArray = !0;
2570            this.type = b.type ? this.type : g.type;
2571            this.fillOpacity = y(b.fillOpacity) ? g.fillOpacity : this.fillOpacity;
2572            this.lineThickness = y(b.lineThickness) ? g.lineThickness : this.lineThickness;
2573            this.color = b.color ? this.color : g.color;
2574            this.lineColor = b.lineColor ? this.lineColor : g.lineColor;
2575            this.lineDashType =
2576                b.lineDashType ? this.lineDashType : g.lineDashType;
2577            !y(this.startValue) && this.startValue.getTime && (this.startValue = this.startValue.getTime());
2578            !y(this.endValue) && this.endValue.getTime && (this.endValue = this.endValue.getTime());
2579            "number" === typeof this.startValue && ("number" === typeof this.endValue && this.endValue < this.startValue) && (a = this.startValue, this.startValue = this.endValue, this.endValue = a);
2580            this.spacing = "undefined" === typeof b.spacing ? g.spacing : b.spacing;
2581            "string" === typeof this.options.spacing ? (this.spacing =
2582                parseFloat(this.spacing), this.spacing = isNaN(this.spacing) ? 0 : (10 < this.spacing ? 10 : this.spacing) + "%") : "number" !== typeof this.options.spacing && (this.spacing = g.spacing);
2583            this.size = g.parent.logarithmic ? 1 : 0
2584        }
2585
2586        function ga(a, f, b, c, e) {
2587            ga.base.constructor.call(this, "StripLine", "stripLines", f, b, e);
2588            this.id = c;
2589            this.chart = a;
2590            this.ctx = this.chart.ctx;
2591            this.label = this.label;
2592            this.axis = e;
2593            this.optionsName = "stripLines";
2594            this.isOptionsInArray = !0;
2595            this._thicknessType = "pixel";
2596            null !== this.startValue && null !== this.endValue && (this.value =
2597                e.logarithmic ? Math.sqrt((this.startValue.getTime ? this.startValue.getTime() : this.startValue) * (this.endValue.getTime ? this.endValue.getTime() : this.endValue)) : ((this.startValue.getTime ? this.startValue.getTime() : this.startValue) + (this.endValue.getTime ? this.endValue.getTime() : this.endValue)) / 2, this._thicknessType = null)
2598        }
2599
2600        function ia(a, f, b) {
2601            ia.base.constructor.call(this, "Crosshair", "crosshair", f, null, b);
2602            this.chart = a;
2603            this.ctx = this.chart.ctx;
2604            this.axis = b;
2605            this.optionsName = "crosshair";
2606            this._thicknessType = "pixel"
2607        }
2608
2609        function Y(a, f) {
2610            Y.base.constructor.call(this, "ToolTip", "toolTip", f, null, a);
2611            this.chart = a;
2612            this.canvas = a.canvas;
2613            this.ctx = this.chart.ctx;
2614            this.currentDataPointIndex = this.currentSeriesIndex = -1;
2615            this._timerId = 0;
2616            this._prevY = this._prevX = NaN;
2617            this.containerTransitionDuration = 0.1;
2618            this.mozContainerTransition = this.getContainerTransition(this.containerTransitionDuration);
2619            this.optionsName = "toolTip";
2620            this._initialize()
2621        }
2622
2623        function fa(a) {
2624            this.chart = a;
2625            this.lastObjectId = 0;
2626            this.objectMap = [];
2627            this.rectangularRegionEventSubscriptions = [];
2628            this.previousDataPointEventObject = null;
2629            this.ghostCanvas = ua(this.chart.width, this.chart.height);
2630            this.ghostCtx = this.ghostCanvas.getContext("2d");
2631            this.mouseoveredObjectMaps = []
2632        }
2633
2634        function ka(a) {
2635            this.chart = a;
2636            this.ctx = this.chart.plotArea.ctx;
2637            this.animations = [];
2638            this.animationRequestId = null
2639        }
2640        pa(q, X);
2641        q.prototype.destroy = function() {
2642            var a = window,
2643                f = this.windowResizeHandler;
2644            a.removeEventListener ? a.removeEventListener("resize", f) : a.detachEvent && a.detachEvent("onresize", f)
2645        };
2646        q.prototype._updateOptions = function() {
2647            var a =
2648                this;
2649            this.updateOption("width");
2650            this.updateOption("height");
2651            this.updateOption("dataPointWidth");
2652            this.updateOption("dataPointMinWidth");
2653            this.updateOption("dataPointMaxWidth");
2654            this.updateOption("interactivityEnabled");
2655            this.updateOption("theme");
2656            this.updateOption("colorSet") && (this._selectedColorSet = "undefined" !== typeof Aa[this.colorSet] ? Aa[this.colorSet] : Aa.colorSet1);
2657            this.updateOption("backgroundColor");
2658            this.backgroundColor || (this.backgroundColor = "rgba(0,0,0,0)");
2659            this.updateOption("culture");
2660            this._cultureInfo =
2661                new Ja(this.options.culture);
2662            this.updateOption("animationEnabled");
2663            this.animationEnabled = this.animationEnabled && v;
2664            this.updateOption("animationDuration");
2665            this.updateOption("rangeChanging");
2666            this.updateOption("rangeChanged");
2667            this.updateOption("exportEnabled");
2668            this.updateOption("exportFileName");
2669            this.updateOption("zoomType");
2670            if (this.options.zoomEnabled) {
2671                if (!this._zoomButton) {
2672                    var f = !1;
2673                    wa(this._zoomButton = document.createElement("button"));
2674                    va(this, this._zoomButton, "pan");
2675                    this._toolBar.appendChild(this._zoomButton);
2676                    this._zoomButton.style.borderRight = this.toolbar.borderThickness + "px solid " + this.toolbar.borderColor;
2677                    N(this._zoomButton, "touchstart", function(a) {
2678                        f = !0
2679                    });
2680                    N(this._zoomButton, "click", function() {
2681                        a.zoomEnabled ? (a.zoomEnabled = !1, a.panEnabled = !0, va(a, a._zoomButton, "zoom")) : (a.zoomEnabled = !0, a.panEnabled = !1, va(a, a._zoomButton, "pan"));
2682                        a.render()
2683                    });
2684                    N(this._zoomButton, "mouseover", function() {
2685                        f ? f = !1 : (qa(a, a._zoomButton, {
2686                            backgroundColor: a.toolbar.backgroundColorOnHover,
2687                            color: a.toolbar.fontColorOnHover,
2688                            transition: "0.4s",
2689                            WebkitTransition: "0.4s"
2690                        }), 0 >
2690= navigator.userAgent.search("MSIE") && qa(a, a._zoomButton.childNodes[0], {
2691                            WebkitFilter: "invert(100%)",
2692                            filter: "invert(100%)"
2693                        }))
2694                    });
2695                    N(this._zoomButton, "mouseout", function() {
2696                        f || (qa(a, a._zoomButton, {
2697                            backgroundColor: a.toolbar.backgroundColor,
2698                            color: a.toolbar.fontColor,
2699                            transition: "0.4s",
2700                            WebkitTransition: "0.4s"
2701                        }), 0 >= navigator.userAgent.search("MSIE") && qa(a, a._zoomButton.childNodes[0], {
2702                            WebkitFilter: "invert(0%)",
2703                            filter: "invert(0%)"
2704                        }))
2705                    })
2706                }
2707                this._resetButton || (f = !1, wa(this._resetButton =
2708                    document.createElement("button")), va(this, this._resetButton, "reset"), this._resetButton.style.borderRight = (this.exportEnabled ? this.toolbar.borderThickness : 0) + "px solid " + this.toolbar.borderColor, this._toolBar.appendChild(this._resetButton), N(this._resetButton, "touchstart", function(a) {
2709                    f = !0
2710                }), N(this._resetButton, "click", function() {
2711                    a.toolTip.hide();
2712                    a.zoomEnabled || a.panEnabled ? (a.zoomEnabled = !0, a.panEnabled = !1, va(a, a._zoomButton, "pan"), a._defaultCursor = "default", a.overlaidCanvas.style.cursor = a._defaultCursor) :
2713                        (a.zoomEnabled = !1, a.panEnabled = !1);
2714                    if (a.sessionVariables.axisX)
2715                        for (var c = 0; c < a.sessionVariables.axisX.length; c++) a.sessionVariables.axisX[c].newViewportMinimum = null, a.sessionVariables.axisX[c].newViewportMaximum = null;
2716                    if (a.sessionVariables.axisX2)
2717                        for (c = 0; c < a.sessionVariables.axisX2.length; c++) a.sessionVariables.axisX2[c].newViewportMinimum = null, a.sessionVariables.axisX2[c].newViewportMaximum = null;
2718                    if (a.sessionVariables.axisY)
2719                        for (c = 0; c < a.sessionVariables.axisY.length; c++) a.sessionVariables.axisY[c].newViewportMinimum =
2720                            null, a.sessionVariables.axisY[c].newViewportMaximum = null;
2721                    if (a.sessionVariables.axisY2)
2722                        for (c = 0; c < a.sessionVariables.axisY2.length; c++) a.sessionVariables.axisY2[c].newViewportMinimum = null, a.sessionVariables.axisY2[c].newViewportMaximum = null;
2723                    a.resetOverlayedCanvas();
2724                    wa(a._zoomButton, a._resetButton);
2725                    a._dispatchRangeEvent("rangeChanging", "reset");
2726                    a.render();
2727                    a._dispatchRangeEvent("rangeChanged", "reset")
2728                }), N(this._resetButton, "mouseover", function() {
2729                    f || (qa(a, a._resetButton, {
2730                        backgroundColor: a.toolbar.backgroundColorOnHover,
2731                        color: a.toolbar.hoverFfontColorOnHoverontColor,
2732                        transition: "0.4s",
2733                        WebkitTransition: "0.4s"
2734                    }), 0 >
2734= navigator.userAgent.search("MSIE") && qa(a, a._resetButton.childNodes[0], {
2735                        WebkitFilter: "invert(100%)",
2736                        filter: "invert(100%)"
2737                    }))
2738                }), N(this._resetButton, "mouseout", function() {
2739                    f || (qa(a, a._resetButton, {
2740                        backgroundColor: a.toolbar.backgroundColor,
2741                        color: a.toolbar.fontColor,
2742                        transition: "0.4s",
2743                        WebkitTransition: "0.4s"
2744                    }), 0 >= navigator.userAgent.search("MSIE") && qa(a, a._resetButton.childNodes[0], {
2745                        WebkitFilter: "invert(0%)",
2746                        filter: "invert(0%)"
2747                    }))
2748                }),
2749                    this.overlaidCanvas.style.cursor = a._defaultCursor);
2750                this.zoomEnabled || this.panEnabled || (this._zoomButton ? (a._zoomButton.getAttribute("state") === a._cultureInfo.zoomText ? (this.panEnabled = !0, this.zoomEnabled = !1) : (this.zoomEnabled = !0, this.panEnabled = !1), Ma(a._zoomButton, a._resetButton)) : (this.zoomEnabled = !0, this.panEnabled = !1))
2751            } else this.panEnabled = this.zoomEnabled = !1;
2752            this._menuButton ? this.exportEnabled ? Ma(this._menuButton) : wa(this._menuButton) : this.exportEnabled && v && (f = !1, this._menuButton = document.createElement("button"),
2753                    va(this, this._menuButton, "menu"), this._toolBar.appendChild(this._menuButton), N(this._menuButton, "touchstart", function(a) {
2754                    f = !0
2755                }), N(this._menuButton, "click", function() {
2756                    "none" !== a._dropdownMenu.style.display || a._dropDownCloseTime && 500 >= (new Date).getTime() - a._dropDownCloseTime.getTime() || (a._dropdownMenu.style.display = "block", a._menuButton.blur(), a._dropdownMenu.focus())
2757                }, !0), N(this._menuButton, "mouseover", function() {
2758                    f || (qa(a, a._menuButton, {
2759                        backgroundColor: a.toolbar.backgroundColorOnHover,
2760                        color: a.toolbar.fontColorOnHover
2761                    }),
2762                    0 >
2762= navigator.userAgent.search("MSIE") && qa(a, a._menuButton.childNodes[0], {
2763                        WebkitFilter: "invert(100%)",
2764                        filter: "invert(100%)"
2765                    }))
2766                }, !0), N(this._menuButton, "mouseout", function() {
2767                    f || (qa(a, a._menuButton, {
2768                        backgroundColor: a.toolbar.backgroundColor,
2769                        color: a.toolbar.fontColor
2770                    }), 0 >= navigator.userAgent.search("MSIE") && qa(a, a._menuButton.childNodes[0], {
2771                        WebkitFilter: "invert(0%)",
2772                        filter: "invert(0%)"
2773                    }))
2774                }, !0));
2775            if (!this._dropdownMenu && this.exportEnabled && v) {
2776                f = !1;
2777                this._dropdownMenu = document.createElement("div");
2778                this._dropdownMenu.setAttribute("tabindex", -1);
2779                var b = -1 !== this.theme.indexOf("dark") ? "black" : "#888888";
2780                this._dropdownMenu.style.cssText = "position: absolute; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer;right: 0px;top: 25px;min-width: 120px;outline: 0;font-size: 14px; font-family: Arial, Helvetica, sans-serif;padding: 5px 0px 5px 0px;text-align: left;line-height: 10px;background-color:" + this.toolbar.backgroundColor + ";box-shadow: 2px 2px 10px " + b;
2781                a._dropdownMenu.style.display = "none";
2782                this._toolBar.appendChild(this._dropdownMenu);
2783                N(this._dropdownMenu, "blur", function() {
2784                    wa(a._dropdownMenu);
2785                    a._dropDownCloseTime = new Date
2786                }, !0);
2787                b = document.createElement("div");
2788                b.style.cssText = "padding: 12px 8px 12px 8px";
2789                b.innerHTML = this._cultureInfo.printText;
2790                b.style.backgroundColor = this.toolbar.backgroundColor;
2791                b.style.color = this.toolbar.fontColor;
2792                this._dropdownMenu.appendChild(b);
2793                N(b, "touchstart", function(a) {
2794                    f = !0
2795                });
2796                N(b, "mouseover", function() {
2797                    f || (this.style.backgroundColor = a.toolbar.backgroundColorOnHover,
2798                        this.style.color = a.toolbar.fontColorOnHover)
2799                }, !0);
2800                N(b, "mouseout", function() {
2801                    f || (this.style.backgroundColor = a.toolbar.backgroundColor, this.style.color = a.toolbar.fontColor)
2802                }, !0);
2803                N(b, "click", function() {
2804                    a.print();
2805                    wa(a._dropdownMenu)
2806                }, !0);
2807                b = document.createElement("div");
2808                b.style.cssText = "padding: 12px 8px 12px 8px";
2809                b.innerHTML = this._cultureInfo.saveJPGText;
2810                b.style.backgroundColor = this.toolbar.backgroundColor;
2811                b.style.color = this.toolbar.fontColor;
2812                this._dropdownMenu.appendChild(b);
2813                N(b, "touchstart", function(a) {
2814                    f = !0
2815                });
2816                N(b, "mouseover", function() {
2817                    f || (this.style.backgroundColor = a.toolbar.backgroundColorOnHover, this.style.color = a.toolbar.fontColorOnHover)
2818                }, !0);
2819                N(b, "mouseout", function() {
2820                    f || (this.style.backgroundColor = a.toolbar.backgroundColor, this.style.color = a.toolbar.fontColor)
2821                }, !0);
2822                N(b, "click", function() {
2823                    s(a.canvas, "jpeg", a.exportFileName);
2824                    wa(a._dropdownMenu)
2825                }, !0);
2826                b = document.createElement("div");
2827                b.style.cssText = "padding: 12px 8px 12px 8px";
2828                b.innerHTML = this._cultureInfo.savePNGText;
2829                b.style.backgroundColor = this.toolbar.backgroundColor;
2830                b.style.color = this.toolbar.fontColor;
2831                this._dropdownMenu.appendChild(b);
2832                N(b, "touchstart", function(a) {
2833                    f = !0
2834                });
2835                N(b, "mouseover", function() {
2836                    f || (this.style.backgroundColor = a.toolbar.backgroundColorOnHover, this.style.color = a.toolbar.fontColorOnHover)
2837                }, !0);
2838                N(b, "mouseout", function() {
2839                    f || (this.style.backgroundColor = a.toolbar.backgroundColor, this.style.color = a.toolbar.fontColor)
2840                }, !0);
2841                N(b, "click", function() {
2842                    s(a.canvas, "png", a.exportFileName);
2843                    wa(a._dropdownMenu)
2844                }, !0)
2845            }
2846            "none" !== this._toolBar.style.display && this._zoomButton &&
2847            (this.panEnabled ? va(a, a._zoomButton, "zoom") : va(a, a._zoomButton, "pan"), a._resetButton.getAttribute("state") !== a._cultureInfo.resetText && va(a, a._resetButton, "reset"));
2848            this.options.toolTip && this.toolTip.options !== this.options.toolTip && (this.toolTip.options = this.options.toolTip);
2849            for (var c in this.toolTip.options) this.toolTip.options.hasOwnProperty(c) && this.toolTip.updateOption(c)
2850        };
2851        q.prototype._updateSize = function() {
2852            var a = 0,
2853                f = 0;
2854            this.options.width ? a = this.width : this.width = a = 0 < this.container.clientWidth ?
2855                this.container.clientWidth : this.width;
2856            this.options.height ? f = this.height : this.height = f = 0 < this.container.clientHeight ? this.container.clientHeight : this.height;
2857            return this.canvas.width !== a * ha || this.canvas.height !== f * ha ? (Ha(this.canvas, a, f), Ha(this._preRenderCanvas, a, f), Ha(this.overlaidCanvas, a, f), Ha(this._eventManager.ghostCanvas, a, f), this.bounds = {
2858                x1: 0,
2859                y1: 0,
2860                x2: this.width,
2861                y2: this.height
2862            }, !0) : !1
2863        };
2864        q.prototype._initialize = function() {
2865            this.toolbar = new Ra(this, this.options.toolbar);
2866            this._animator ? this._animator.cancelAllAnimations() :
2867                this._animator = new ka(this);
2868            this.removeAllEventListeners();
2869            this.disableToolTip = !1;
2870            this._axes = [];
2871            this.funnelPyramidClickHandler = this.pieDoughnutClickHandler = null;
2872            this.animationRequestId && this.cancelRequestAnimFrame.call(window, this.animationRequestId);
2873            this._updateOptions();
2874            this.animatedRender = v && this.animationEnabled && 0 === this.renderCount;
2875            this._updateSize();
2876            this.clearCanvas();
2877            this.ctx.beginPath();
2878            this.axisX = [];
2879            this.axisX2 = [];
2880            this.axisY = [];
2881            this.axisY2 = [];
2882            this._indexLabels = [];
2883            this._dataInRenderedOrder = [];
2884            this._events = [];
2885            this._eventManager && this._eventManager.reset();
2886            this.plotInfo = {
2887                axisPlacement: null,
2888                plotTypes: []
2889            };
2890            this.layoutManager = new Ea(0, 0, this.width, this.height, 2);
2891            this.plotArea.layoutManager && this.plotArea.layoutManager.reset();
2892            this.data = [];
2893            var a = 0,
2894                f = null;
2895            if (this.options.data) {
2896                for (var b = 0; b < this.options.data.length; b++)
2897                    if (a++, !this.options.data[b].type || 0 <= q._supportedChartTypes.indexOf(this.options.data[b].type)) {
2898                        var c = new Q(this, this.options.data[b], a - 1, ++this._eventManager.lastObjectId);
2899                        "error" === c.type && (c.linkedDataSeriesIndex = y(this.options.data[b].linkedDataSeriesIndex) ? b - 1 : this.options.data[b].linkedDataSeriesIndex, 0 > c.linkedDataSeriesIndex || c.linkedDataSeriesIndex >= this.options.data.length || "number" !== typeof c.linkedDataSeriesIndex || "error" === this.options.data[c.linkedDataSeriesIndex].type) && (c.linkedDataSeriesIndex = null);
2900                        null === c.name && (c.name = "DataSeries " + a);
2901                        null === c.color ? 1 < this.options.data.length ? (c._colorSet = [this._selectedColorSet[c.index % this._selectedColorSet.length]],
2902                            c.color = this._selectedColorSet[c.index % this._selectedColorSet.length]) : c._colorSet = "line" === c.type || "stepLine" === c.type || "spline" === c.type || "area" === c.type || "stepArea" === c.type || "splineArea" === c.type || "stackedArea" === c.type || "stackedArea100" === c.type || "rangeArea" === c.type || "rangeSplineArea" === c.type || "candlestick" === c.type || "ohlc" === c.type || "waterfall" === c.type || "boxAndWhisker" === c.type ? [this._selectedColorSet[0]] : this._selectedColorSet : c._colorSet = [c.color];
2903                        null === c.markerSize && (("line" === c.type ||
2904                        "stepLine" === c.type || "spline" === c.type || 0 <= c.type.toLowerCase().indexOf("area")) && c.dataPoints && c.dataPoints.length < this.width / 16 || "scatter" === c.type) && (c.markerSize = 8);
2905                        "bubble" !== c.type && "scatter" !== c.type || !c.dataPoints || (c.dataPoints.some ? c.dataPoints.some(function(a) {
2906                                return a.x
2907                            }) && c.dataPoints.sort(m) : c.dataPoints.sort(m));
2908                        this.data.push(c);
2909                        var e = c.axisPlacement,
2910                            f = f || e,
2911                            g;
2912                        "normal" === e ? "xySwapped" === this.plotInfo.axisPlacement ? g = 'You cannot combine "' + c.type + '" with bar chart' : "none" === this.plotInfo.axisPlacement ?
2913                            g = 'You cannot combine "' + c.type + '" with pie chart' : null === this.plotInfo.axisPlacement && (this.plotInfo.axisPlacement = "normal") : "xySwapped" === e ? "n
2913ormal" === this.plotInfo.axisPlacement ? g = 'You cannot combine "' + c.type + '" with line, area, column or pie chart' : "none" === this.plotInfo.axisPlacement ? g = 'You cannot combine "' + c.type + '" with pie chart' : null === this.plotInfo.axisPlacement && (this.plotInfo.axisPlacement = "xySwapped") : "none" === e ? "normal" === this.plotInfo.axisPlacement ? g = 'You cannot combine "' + c.type +
2914                            '" with line, area, column or bar chart' : "xySwapped" === this.plotInfo.axisPlacement ? g = 'You cannot combine "' + c.type + '" with bar chart' : null === this.plotInfo.axisPlacement && (this.plotInfo.axisPlacement = "none") : null === e && "none" === this.plotInfo.axisPlacement && (g = 'You cannot combine "' + c.type + '" with pie chart');
2915                        if (g && window.console) {
2916                            window.console.log(g);
2917                            return
2918                        }
2919                    }
2920                for (b = 0; b < this.data.length; b++) {
2921                    if ("none" == f && "error" === this.data[b].type && window.console) {
2922                        window.console.log('You cannot combine "' + c.type + '" with error chart');
2923                        return
2924                    }
2925                    "error" === this.data[b].type && (this.data[b].axisPlacement = this.plotInfo.axisPlacement = f || "normal", this.data[b]._linkedSeries = null === this.data[b].linkedDataSeriesIndex ? null : this.data[this.data[b].linkedDataSeriesIndex])
2926                }
2927            }
2928            this._objectsInitialized = !0
2929        };
2930        q._supportedChartTypes = Da("line stepLine spline column area stepArea splineArea bar bubble scatter stackedColumn stackedColumn100 stackedBar stackedBar100 stackedArea stackedArea100 candlestick ohlc boxAndWhisker rangeColumn error rangeBar rangeArea rangeSplineArea pie doughnut funnel pyramid waterfall".split(" "));
2931        q.prototype.render = function(a) {
2932            a && (this.options = a);
2933            this._initialize();
2934            bb(this);
2935            cb(this);
2936            var f = [];
2937            for (a = 0; a < this.data.length; a++)
2938                if ("normal" === this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) {
2939                    if (!this.data[a].axisYType || "primary" === this.data[a].axisYType)
2940                        if (this.options.axisY && 0 < this.options.axisY.length) {
2941                            if (!this.axisY.length)
2942                                for (var b = 0; b < this.options.axisY.length; b++) "normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY[b] = new C(this, "axisY", this.options.axisY[b],
2943                                    b, "axisY", "left")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY[b] = new C(this, "axisY", this.options.axisY[b], b, "axisY", "bottom"));
2944                            this.data[a].axisY = this.axisY[0 <= this.data[a].axisYIndex && this.data[a].axisYIndex < this.axisY.length ? this.data[a].axisYIndex : 0];
2945                            this.axisY[0 <= this.data[a].axisYIndex && this.data[a].axisYIndex < this.axisY.length ? this.data[a].axisYIndex : 0].dataSeries.push(this.data[a])
2946                        } else this.axisY.length || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY[0] =
2947                            new C(this, "axisY", this.options.axisY, 0, "axisY", "left")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY[0] = new C(this, "axisY", this.options.axisY, 0, "axisY", "bottom"))), this.data[a].axisY = this.axisY[0], this.axisY[0].dataSeries.push(this.data[a]);
2948                    if ("secondary" === this.data[a].axisYType)
2949                        if (this.options.axisY2 && 0 < this.options.axisY2.length) {
2950                            if (!this.axisY2.length)
2951                                for (b = 0; b < this.options.axisY2.length; b++) "normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY2[b] = new C(this,
2952                                    "axisY2", this.options.axisY2[b], b, "axisY", "right")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY2[b] = new C(this, "axisY2", this.options.axisY2[b], b, "axisY", "top"));
2953                            this.data[a].axisY = this.axisY2[0 <= this.data[a].axisYIndex && this.data[a].axisYIndex < this.axisY2.length ? this.data[a].axisYIndex : 0];
2954                            this.axisY2[0 <= this.data[a].axisYIndex && this.data[a].axisYIndex < this.axisY2.length ? this.data[a].axisYIndex : 0].dataSeries.push(this.data[a])
2955                        } else this.axisY2.length || ("normal" === this.plotInfo.axisPlacement ?
2956                            this._axes.push(this.axisY2[0] = new C(this, "axisY2", this.options.axisY2, 0, "axisY", "right")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY2[0] = new C(this, "axisY2", this.options.axisY2, 0, "axisY", "top"))), this.data[a].axisY = this.axisY2[0], this.axisY2[0].dataSeries.push(this.data[a]);
2957                    if (!this.data[a].axisXType || "primary" === this.data[a].axisXType)
2958                        if (this.options.axisX && 0 < this.options.axisX.length) {
2959                            if (!this.axisX.length)
2960                                for (b = 0; b < this.options.axisX.length; b++) "normal" === this.plotInfo.axisPlacement ?
2961                                    this._axes.push(this.axisX[b] = new C(this, "axisX", this.options.axisX[b], b, "axisX", "bottom")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX[b] = new C(this, "axisX", this.options.axisX[b], b, "axisX", "left"));
2962                            this.data[a].axisX = this.axisX[0 <= this.data[a].axisXIndex && this.data[a].axisXIndex < this.axisX.length ? this.data[a].axisXIndex : 0];
2963                            this.axisX[0 <= this.data[a].axisXIndex && this.data[a].axisXIndex < this.axisX.length ? this.data[a].axisXIndex : 0].dataSeries.push(this.data[a])
2964                        } else this.axisX.length ||
2965                        ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX[0] = new C(this, "axisX", this.options.axisX, 0, "axisX", "bottom")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX[0] = new C(this, "axisX", this.options.axisX, 0, "axisX", "left"))), this.data[a].axisX = this.axisX[0], this.axisX[0].dataSeries.push(this.data[a]);
2966                    if ("secondary" === this.data[a].axisXType)
2967                        if (this.options.axisX2 && 0 < this.options.axisX2.length) {
2968                            if (!this.axisX2.length)
2969                                for (b = 0; b < this.options.axisX2.length; b++) "normal" ===
2970                                this.plotInfo.axisPlacement ? this._axes.push(this.axisX2[b] = new C(this, "axisX2", this.options.axisX2[b], b, "axisX", "top")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX2[b] = new C(this, "axisX2", this.options.axisX2[b], b, "axisX", "right"));
2971                            this.data[a].axisX = this.axisX2[0 <= this.data[a].axisXIndex && this.data[a].axisXIndex < this.axisX2.length ? this.data[a].axisXIndex : 0];
2972                            this.axisX2[0 <= this.data[a].axisXIndex && this.data[a].axisXIndex < this.axisX2.length ? this.data[a].axisXIndex : 0].dataSeries.push(this.data[a])
2973                        } else this.axisX2.length ||
2974                        ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX2[0] = new C(this, "axisX2", this.options.axisX2, 0, "axisX", "top")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX2[0] = new C(this, "axisX2", this.options.axisX2, 0, "axisX", "right"))), this.data[a].axisX = this.axisX2[0], this.axisX2[0].dataSeries.push(this.data[a])
2975                }
2976            if (this.axisY) {
2977                for (b = 1; b < this.axisY.length; b++) "undefined" === typeof this.axisY[b].options.gridThickness && (this.axisY[b].gridThickness = 0);
2978                for (b = 0; b < this.axisY.length -
2979                1; b++) "undefined" === typeof this.axisY[b].options.margin && (this.axisY[b].margin = 10)
2980            }
2981            if (this.axisY2) {
2982                for (b = 1; b < this.axisY2.length; b++) "undefined" === typeof this.axisY2[b].options.gridThickness && (this.axisY2[b].gridThickness = 0);
2983                for (b = 0; b < this.axisY2.length - 1; b++) "undefined" === typeof this.axisY2[b].options.margin && (this.axisY2[b].margin = 10)
2984            }
2985            this.axisY && 0 < this.axisY.length && (this.axisY2 && 0 < this.axisY2.length) && (0 < this.axisY[0].gridThickness && "undefined" === typeof this.axisY2[0].options.gridThickness ? this.axisY2[0].gridThickness =
2986                0 : 0 < this.axisY2[0].gridThickness && "undefined" === typeof this.axisY[0].options.gridThickness && (this.axisY[0].gridThickness = 0));
2987            if (this.axisX)
2988                for (b = 0; b < this.axisX.length; b++) "undefined" === typeof this.axisX[b].options.gridThickness && (this.axisX[b].gridThickness = 0);
2989            if (this.axisX2)
2990                for (b = 0; b < this.axisX2.length; b++) "undefined" === typeof this.axisX2[b].options.gridThickness && (this.axisX2[b].gridThickness = 0);
2991            this.axisX && 0 < this.axisX.length && (this.axisX2 && 0 < this.axisX2.length) && (0 < this.axisX[0].gridThickness &&
2992            "undefined" === typeof this.axisX2[0].options.gridThickness ? this.axisX2[0].gridThickness = 0 : 0 < this.axisX2[0].gridThickness && "undefined" === typeof this.axisX[0].options.gridThickness && (this.axisX[0].gridThickness = 0));
2993            b = !1;
2994            if (0 < this._axes.length && (this.zoomEnabled || this.panEnabled))
2995                for (a = 0; a < this._axes.length; a++)
2996                    if (null !== this._axes[a].viewportMinimum || null !== this._axes[a].viewportMaximum) {
2997                        b = !0;
2998                        break
2999                    }
3000            b ? (Ma(this._zoomButton, this._resetButton), this._toolBar.style.border = this.toolbar.borderThickness + "px solid " +
3001                this.toolbar.borderColor, this._zoomButton.style.borderRight = this.toolbar.borderThickness + "px solid " + this.toolbar.borderColor, this._resetButton.style.borderRight = (this.exportEnabled ? this.toolbar.borderThickness : 0) + "px solid " + this.toolbar.borderColor) : (wa(this._zoomButton, this._resetButton), this._toolBar.style.border = this.toolbar.borderThickness + "px solid transparent", this.options.zoomEnabled && (this.zoomEnabled = !0, this.panEnabled = !1));
3002            this._processData();
3003            this.options.title && (this.title = new Ia(this,
3004                this.options.title), this.title.dockInsidePlotArea ? f.push(this.title) : this.title.render());
3005            if (this.options.subtitles)
3006                for (this.subtitles = [], a = 0; a < this.options.subtitles.length; a++) b = new Na(this, this.options.subtitles[a], a), this.subtitles.push(b), b.dockInsidePlotArea ? f.push(b) : b.render();
3007            this.legend = new T(this, this.options.legend);
3008            for (a = 0; a < this.data.length; a++)(this.data[a].showInLegend || "pie" === this.data[a].type || "doughnut" === this.data[a].type || "funnel" === this.data[a].type || "pyramid" === this.data[a].type) &&
3009            this.legend.dataSeries.push(this.data[a]);
3010            this.legend.dockInsidePlotArea ? f.push(this.legend) : this.legend.render();
3011            for (a = 0; a < this._axes.length; a++)
3012                if (this._axes[a].scaleBreaks && this._axes[a].scaleBreaks._appliedBreaks.length) {
3013                    v ? (this._breaksCanvas = ua(this.width, this.height, !0), this._breaksCanvasCtx = this._breaksCanvas.getContext("2d")) : (this._breaksCanvas = this.canvas, this._breaksCanvasCtx = this.ctx);
3014                    break
3015                }
3016            this._preRenderCanvas = ua(this.width, this.height);
3017            this._preRenderCtx = this._preRenderCanvas.getContext("2d");
3018            if ("normal" === this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) C.setLayoutAndRender(this.axisX, this.axisX2, this.axisY, this.axisY2, this.plotInfo.axisPlacement, this.layoutManager.getFreeSpace());
3019            else if ("none" === this.plotInfo.axisPlacement) this.preparePlotArea();
3020            else return;
3021            for (a = 0; a < f.length; a++) f[a].render();
3022            var c = [];
3023            if (this.animatedRender) {
3024                var e = ua(this.width, this.height);
3025                e.getContext("2d").drawImage(this.canvas, 0, 0, this.width, this.height)
3026            }
3027            var f = this.ctx.miterLimit,
3028                g;
3029            this.ctx.miterLimit =
3030                3;
3031            v && this._breaksCanvas && (this._preRenderCtx.drawImage(this.canvas, 0, 0, this.width, this.height), this._preRenderCtx.drawImage(this._breaksCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx.globalCompositeOperation = "source-atop", this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), this._preRenderCtx.clearRect(0, 0, this.width, this.height));
3032            for (a = 0; a < this.plotInfo.plotTypes.length; a++)
3033                for (var h = this.plotInfo.plotTypes[a], l = 0; l < h.plotUnits.length; l++) {
3034                    var t = h.plotUnits[l],
3035                        k = null;
3036                    t.targetCanvas = null;
3037                    this.animatedRender && (t.targetCanvas = ua(this.width, this.height), t.targetCanvasCtx = t.targetCanvas.getContext("2d"), g = t.targetCanvasCtx.miterLimit, t.targetCanvasCtx.miterLimit = 3);
3038                    "line" === t.type ? k = this.renderLine(t) : "stepLine" === t.type ? k = this.renderStepLine(t) : "spline" === t.type ? k = this.renderSpline(t) : "column" === t.type ? k = this.renderColumn(t) : "bar" === t.type ? k = this.renderBar(t) : "area" === t.type ? k = this.renderArea(t) : "stepArea" === t.type ? k = this.renderStepArea(t) : "splineArea" === t.type ?
3039                        k = this.renderSplineArea(t) : "stackedColumn" === t.type ? k = this.renderStackedColumn(t) : "stackedColumn100" === t.type ? k = this.renderStackedColumn100(t) : "stackedBar" === t.type ? k = this.renderStackedBar(t) : "stackedBar100" === t.type ? k = this.renderStackedBar100(t) : "stackedArea" === t.type ? k = this.renderStackedArea(t) : "stackedArea100" === t.type ? k = this.renderStackedArea100(t) : "bubble" === t.type ? k = k = this.renderBubble(t) : "scatter" === t.type ? k = this.renderScatter(t) : "pie" === t.type ? this.renderPie(t) : "doughnut" === t.type ? this.renderPie(t) :
3040                            "funnel" === t.type ? k = this.renderFunnel(t) : "pyramid" === t.type ? k = this.renderFunnel(t) : "candlestick" === t.type ? k = this.renderCandlestick(t) : "ohlc" === t.type ? k = this.renderCandlestick(t) : "rangeColumn" === t.type ? k = this.renderRangeColumn(t) : "error" === t.type ? k = this.renderError(t) : "rangeBar" === t.type ? k = this.renderRangeBar(t) : "rangeArea" === t.type ? k = this.renderRangeArea(t) : "rangeSplineArea" === t.type ? k = this.renderRangeSplineArea(t) : "waterfall" === t.type ? k = this.renderWaterfall(t) : "boxAndWhisker" === t.type && (k = this.renderBoxAndWhisker(t));
3041                    for (b = 0; b < t.dataSeriesIndexes.length; b++) this._dataInRenderedOrder.push(this.data[t.dataSeriesIndexes[b]]);
3042                    this.animatedRender && (t.targetCanvasCtx.miterLimit = g, k && c.push(k))
3043                }
3044            this.ctx.miterLimit = f;
3045            this.animatedRender && this._breaksCanvasCtx && c.push({
3046                source: this._breaksCanvasCtx,
3047                dest: this.plotArea.ctx,
3048                animationCallback: H.fadeInAnimation,
3049                easingFunction: H.easing.easeInQuad,
3050                animationBase: 0,
3051                startTimePercent: 0.7
3052            });
3053            this.animatedRender && 0 < this._indexLabels.length && (g = ua(this.width, this.height).getContext("2d"),
3054                c.push(this.renderIndexLabels(g)));
3055            var r = this;
3056            if (0 < c.length) r.disableToolTip = !0, r._animator.animate(200, r.animationDuration, function(a) {
3057                r.ctx.clearRect(0, 0, r.width, r.height);
3058                r.ctx.drawImage(e, 0, 0, Math.floor(r.width * ha), Math.floor(r.height * ha), 0, 0, r.width, r.height);
3059                for (var b = 0; b < c.length; b++) k = c[b], 1 > a && "undefined" !== typeof k.startTimePercent ? a >= k.startTimePercent && k.animationCallback(k.easingFunction(a - k.startTimePercent, 0, 1, 1 - k.startTimePercent), k) : k.animationCallback(k.easingFunction(a, 0, 1, 1), k);
3060                r.dispatchEvent("dataAnimationIterationEnd", {
3061                    chart: r
3062                })
3063            }, function() {
3064                c = [];
3065                for (var a = 0; a < r.plotInfo.plotTypes.length; a++)
3066                    for (var b = r.plotInfo.plotTypes[a], d = 0; d < b.plotUnits.length; d++) b.plotUnits[d].targetCanvas = null;
3067                e = null;
3068                r.disableToolTip = !1
3069            });
3070            else {
3071                if (r._breaksCanvas)
3072                    if (v) r.plotArea.ctx.drawImage(r._breaksCanvas, 0, 0, this.width, this.height);
3073                    else
3074                        for (b = 0; b < r._axes.length; b++) r._axes[b].createMask();
3075                0 < r._indexLabels.length && r.renderIndexLabels();
3076                r.dispatchEvent("dataAnimationIterationEnd", {
3077                    chart: r
3078                })
3079            }
3080            this.attachPlotAreaEventHandlers();
3081            this.zoomEnabled || (this.panEnabled || !this._zoomButton || "none" === this._zoomButton.style.display) || wa(this._zoomButton, this._resetButton);
3082            this.toolTip._updateToolTip();
3083            this.renderCount++;
3084            this._breaksCanvas && (delete this._breaksCanvas, delete this._breaksCanvasCtx);
3085            for (b = 0; b < this._axes.length; b++) this._axes[b].maskCanvas && (delete this._axes[b].maskCanvas, delete this._axes[b].maskCtx)
3086        };
3087        q.prototype.attachPlotAreaEventHandlers = function() {
3088            this.attachEvent({
3089                context: this,
3090                chart: this,
3091                mousedown: this._plotAreaMouseDown,
3092                mouseup: this._plotAreaMouseUp,
3093                mousemove: this._plotAreaMouseMove,
3094                cursor: this.panEnabled ? "move" : "default",
3095                capture: !0,
3096                bounds: this.plotArea
3097            })
3098        };
3099        q.prototype.categoriseDataSeries = function() {
3100            for (var a = "", f = 0; f < this.data.length; f++)
3101                if (a = this.data[f], a.dataPoints && (0 !== a.dataPoints.length && a.visible) && 0 <= q._supportedChartTypes.indexOf(a.type)) {
3102                    for (var b = null, c = !1, e = null, g = !1, h = 0; h < this.plotInfo.plotTypes.length; h++)
3103                        if (this.plotInfo.plotTypes[h].type === a.type) {
3104                            c = !0;
3105                            b = this.plotInfo.plotTypes[h];
3106                            break
3107                        }
3108                    c || (b = {
3109                        type: a.type,
3110                        totalDataSeries: 0,
3111                        plotUnits: []
3112                    }, this.plotInfo.plotTypes.push(b));
3113                    for (h = 0; h < b.plotUnits.length; h++)
3114                        if (b.plotUnits[h].axisYType === a.axisYType && b.plotUnits[h].axisXType === a.axisXType && b.plotUnits[h].axisYIndex === a.axisYIndex && b.plotUnits[h].axisXIndex === a.axisXIndex) {
3115                            g = !0;
3116                            e = b.plotUnits[h];
3117                            break
3118                        }
3119                    g || (e = {
3120                        type: a.type,
3121                        previousDataSeriesCount: 0,
3122                        index: b.plotUnits.length,
3123                        plotType: b,
3124                        axisXType: a.axisXType,
3125                        axisYType: a.axisYType,
3126                        axisYIndex: a.axisYIndex,
3127                        axisXIndex: a.axisXIndex,
3128                        axisY: "primary" === a.axisYType ? this.axisY[0 <=
3129                        a.axisYIndex && a.axisYIndex < this.axisY.length ? a.axisYIndex : 0] : this.axisY2[0 <= a.axisYIndex && a.axisYIndex < this.axisY2.length ? a.axisYIndex : 0],
3130                        axisX: "primary" === a.axisXType ? this.axisX[0 <= a.axisXIndex && a.axisXIndex < this.axisX.length ? a.axisXIndex : 0] : this.axisX2[0 <= a.axisXIndex && a.axisXIndex < this.axisX2.length ? a.axisXIndex : 0],
3131                        dataSeriesIndexes: [],
3132                        yTotals: []
3133                    }, b.plotUnits.push(e));
3134                    b.totalDataSeries++;
3135                    e.dataSeriesIndexes.push(f);
3136                    a.plotUnit = e
3137                }
3138            for (f = 0; f < this.plotInfo.plotTypes.length; f++)
3139                for (b = this.plotInfo.plotTypes[f],
3140                         h = a = 0; h < b.plotUnits.length; h++) b.plotUnits[h].previousDataSeriesCount = a, a += b.plotUnits[h].dataSeriesIndexes.length
3141        };
3142        q.prototype.assignIdToDataPoints = function() {
3143            for (var a = 0; a < this.data.length; a++) {
3144                var f = this.data[a];
3145                if (f.dataPoints)
3146                    for (var b = f.dataPoints.length, c = 0; c < b; c++) f.dataPointIds[c] = ++this._eventManager.lastObjectId
3147            }
3148        };
3149        q.prototype._processData = function() {
3150            this.assignIdToDataPoints();
3151            this.categoriseDataSeries();
3152            for (var a = 0; a < this.plotInfo.plotTypes.length; a++)
3153                for (var f = this.plotInfo.plotTypes[a],
3154                         b = 0; b < f.plotUnits.length; b++) {
3155                    var c = f.plotUnits[b];
3156                    "line" === c.type || "stepLine" === c.type || "spline" === c.type || "column" === c.type || "area" === c.type || "stepArea" === c.type || "splineArea" === c.type || "bar" === c.type || "bubble" === c.type || "scatter" === c.type ? this._processMultiseriesPlotUnit(c) : "stackedColumn" === c.type || "stackedBar" === c.type || "stackedArea" === c.type ? this._processStackedPlotUnit(c) : "stackedColumn100" === c.type || "stackedBar100" === c.type || "stackedArea100" === c.type ? this._processStacked100PlotUnit(c) : "candlestick" ===
3157                    c.type || "ohlc" === c.type || "rangeColumn" === c.type || "rangeBar" === c.type || "rangeArea" === c.type || "rangeSplineArea" === c.type || "error" === c.type || "boxAndWhisker" === c.type ? this._processMultiYPlotUnit(c) : "waterfall" === c.type && this._processSpecificPlotUnit(c)
3158                }
3159            this.calculateAutoBreaks()
3160        };
3161        q.prototype._processMultiseriesPlotUnit = function(a) {
3162            if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length))
3163                for (var f = a.axisY.dataInfo, b = a.axisX.dataInfo, c, e, g = !1, h = 0; h < a.dataSeriesIndexes.length; h++) {
3164                    var l = this.data[a.dataSeriesIndexes[h]],
3165                        t = 0,
3166                        k = !1,
3167                        r = !1,
3168                        p;
3169                    if ("normal" === l.axisPlacement || "xySwapped" === l.axisPlacement) var n = a.axisX.sessionVariables.newViewportMinimum ? a.axisX.sessionVariables.newViewportMinimum : this.options.axisX && this.options.axisX.viewportMinimum ? this.options.axisX.viewportMinimum : this.options.axisX && this.options.axisX.minimum ? this.options.axisX.minimum : a.axisX.logarithmic ? 0 : -Infinity,
3170                        d = a.axisX.sessionVariables.newViewportMaximum ? a.axisX.sessionVariables.newViewportMaximum : this.options.axisX && this.options.axisX.viewportMaximum ?
3171                            this.options.axisX.viewportMaximum : this.options.axisX && this.options.axisX.maximum ? this.options.axisX.maximum : Infinity;
3172                    if (l.dataPoints[t].x && l.dataPoints[t].x.getTime || "dateTime" === l.xValueType) g = !0;
3173                    for (t = 0; t < l.dataPoints.length; t++) {
3174                        "undefined" === typeof l.dataPoints[t].x && (l.dataPoints[t].x = t + (a.axisX.logarithmic ? 1 : 0));
3175                        l.dataPoints[t].x.getTime ? (g = !0, c = l.dataPoints[t].x.getTime()) : c = l.dataPoints[t].x;
3176                        e = l.dataPoints[t].y;
3177                        c < b.min && (b.min = c);
3178                        c > b.max && (b.max = c);
3179                        e < f.min && "number" === typeof e && (f.min = e);
3180                        e > f.max && "number" === typeof e && (f.max = e);
3181                        if (0 < t) {
3182                            if (a.axisX.logarithmic) {
3183                                var w = c / l.dataPoints[t - 1].x;
3184                                1 > w && (w = 1 / w);
3185                                b.minDiff > w && 1 !== w && (b.minDiff = w)
3186                            } else w = c - l.dataPoints[t - 1].x, 0 > w && (w *= -1), b.minDiff > w && 0 !== w && (b.minDiff = w);
3187                            null !== e && null !== l.dataPoints[t - 1].y && (a.axisY.logarithmic ? (w = e / l.dataPoints[t - 1].y, 1 > w && (w = 1 / w), f.minDiff > w && 1 !== w && (f.minDiff = w)) : (w = e - l.dataPoints[t - 1].y, 0 > w && (w *= -1), f.minDiff > w && 0 !== w && (f.minDiff = w)))
3188                        }
3189                        if (c < n && !k) null !== e && (p = c);
3190                        else {
3191                            if (!k && (k = !0, 0 < t)) {
3192                                t -= 2;
3193                                continue
3194                            }
3195                            if (c > d &&
3196                                !r) r = !0;
3197                            else if (c > d && r) continue;
3198                            l.dataPoints[t].label && (a.axisX.labels[c] = l.dataPoints[t].label);
3199                            c < b.viewPortMin && (b.viewPortMin = c);
3200                            c > b.viewPortMax && (b.viewPortMax = c);
3201                            null === e ? b.viewPortMin === c && p < c && (b.viewPortMin = p) : (e < f.viewPortMin && "number" === typeof e && (f.viewPortMin = e), e > f.viewPortMax && "number" === typeof e && (f.viewPortMax = e))
3202                        }
3203                    }
3204                    l.axisX.valueType = l.xValueType = g ? "dateTime" : "number"
3205                }
3206        };
3207        q.prototype._processStackedPlotUnit = function(a) {
3208            if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) {
3209                for (var f =
3210                    a.axisY.dataInfo, b = a.axisX.dataInfo, c, e, g = !1, h = [], l = [], t = Infinity, k = -Infinity, r = 0; r < a.dataSeriesIndexes.length; r++) {
3211                    var p = this.data[a.dataSeriesIndexes[r]],
3212                        n = 0,
3213                        d = !1,
3214                        w = !1,
3215                        za;
3216                    if ("normal" === p.axisPlacement || "xySwapped" === p.axisPlacement) var D = this.sessionVariables.axisX.newViewportMinimum ? this.sessionVariables.axisX.newViewportMinimum : this.options.axisX && this.options.axisX.viewportMinimum ? this.options.axisX.viewportMinimum : this.options.axisX && this.options.axisX.minimum ? this.options.axisX.minimum : -Infinity,
3217                        u = this.sessionVariables.axisX.newViewportMaximum ? this.sessionVariables.axisX.newViewportMaximum : this.options.axisX && this.options.axisX.viewportMaximum ? this.options.axisX.viewportMaximum : this.options.axisX && this.options.axisX.maximum ? this.options.axisX.maximum : Infinity;
3218                    if (p.dataPoints[n].x && p.dataPoints[n].x.getTime || "dateTime" === p.xValueType) g = !0;
3219                    for (n = 0; n < p.dataPoints.length; n++) {
3220                        "undefined" === typeof p.dataPoints[n].x && (p.dataPoints[n].x = n + (a.axisX.logarithmic ? 1 : 0));
3221                        p.dataPoints[n].x.getTime ? (g = !0, c = p.dataPoints[n].x.getTime()) : c = p.dataPoints[n].x;
3222                        e = y(p.dataPoints[n].y) ? 0 : p.dataPoints[n].y;
3223                        c < b.min && (b.min = c);
3224                        c > b.max && (b.max = c);
3225                        if (0 < n) {
3226                            if (a.axisX.logarithmic) {
3227                                var m = c / p.dataPoints[n - 1].x;
3228                                1 > m && (m = 1 / m);
3229                                b.minDiff > m && 1 !== m && (b.minDiff = m)
3230                            } else m = c - p.dataPoints[n - 1].x, 0 > m && (m *= -1), b.minDiff > m && 0 !== m && (b.minDiff = m);
3231                            null !== e && null !== p.dataPoints[n - 1].y && (a.axisY.logarithmic ? 0 < e && (m = e / p.dataPoints[n - 1].y, 1 > m && (m = 1 / m), f.minDiff > m && 1 !== m && (f.minDiff = m)) : (m = e - p.dataPoints[n - 1].y, 0 > m && (m *= -1), f.minDiff >
3232                            m && 0 !== m && (f.minDiff = m)))
3233                        }
3234                        if (c < D && !d) null !== p.dataPoints[n].y && (za = c);
3235                        else {
3236                            if (!d && (d = !0, 0 < n)) {
3237                                n -= 2;
3238                                continue
3239                            }
3240                            if (c > u && !w) w = !0;
3241                            else if (c > u && w) continue;
3242                            p.dataPoints[n].label && (a.axisX.labels[c] = p.dataPoints[n].label);
3243                            c < b.viewPortMin && (b.viewPortMin = c);
3244                            c > b.viewPortMax && (b.viewPortMax = c);
3245                            null === p.dataPoints[n].y ? b.viewPortMin === c && za < c && (b.viewPortMin = za) : (a.yTotals[c] = (a.yTotals[c] ? a.yTotals[c] : 0) + e, 0 <= e ? h[c] ? h[c] += e : (h[c] = e, t = Math.min(e, t)) : l[c] ? l[c] += e : (l[c] = e, k = Math.max(e, k)))
3246                        }
3247                    }
3248                    a.axisY.scaleBreaks &&
3249                    (a.axisY.scaleBreaks.autoCalculate && 1 <= a.axisY.scaleBreaks.maxNumberOfAutoBreaks) && (f.dataPointYPositiveSums ? (f.dataPointYPositiveSums.push.apply(f.dataPointYPositiveSums, h), f.dataPointYNegativeSums.push.apply(f.dataPointYPositiveSums, l)) : (f.dataPointYPositiveSums = h, f.dataPointYNegativeSums = l));
3250                    p.axisX.valueType = p.xValueType = g ? "dateTime" : "number"
3251                }
3252                for (n in h) h.hasOwnProperty(n) && !isNaN(n) && (a = h[n], a < f.min && (f.min = Math.min(a, t)), a > f.max && (f.max = a), n < b.viewPortMin || n > b.viewPortMax || (a < f.viewPortMin &&
3253                (f.viewPortMin = Math.min(a, t)), a > f.viewPortMax && (f.viewPortMax = a)));
3254                for (n in l) l.hasOwnProperty(n) && !isNaN(n) && (a = l[n], a < f.min && (f.min = a), a > f.max && (f.max = Math.max(a, k)), n < b.viewPortMin || n > b.viewPortMax || (a < f.viewPortMin && (f.viewPortMin = a), a > f.viewPortMax && (f.viewPortMax = Math.max(a, k))))
3255            }
3256        };
3257        q.prototype._processStacked100PlotUnit = function(a) {
3258            if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) {
3259                for (var f = a.axisY.dataInfo, b = a.axisX.dataInfo, c, e, g = !1, h = !1, l = !1, t = [], k = 0; k < a.dataSeriesIndexes.length; k++) {
3260                    var r =
3261                            this.data[a.dataSeriesIndexes[k]],
3262                        p = 0,
3263                        n = !1,
3264                        d = !1,
3265                        w;
3266                    if ("normal" === r.axisPlacement || "xySwapped" === r.axisPlacement) var m = this.sessionVariables.axisX.newViewportMinimum ? this.sessionVariables.axisX.newViewportMinimum : this.options.axisX && this.options.axisX.viewportMinimum ? this.options.axisX.viewportMinimum : this.options.axisX && this.options.axisX.minimum ? this.options.axisX.minimum : -Infinity,
3267                        D = this.sessionVariables.axisX.newViewportMaximum ? this.sessionVariables.axisX.newViewportMaximum : this.options.axisX &&
3268                        this.options.axisX.viewportMaximum ? this.options.axisX.viewportMaximum : this.options.axisX && this.options.axisX.maximum ? this.options.axisX.maximum : Infinity;
3269                    if (r.dataPoints[p].x && r.dataPoints[p].x.getTime || "dateTime" === r.xValueType) g = !0;
3270                    for (p = 0; p < r.dataPoints.length; p++) {
3271                        "undefined" === typeof r.dataPoints[p].x && (r.dataPoints[p].x = p + (a.axisX.logarithmic ? 1 : 0));
3272                        r.dataPoints[p].x.getTime ? (g = !0, c = r.dataPoints[p].x.getTime()) : c = r.dataPoints[p].x;
3273                        e = y(r.dataPoints[p].y) ? null : r.dataPoints[p].y;
3274                        c < b.min && (b.min =
3275                            c);
3276                        c > b.max && (b.max = c);
3277                        if (0 < p) {
3278                            if (a.axisX.logarithmic) {
3279                                var u = c / r.dataPoints[p - 1].x;
3280                                1 > u && (u = 1 / u);
3281                                b.minDiff > u && 1 !== u && (b.minDiff = u)
3282                            } else u = c - r.dataPoints[p - 1].x, 0 > u && (u *= -1), b.minDiff > u && 0 !== u && (b.minDiff = u);
3283                            y(e) || null === r.dataPoints[p - 1].y || (a.axisY.logarithmic ? 0 < e && (u = e / r.dataPoints[p - 1].y, 1 > u && (u = 1 / u), f.minDiff > u && 1 !== u && (f.minDiff = u)) : (u = e - r.dataPoints[p - 1].y, 0 > u && (u *= -1), f.minDiff > u && 0 !== u && (f.minDiff = u)))
3284                        }
3285                        if (c < m && !n) null !== e && (w = c);
3286                        else {
3287                            if (!n && (n = !0, 0 < p)) {
3288                                p -= 2;
3289                                continue
3290                            }
3291                            if (c > D && !d) d = !0;
3292                            else if (c >
3293                                D && d) continue;
3294                            r.dataPoints[p].label && (a.axisX.labels[c] = r.dataPoints[p].label);
3295                            c < b.viewPortMin && (b.viewPortMin = c);
3296                            c > b.viewPortMax && (b.viewPortMax = c);
3297                            null === e ? b.viewPortMin === c && w < c && (b.viewPortMin = w) : (a.yTotals[c] = (a.yTotals[c] ? a.yTotals[c] : 0) + e, 0 <= e ? h = !0 : 0 > e && (l = !0), t[c] = t[c] ? t[c] + Math.abs(e) : Math.abs(e))
3298                        }
3299                    }
3300                    r.axisX.valueType = r.xValueType = g ? "dateTime" : "number"
3301                }
3302                a.axisY.logarithmic ? (f.max = y(f.viewPortMax) ? 99 * Math.pow(a.axisY.logarithmBase, -0.05) : Math.max(f.viewPortMax, 99 * Math.pow(a.axisY.logarithmBase, -0.05)), f.min = y(f.viewPortMin) ? 1 : Math.min(f.viewPortMin, 1)) : h && !l ? (f.max = y(f.viewPortMax) ? 99 : Math.max(f.viewPortMax, 99), f.min = y(f.viewPortMin) ? 1 : Math.min(f.viewPortMin, 1)) : h && l ? (f.max = y(f.viewPortMax) ? 99 : Math.max(f.viewPortMax, 99), f.min = y(f.viewPortMin) ? -99 : Math.min(f.viewPortMin, -99)) : !h && l && (f.max = y(f.viewPortMax) ? -1 : Math.max(f.viewPortMax, -1), f.min = y(f.viewPortMin) ? -99 : Math.min(f.viewPortMin, -99));
3303                f.viewPortMin = f.min;
3304                f.viewPortMax = f.max;
3305                a.dataPointYSums = t
3306            }
3307        };
3308        q.prototype._processMultiYPlotUnit = function(a) {
3309            if (a.dataSeriesIndexes &&
3310                !(1 > a.dataSeriesIndexes.length))
3311                for (var f = a.axisY.dataInfo, b = a.axisX.dataInfo, c, e, g, h, l = !1, t = 0; t < a.dataSeriesIndexes.length; t++) {
3312                    var k = this.data[a.dataSeriesIndexes[t]],
3313                        r = 0,
3314                        p = !1,
3315                        n = !1,
3316                        d, w, m;
3317                    if ("normal" === k.axisPlacement || "xySwapped" === k.axisPlacement) var D = a.axisX.sessionVariables.newViewportMinimum ? a.axisX.sessionVariables.newViewportMinimum : this.options.axisX && this.options.axisX.viewportMinimum ? this.options.axisX.viewportMinimum : this.options.axisX && this.options.axisX.minimum ? this.options.axisX.minimum :
3318                            a.axisX.logarithmic ? 0 : -Infinity,
3319                        u = a.axisX.sessionVariables.newViewportMaximum ? a.axisX.sessionVariables.newViewportMaximum : this.options.axisX && this.options.axisX.viewportMaximum ? this.options.axisX.viewportMaximum : this.options.axisX && this.options.axisX.maximum ? this.options.axisX.maximum : Infinity;
3320                    if (k.dataPoints[r].x && k.dataPoints[r].x.getTime || "dateTime" === k.xValueType) l = !0;
3321                    for (r = 0; r < k.dataPoints.length; r++) {
3322                        "undefined" === typeof k.dataPoints[r].x && (k.dataPoints[r].x = r + (a.axisX.logarithmic ? 1 : 0));
3323                        k.dataPoints[r].x.getTime ?
3324                            (l = !0, c = k.dataPoints[r].x.getTime()) : c = k.dataPoints[r].x;
3325                        if ((e = k.dataPoints[r].y) && e.length) {
3326                            g = Math.min.apply(null, e);
3327                            h = Math.max.apply(null, e);
3328                            w = !0;
3329                            for (var v = 0; v < e.length; v++) null === e.k && (w = !1);
3330                            w && (p || (m = d), d = c)
3331                        }
3332                        c < b.min && (b.min = c);
3333                        c > b.max && (b.max = c);
3334                        g < f.min && (f.min = g);
3335                        h > f.max && (f.max = h);
3336                        0 < r && (a.axisX.logarithmic ? (w = c / k.dataPoints[r - 1].x, 1 > w && (w = 1 / w), b.minDiff > w && 1 !== w && (b.minDiff = w)) : (w = c - k.dataPoints[r - 1].x, 0 > w && (w *= -1), b.minDiff > w && 0 !== w && (b.minDiff = w)), e && (null !== e[0] && k.dataPoints[r - 1].y && null !==
3337                        k.dataPoints[r - 1].y[0]) && (a.axisY.logarithmic ? (w = e[0] / k.dataPoints[r - 1].y[0], 1 > w && (w = 1 / w), f.minDiff > w && 1 !== w && (f.minDiff = w)) : (w = e[0] - k.dataPoints[r - 1].y[0], 0 > w && (w *= -1), f.minDiff > w && 0 !== w && (f.minDiff = w))));
3338                        if (!(c < D) || p) {
3339                            if (!p && (p = !0, 0 < r)) {
3340                                r -= 2;
3341                                d = m;
3342                                continue
3343                            }
3344                            if (c > u && !n) n = !0;
3345                            else if (c > u && n) continue;
3346                            k.dataPoints[r].label && (a.axisX.labels[c] = k.dataPoints[r].label);
3347                            c < b.viewPortMin && (b.viewPortMin = c);
3348                            c > b.viewPortMax && (b.viewPortMax = c);
3349                            if (b.viewPortMin === c && e)
3350                                for (v = 0; v < e.length; v++)
3351                                    if (null === e[v] && d < c) {
3352                                        b.viewPortMin =
3353                                            d;
3354                                        break
3355                                    }
3356                            null === e ? b.viewPortMin === c && d < c && (b.viewPortMin = d) : (g < f.viewPortMin
3356 && (f.viewPortMin = g), h > f.viewPortMax && (f.viewPortMax = h))
3357                        }
3358                    }
3359                    k.axisX.valueType = k.xValueType = l ? "dateTime" : "number"
3360                }
3361        };
3362        q.prototype._processSpecificPlotUnit = function(a) {
3363            if ("waterfall" === a.type && a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length))
3364                for (var f = a.axisY.dataInfo, b = a.axisX.dataInfo, c, e, g = !1, h = 0; h < a.dataSeriesIndexes.length; h++) {
3365                    var l = this.data[a.dataSeriesIndexes[h]],
3366                        t = 0,
3367                        k = !1,
3368                        r = !1,
3369                        p = c = 0;
3370                    if ("normal" === l.axisPlacement || "xySwapped" ===
3371                        l.axisPlacement) var n = a.axisX.sessionVariables.newViewportMinimum ? a.axisX.sessionVariables.newViewportMinimum : this.options.axisX && this.options.axisX.viewportMinimum ? this.options.axisX.viewportMinimum : this.options.axisX && this.options.axisX.minimum ? this.options.axisX.minimum : a.axisX.logarithmic ? 0 : -Infinity,
3372                        d = a.axisX.sessionVariables.newViewportMaximum ? a.axisX.sessionVariables.newViewportMaximum : this.options.axisX && this.options.axisX.viewportMaximum ? this.options.axisX.viewportMaximum : this.options.axisX &&
3373                        this.options.axisX.maximum ? this.options.axisX.maximum : Infinity;
3374                    if (l.dataPoints[t].x && l.dataPoints[t].x.getTime || "dateTime" === l.xValueType) g = !0;
3375                    for (t = 0; t < l.dataPoints.length; t++) "undefined" !== typeof l.dataPoints[t].isCumulativeSum && !0 === l.dataPoints[t].isCumulativeSum ? (l.dataPointEOs[t].cumulativeSumYStartValue = 0, l.dataPointEOs[t].cumulativeSum = 0 === t ? 0 : l.dataPointEOs[t - 1].cumulativeSum, l.dataPoints[t].y = 0 === t ? 0 : l.dataPointEOs[t - 1].cumulativeSum) : "undefined" !== typeof l.dataPoints[t].isIntermediateSum &&
3376                    !0 === l.dataPoints[t].isIntermediateSum ? (l.dataPointEOs[t].cumulativeSumYStartValue = p, l.dataPointEOs[t].cumulativeSum = 0 === t ? 0 : l.dataPointEOs[t - 1].cumulativeSum, l.dataPoints[t].y = 0 === t ? 0 : c, p = 0 === t ? 0 : l.dataPointEOs[t - 1].cumulativeSum, c = 0) : (e = "number" !== typeof l.dataPoints[t].y ? 0 : l.dataPoints[t].y, l.dataPointEOs[t].cumulativeSumYStartValue = 0 === t ? 0 : l.dataPointEOs[t - 1].cumulativeSum, l.dataPointEOs[t].cumulativeSum = 0 === t ? e : l.dataPointEOs[t - 1].cumulativeSum + e, c += e);
3377                    for (t = 0; t < l.dataPoints.length; t++)
3378                        if ("undefined" ===
3379                            typeof l.dataPoints[t].x && (l.dataPoints[t].x = t + (a.axisX.logarithmic ? 1 : 0)), l.dataPoints[t].x.getTime ? (g = !0, c = l.dataPoints[t].x.getTime()) : c = l.dataPoints[t].x, e = l.dataPoints[t].y, c < b.min && (b.min = c), c > b.max && (b.max = c), l.dataPointEOs[t].cumulativeSum < f.min && (f.min = l.dataPointEOs[t].cumulativeSum), l.dataPointEOs[t].cumulativeSum > f.max && (f.max = l.dataPointEOs[t].cumulativeSum), 0 < t && (a.axisX.logarithmic ? (p = c / l.dataPoints[t - 1].x, 1 > p && (p = 1 / p), b.minDiff > p && 1 !== p && (b.minDiff = p)) : (p = c - l.dataPoints[t - 1].x, 0 > p &&
3380                            (p *= -1), b.minDiff > p && 0 !== p && (b.minDiff = p)), null !== e && null !== l.dataPoints[t - 1].y && (a.axisY.logarithmic ? (e = l.dataPointEOs[t].cumulativeSum / l.dataPointEOs[t - 1].cumulativeSum, 1 > e && (e = 1 / e), f.minDiff > e && 1 !== e && (f.minDiff = e)) : (e = l.dataPointEOs[t].cumulativeSum - l.dataPointEOs[t - 1].cumulativeSum, 0 > e && (e *= -1), f.minDiff > e && 0 !== e && (f.minDiff = e)))), !(c < n) || k) {
3381                            if (!k && (k = !0, 0 < t)) {
3382                                t -= 2;
3383                                continue
3384                            }
3385                            if (c > d && !r) r = !0;
3386                            else if (c > d && r) continue;
3387                            l.dataPoints[t].label && (a.axisX.labels[c] = l.dataPoints[t].label);
3388                            c < b.viewPortMin &&
3389                            (b.viewPortMin = c);
3390                            c > b.viewPortMax && (b.viewPortMax = c);
3391                            0 < t && (l.dataPointEOs[t - 1].cumulativeSum < f.viewPortMin && (f.viewPortMin = l.dataPointEOs[t - 1].cumulativeSum), l.dataPointEOs[t - 1].cumulativeSum > f.viewPortMax && (f.viewPortMax = l.dataPointEOs[t - 1].cumulativeSum));
3392                            l.dataPointEOs[t].cumulativeSum < f.viewPortMin && (f.viewPortMin = l.dataPointEOs[t].cumulativeSum);
3393                            l.dataPointEOs[t].cumulativeSum > f.viewPortMax && (f.viewPortMax = l.dataPointEOs[t].cumulativeSum)
3394                        }
3395                    l.axisX.valueType = l.xValueType = g ? "dateTime" : "number"
3396                }
3397        };
3398        q.prototype.calculateAutoBreaks = function() {
3399            function a(a, c, b, e) {
3400                if (e) return b = Math.pow(Math.min(b * a / c, c / a), 0.2), 1 >= b && (b = Math.pow(1 > a ? 1 / a : Math.min(c / a, a), 0.25)), {
3401                    startValue: a * b,
3402                    endValue: c / b
3403                };
3404                b = 0.2 * Math.min(b - c + a, c - a);
3405                0 >
3405= b && (b = 0.25 * Math.min(c - a, Math.abs(a)));
3406                return {
3407                    startValue: a + b,
3408                    endValue: c - b
3409                }
3410            }
3411
3412            function f(a) {
3413                if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) {
3414                    var c = a.axisX.scaleBreaks && a.axisX.scaleBreaks.autoCalculate && 1 <= a.axisX.scaleBreaks.maxNumberOfAutoBreaks,
3415                        b = a.axisY.scaleBreaks && a.axisY.scaleBreaks.autoCalculate &&
3416                            1 <= a.axisY.scaleBreaks.maxNumberOfAutoBreaks;
3417                    if (c || b)
3418                        for (var f = a.axisY.dataInfo, g = a.axisX.dataInfo, k, h = g.min, n = g.max, l = f.min, t = f.max, g = g._dataRanges, f = f._dataRanges, p, r = 0, m = 0; m < a.dataSeriesIndexes.length; m++) {
3419                            var v = e.data[a.dataSeriesIndexes[m]];
3420                            if (!(4 > v.dataPoints.length))
3421                                for (r = 0; r < v.dataPoints.length; r++)
3422                                    if (c && (p = (n + 1 - h) * Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold) || 10, 10) / 100, k = v.dataPoints[r].x.getTime ? v.dataPoints[r].x.getTime() : v.dataPoints[r].x, p = Math.floor((k - h) / p), k < g[p].min &&
3423                                        (g[p].min = k), k > g[p].max && (g[p].max = k)), b) {
3424                                        var s = (t + 1 - l) * Math.max(parseFloat(a.axisY.scaleBreaks.collapsibleThreshold) || 10, 10) / 100;
3425                                        if ((k = "waterfall" === a.type ? v.dataPointEOs[r].cumulativeSum : v.dataPoints[r].y) && k.length)
3426                                            for (var q = 0; q < k.length; q++) p = Math.floor((k[q] - l) / s), k[q] < f[p].min && (f[p].min = k[q]), k[q] > f[p].max && (f[p].max = k[q]);
3427                                        else y(k) || (p = Math.floor((k - l) / s), k < f[p].min && (f[p].min = k), k > f[p].max && (f[p].max = k))
3428                                    }
3429                        }
3430                }
3431            }
3432
3433            function b(a) {
3434                if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length) && a.axisX.scaleBreaks &&
3435                    a.axisX.scaleBreaks.autoCalculate && 1 <= a.axisX.scaleBreaks.maxNumberOfAutoBreaks)
3436                    for (var c = a.axisX.dataInfo, b = c.min, f = c.max, g = c._dataRanges, k, h = 0, n = 0; n < a.dataSeriesIndexes.length; n++) {
3437                        var l = e.data[a.dataSeriesIndexes[n]];
3438                        if (!(4 > l.dataPoints.length))
3439                            for (h = 0; h < l.dataPoints.length; h++) k = (f + 1 - b) * Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold) || 10, 10) / 100, c = l.dataPoints[h].x.getTime ? l.dataPoints[h].x.getTime() : l.dataPoints[h].x, k = Math.floor((c - b) / k), c < g[k].min && (g[k].min = c), c > g[k].max && (g[k].max =
3440                                c)
3441                    }
3442            }
3443            for (var c, e = this, g = !1, h = 0; h < this._axes.length; h++)
3444                if (this._axes[h].scaleBreaks && this._axes[h].scaleBreaks.autoCalculate && 1 <= this._axes[h].scaleBreaks.maxNumberOfAutoBreaks) {
3445                    g = !0;
3446                    this._axes[h].dataInfo._dataRanges = [];
3447                    for (var l = 0; l < 100 / Math.max(parseFloat(this._axes[h].scaleBreaks.collapsibleThreshold) || 10, 10); l++) this._axes[h].dataInfo._dataRanges.push({
3448                        min: Infinity,
3449                        max: -Infinity
3450                    })
3451                }
3452            if (g) {
3453                for (h = 0; h < this.plotInfo.plotTypes.length; h++)
3454                    for (g = this.plotInfo.plotTypes[h], l = 0; l < g.plotUnits.length; l++) c =
3455                        g.plotUnits[l], "line" === c.type || "stepLine" === c.type || "spline" === c.type || "column" === c.type || "area" === c.type || "stepArea" === c.type || "splineArea" === c.type || "bar" === c.type || "bubble" === c.type || "scatter" === c.type || "candlestick" === c.type || "ohlc" === c.type || "rangeColumn" === c.type || "rangeBar" === c.type || "rangeArea" === c.type || "rangeSplineArea" === c.type || "waterfall" === c.type || "error" === c.type || "boxAndWhisker" === c.type ? f(c) : 0 <= c.type.indexOf("stacked") && b(c);
3456                for (h = 0; h < this._axes.length; h++)
3457                    if (this._axes[h].dataInfo._dataRanges) {
3458                        var t =
3459                            this._axes[h].dataInfo.min;
3460                        c = (this._axes[h].dataInfo.max + 1 - t) * Math.max(parseFloat(this._axes[h].scaleBreaks.collapsibleThreshold) || 10, 10) / 100;
3461                        var k = this._axes[h].dataInfo._dataRanges,
3462                            r, p, g = [];
3463                        if (this._axes[h].dataInfo.dataPointYPositiveSums) {
3464                            var n = this._axes[h].dataInfo.dataPointYPositiveSums;
3465                            r = k;
3466                            for (l in n) n.hasOwnProperty(l) && !isNaN(l) && (p = n[l], y(p) || (index = Math.floor((p - t) / c), p < r[index].min && (r[index].min = p), p > r[index].max && (r[index].max = p)));
3467                            delete this._axes[h].dataInfo.dataPointYPositiveSums
3468                        }
3469                        if (this._axes[h].dataInfo.dataPointYNegativeSums) {
3470                            n =
3471                                this._axes[h].dataInfo.dataPointYNegativeSums;
3472                            r = k;
3473                            for (l in n) n.hasOwnProperty(l) && !isNaN(l) && (p = -1 * n[l], y(p) || (index = Math.floor((p - t) / c), p < r[index].min && (r[index].min = p), p > r[index].max && (r[index].max = p)));
3474                            delete this._axes[h].dataInfo.dataPointYNegativeSums
3475                        }
3476                        for (l = 0; l < k.length - 1; l++)
3477                            if (r = k[l].max, isFinite(r))
3478                                for (; l < k.length - 1;)
3479                                    if (t = k[l + 1].min, isFinite(t)) {
3480                                        p = t - r;
3481                                        p > c && g.push({
3482                                            diff: p,
3483                                            start: r,
3484                                            end: t
3485                                        });
3486                                        break
3487                                    } else l++;
3488                        if (this._axes[h].scaleBreaks.customBreaks)
3489                            for (l = 0; l < this._axes[h].scaleBreaks.customBreaks.length; l++)
3490                                for (c =
3491                                         0; c < g.length; c++)
3492                                    if (this._axes[h].scaleBreaks.customBreaks[l].startValue <= g[c].start && g[c].start <= this._axes[h].scaleBreaks.customBreaks[l].endValue || this._axes[h].scaleBreaks.customBreaks[l].startValue <= g[c].start && g[c].start <= this._axes[h].scaleBreaks.customBreaks[l].endValue || g[c].start <= this._axes[h].scaleBreaks.customBreaks[l].startValue && this._axes[h].scaleBreaks.customBreaks[l].startValue <= g[c].end || g[c].start <= this._axes[h].scaleBreaks.customBreaks[l].endValue && this._axes[h].scaleBreaks.customBreaks[l].endValue <=
3493                                        g[c].end) g.splice(c, 1), c--;
3494                        g.sort(function(a, c) {
3495                            return c.diff - a.diff
3496                        });
3497                        for (l = 0; l < Math.min(g.length, this._axes[h].scaleBreaks.maxNumberOfAutoBreaks); l++) c = a(g[l].start, g[l].end, this._axes[h].logarithmic ? this._axes[h].dataInfo.max / this._axes[h].dataInfo.min : this._axes[h].dataInfo.max - this._axes[h].dataInfo.min, this._axes[h].logarithmic), this._axes[h].scaleBreaks.autoBreaks.push(new aa(this, "autoBreaks", c, l, ++this._eventManager.lastObjectId, this._axes[h].scaleBreaks)), this._axes[h].scaleBreaks._appliedBreaks.push(this._axes[h].scaleBreaks.autoBreaks[this._axes[h].scaleBreaks.autoBreaks.length -
3498                        1]);
3499                        this._axes[h].scaleBreaks._appliedBreaks.sort(function(a, c) {
3500                            return a.startValue - c.startValue
3501                        })
3502                    }
3503            }
3504        };
3505        q.prototype.getDataPointAtXY = function(a, f, b) {
3506            b = b || !1;
3507            for (var c = [], e = this._dataInRenderedOrder.length - 1; 0 <= e; e--) {
3508                var g = null;
3509                (g = this._dataInRenderedOrder[e].getDataPointAtXY(a, f, b)) && c.push(g)
3510            }
3511            a = null;
3512            f = !1;
3513            for (b = 0; b < c.length; b++)
3514                if ("line" === c[b].dataSeries.type || "stepLine" === c[b].dataSeries.type || "area" === c[b].dataSeries.type || "stepArea" === c[b].dataSeries.type)
3515                    if (e = na("markerSize", c[b].dataPoint, c[b].dataSeries
3515) ||
3516                            8, c[b].distance <= e / 2) {
3517                        f = !0;
3518                        break
3519                    }
3520            for (b = 0; b < c.length; b++) f && "line" !== c[b].dataSeries.type && "stepLine" !== c[b].dataSeries.type && "area" !== c[b].dataSeries.type && "stepArea" !== c[b].dataSeries.type || (a ? c[b].distance <= a.distance && (a = c[b]) : a = c[b]);
3521            return a
3522        };
3523        q.prototype.getObjectAtXY = function(a, f, b) {
3524            var c = null;
3525            if (b = this.getDataPointAtXY(a, f, b || !1)) c = b.dataSeries.dataPointIds[b.dataPointIndex];
3526            else if (v) c = Wa(a, f, this._eventManager.ghostCtx);
3527            else
3528                for (b = 0; b < this.legend.items.length; b++) {
3529                    var e = this.legend.items[b];
3530                    a >= e.x1 && (a <= e.x2 && f >= e.y1 && f <= e.y2) && (c = e.id)
3531                }
3532            return c
3533        };
3534        q.prototype.getAutoFontSize = function(a, f, b) {
3535            f = Math.min(this.width, this.height);
3536            return Math.max("theme4" === this.theme ? 0 : 300 <= f ? 12 : 10, Math.round(f * (a / 400)))
3537        };
3538        q.prototype.resetOverlayedCanvas = function() {
3539            this.overlaidCanvasCtx.clearRect(0, 0, this.width, this.height)
3540        };
3541        q.prototype.clearCanvas = function() {
3542            this.ctx.clearRect(0, 0, this.width, this.height);
3543            this.backgroundColor && (this.ctx.fillStyle = this.backgroundColor, this.ctx.fillRect(0, 0, this.width, this.height))
3544        };
3545        q.prototype.attachEvent = function(a) {
3546            this._events.push(a)
3547        };
3548        q.prototype._touchEventHandler = function(a) {
3549            if (a.changedTouches && this.interactivityEnabled) {
3550                var f = [],
3551                    b = a.changedTouches,
3552                    c = b ? b[0] : a,
3553                    e = null;
3554                switch (a.type) {
3555                    case "touchstart":
3556                    case "MSPointerDown":
3557                        f = ["mousemove", "mousedown"];
3558                        this._lastTouchData = Oa(c);
3559                        this._lastTouchData.time = new Date;
3560                        break;
3561                    case "touchmove":
3562                    case "MSPointerMove":
3563                        f = ["mousemove"];
3564                        break;
3565                    case "touchend":
3566                    case "MSPointerUp":
3567                        var g = this._lastTouchData && this._lastTouchData.time ? new Date - this._lastTouchData.time :
3568                                0,
3569                            f = "touchstart" === this._lastTouchEventType || "MSPointerDown" === this._lastTouchEventType || 300 > g ? ["mouseup", "click"] : ["mouseup"];
3570                        break;
3571                    default:
3572                        return
3573                }
3574                if (!(b && 1 < b.length)) {
3575                    e = Oa(c);
3576                    e.time = new Date;
3577                    try {
3578                        var h = e.y - this._lastTouchData.y,
3579                            g = e.time - this._lastTouchData.time;
3580                        if (15 < Math.abs(h) && (this._lastTouchData.scroll || 300 > g)) {
3581                            this._lastTouchData.scroll = !0;
3582                            var l = window.parent || window;
3583                            l && l.scrollBy && l.scrollBy(0, -h)
3584                        }
3585                    } catch (t) {}
3586                    this._lastTouchEventType = a.type;
3587                    if (this._lastTouchData.scroll && this.zoomEnabled) this.isDrag &&
3588                    this.resetOverlayedCanvas(), this.isDrag = !1;
3589                    else
3590                        for (b = 0; b < f.length; b++) e = f[b], g = document.createEvent("MouseEvent"), g.initMouseEvent(e, !0, !0, window, 1, c.screenX, c.screenY, c.clientX, c.clientY, !1, !1, !1, !1, 0, null), c.target.dispatchEvent(g), a.preventManipulation && a.preventManipulation(), a.preventDefault && a.preventDefault()
3591                }
3592            }
3593        };
3594        q.prototype._dispatchRangeEvent = function(a, f) {
3595            var b = {
3596                chart: this
3597            };
3598            b.type = a;
3599            b.trigger = f;
3600            var c = [];
3601            this.axisX && 0 < this.axisX.length && c.push("axisX");
3602            this.axisX2 && 0 < this.axisX2.length &&
3603            c.push("axisX2");
3604            this.axisY && 0 < this.axisY.length && c.push("axisY");
3605            this.axisY2 && 0 < this.axisY2.length && c.push("axisY2");
3606            for (var e = 0; e < c.length; e++)
3607                if (y(b[c[e]]) && (b[c[e]] = []), "axisY" === c[e])
3608                    for (var g = 0; g < this.axisY.length; g++) b[c[e]].push({
3609                        viewportMinimum: this[c[e]][g].sessionVariables.newViewportMinimum,
3610                        viewportMaximum: this[c[e]][g].sessionVariables.newViewportMaximum
3611                    });
3612                else if ("axisY2" === c[e])
3613                    for (g = 0; g < this.axisY2.length; g++) b[c[e]].push({
3614                        viewportMinimum: this[c[e]][g].sessionVariables.newViewportMinimum,
3615                        viewportMaximum: this[c[e]][g].sessionVariables.newViewportMaximum
3616                    });
3617                else if ("axisX" === c[e])
3618                    for (g = 0; g < this.axisX.length; g++) b[c[e]].push({
3619                        viewportMinimum: this[c[e]][g].sessionVariables.newViewportMinimum,
3620                        viewportMaximum: this[c[e]][g].sessionVariables.newViewportMaximum
3621                    });
3622                else if ("axisX2" === c[e])
3623                    for (g = 0; g < this.axisX2.length; g++) b[c[e]].push({
3624                        viewportMinimum: this[c[e]][g].sessionVariables.newViewportMinimum,
3625                        viewportMaximum: this[c[e]][g].sessionVariables.newViewportMaximum
3626                    });
3627            this.dispatchEvent(a, b, this)
3628        };
3629        q.prototype._mouseEventHandler = function(a) {
3630            "undefined" === typeof a.target && a.srcElement && (a.target = a.srcElement);
3631            var f = Oa(a),
3632                b = a.type,
3633                c, e;
3634            a.which ? e = 3 == a.which : a.button && (e = 2 == a.button);
3635            q.capturedEventParam && (c = q.capturedEventParam, "mouseup" === b && (q.capturedEventParam = null, c.chart.overlaidCanvas.releaseCapture ? c.chart.overlaidCanvas.releaseCapture() : document.documentElement.removeEventListener("mouseup", c.chart._mou
3635seEventHandler, !1)), c.hasOwnProperty(b) && ("mouseup" !== b || c.chart.overlaidCanvas.releaseCapture ?
3636                a.target !== c.chart.overlaidCanvas && v || c[b].call(c.context, f.x, f.y) : a.target !== c.chart.overlaidCanvas && (c.chart.isDrag = !1)));
3637            if (this.interactivityEnabled)
3638                if (this._ignoreNextEvent) this._ignoreNextEvent = !1;
3639                else if (a.preventManipulation && a.preventManipulation(), a.preventDefault && a.preventDefault(), !e) {
3640                    if (!q.capturedEventParam && this._events) {
3641                        for (var g = 0; g < this._events.length; g++)
3642                            if (this._events[g].hasOwnProperty(b))
3643                                if (c = this._events[g], e = c.bounds, f.x >= e.x1 && f.x <= e.x2 && f.y >= e.y1 && f.y <= e.y2) {
3644                                    c[b].call(c.context,
3645                                        f.x, f.y);
3646                                    "mousedown" === b && !0 === c.capture ? (q.capturedEventParam = c, this.overlaidCanvas.setCapture ? this.overlaidCanvas.setCapture() : document.documentElement.addEventListener("mouseup", this._mouseEventHandler, !1)) : "mouseup" === b && (c.chart.overlaidCanvas.releaseCapture ? c.chart.overlaidCanvas.releaseCapture() : document.documentElement.removeEventListener("mouseup", this._mouseEventHandler, !1));
3647                                    break
3648                                } else c = null;
3649                        a.target.style.cursor = c && c.cursor ? c.cursor : this._defaultCursor
3650                    }
3651                    b = this.plotArea;
3652                    if (f.x < b.x1 || f.x >
3653                        b.x2 || f.y < b.y1 || f.y > b.y2) this.toolTip && this.toolTip.enabled ? this.toolTip.hide() : this.resetOverlayedCanvas();
3654                    this.isDrag && this.zoomEnabled || !this._eventManager || this._eventManager.mouseEventHandler(a)
3655                }
3656        };
3657        q.prototype._plotAreaMouseDown = function(a, f) {
3658            this.isDrag = !0;
3659            this.dragStartPoint = {
3660                x: a,
3661                y: f
3662            }
3663        };
3664        q.prototype._plotAreaMouseUp = function(a, f) {
3665            if (("normal" === this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) && this.isDrag) {
3666                var b = f - this.dragStartPoint.y,
3667                    c = a - this.dragStartPoint.x,
3668                    e = 0 <= this.zoomType.indexOf("x"),
3669                    g = 0 <= this.zoomType.indexOf("y"),
3670                    h = !1;
3671                this.resetOverlayedCanvas();
3672                if ("xySwapped" === this.plotInfo.axisPlacement) var l = g,
3673                    g = e,
3674                    e = l;
3675                if (this.panEnabled || this.zoomEnabled) {
3676                    if (this.panEnabled)
3677                        for (e = g = 0; e < this._axes.length; e++) b = this._axes[e], b.logarithmic ? b.viewportMinimum < b.minimum ? (g = b.minimum / b.viewportMinimum, b.sessionVariables.newViewportMinimum = b.viewportMinimum * g, b.sessionVariables.newViewportMaximum = b.viewportMaximum * g, h = !0) : b.viewportMaximum > b.maximum && (g = b.viewportMaximum / b.maximum, b.sessionVariables.newViewportMinimum =
3678                                b.viewportMinimum / g, b.sessionVariables.newViewportMaximum = b.viewportMaximum / g, h = !0) : b.viewportMinimum < b.minimum ? (g = b.minimum - b.viewportMinimum, b.sessionVariables.newViewportMinimum = b.viewportMinimum + g, b.sessionVariables.newViewportMaximum = b.viewportMaximum + g, h = !0) : b.viewportMaximum > b.maximum && (g = b.viewportMaximum - b.maximum, b.sessionVariables.newViewportMinimum = b.viewportMinimum - g, b.sessionVariables.newViewportMaximum = b.viewportMaximum - g, h = !0);
3679                    else if ((!e || 2 < Math.abs(c)) && (!g || 2 < Math.abs(b)) && this.zoomEnabled) {
3680                        if (!this.dragStartPoint) return;
3681                        b = e ? this.dragStartPoint.x : this.plotArea.x1;
3682                        c = g ? this.dragStartPoint.y : this.plotArea.y1;
3683                        e = e ? a : this.plotArea.x2;
3684                        g = g ? f : this.plotArea.y2;
3685                        2 < Math.abs(b - e) && 2 < Math.abs(c - g) && this._zoomPanToSelectedRegion(b, c, e, g) && (h = !0)
3686                    }
3687                    h && (this._ignoreNextEvent = !0, this._dispatchRangeEvent("rangeChanging", "zoom"), this.render(), this._dispatchRangeEvent("rangeChanged", "zoom"), h && (this.zoomEnabled && "none" === this._zoomButton.style.display) && (Ma(this._zoomButton, this._resetButton), va(this, this._zoomButton, "pan"), va(this, this._resetButton,
3688                        "reset")))
3689                }
3690            }
3691            this.isDrag = !1;
3692            if ("none" !== this.plotInfo.axisPlacement) {
3693                this.resetOverlayedCanvas();
3694                if (this.axisX && 0 < this.axisX.length)
3695                    for (h = 0; h < this.axisX.length; h++) this.axisX[h].crosshair && this.axisX[h].crosshair.enabled && this.axisX[h].renderCrosshair(a, f);
3696                if (this.axisX2 && 0 < this.axisX2.length)
3697                    for (h = 0; h < this.axisX2.length; h++) this.axisX2[h].crosshair && this.axisX2[h].crosshair.enabled && this.axisX2[h].renderCrosshair(a, f);
3698                if (this.axisY && 0 < this.axisY.length)
3699                    for (h = 0; h < this.axisY.length; h++) this.axisY[h].crosshair &&
3700                    this.axisY[h].crosshair.enabled && this.axisY[h].renderCrosshair(a, f);
3701                if (this.axisY2 && 0 < this.axisY2.length)
3702                    for (h = 0; h < this.axisY2.length; h++) this.axisY2[h].crosshair && this.axisY2[h].crosshair.enabled && this.axisY2[h].renderCrosshair(a, f)
3703            }
3704        };
3705        q.prototype._plotAreaMouseMove = function(a, f) {
3706            if (this.isDrag && "none" !== this.plotInfo.axisPlacement) {
3707                var b = 0,
3708                    c = 0,
3709                    e = b = null,
3710                    e = 0 <= this.zoomType.indexOf("x"),
3711                    g = 0 <= this.zoomType.indexOf("y"),
3712                    h = this;
3713                "xySwapped" === this.plotInfo.axisPlacement && (b = g, g = e, e = b);
3714                b = this.dragStartPoint.x -
3715                    a;
3716                c = this.dragStartPoint.y - f;
3717                2 < Math.abs(b) && 8 > Math.abs(b) && (this.panEnabled || this.zoomEnabled) ? this.toolTip.hide() : this.panEnabled || this.zoomEnabled || this.toolTip.mouseMoveHandler(a, f);
3718                if ((!e || 2 < Math.abs(b) || !g || 2 < Math.abs(c)) && (this.panEnabled || this.zoomEnabled))
3719                    if (this.panEnabled) e = {
3720                        x1: e ? this.plotArea.x1 + b : this.plotArea.x1,
3721                        y1: g ? this.plotArea.y1 + c : this.plotArea.y1,
3722                        x2: e ? this.plotArea.x2 + b : this.plotArea.x2,
3723                        y2: g ? this.plotArea.y2 + c : this.plotArea.y2
3724                    }, clearTimeout(h._panTimerId), h._panTimerId = setTimeout(function(c,
3725                                                                                        b, e, d) {
3726                        return function() {
3727                            h._zoomPanToSelectedRegion(c, b, e, d, !0) && (h._dispatchRangeEvent("rangeChanging", "pan"), h.render(), h._dispatchRangeEvent("rangeChanged", "pan"), h.dragStartPoint.x = a, h.dragStartPoint.y = f)
3728                        }
3729                    }(e.x1, e.y1, e.x2, e.y2), 0);
3730                    else if (this.zoomEnabled) {
3731                        this.resetOverlayedCanvas();
3732                        b = this.overlaidCanvasCtx.globalAlpha;
3733                        this.overlaidCanvasCtx.fillStyle = "#A89896";
3734                        var c = e ? this.dragStartPoint.x : this.plotArea.x1,
3735                            l = g ? this.dragStartPoint.y : this.plotArea.y1,
3736                            t = e ? a - this.dragStartPoint.x : this.plotArea.x2 -
3737                                this.plotArea.x1,
3738                            k = g ? f - this.dragStartPoint.y : this.plotArea.y2 - this.plotArea.y1;
3739                        this.validateRegion(c, l, e ? a : this.plotArea.x2 - this.plotArea.x1, g ? f : this.plotArea.y2 - this.plotArea.y1, "xy" !== this.zoomType).isValid && (this.resetOverlayedCanvas(), this.overlaidCanvasCtx.fillStyle = "#99B2B5");
3740                        this.overlaidCanvasCtx.globalAlpha = 0.7;
3741                        this.overlaidCanvasCtx.fillRect(c, l, t, k);
3742                        this.overlaidCanvasCtx.globalAlpha = b
3743                    }
3744            } else if (this.toolTip.mouseMoveHandler(a, f), "none" !== this.plotInfo.axisPlacement) {
3745                if (this.axisX && 0 < this.axisX.length)
3746                    for (e =
3747                             0; e < this.axisX.length; e++) this.axisX[e].crosshair && this.axisX[e].crosshair.enabled && this.axisX[e].renderCrosshair(a, f);
3748                if (this.axisX2 && 0 < this.axisX2.length)
3749                    for (e = 0; e < this.axisX2.length; e++) this.axisX2[e].crosshair && this.axisX2[e].crosshair.enabled && this.axisX2[e].renderCrosshair(a, f);
3750                if (this.axisY && 0 < this.axisY.length)
3751                    for (e = 0; e < this.axisY.length; e++) this.axisY[e].crosshair && this.axisY[e].crosshair.enabled && this.axisY[e].renderCrosshair(a, f);
3752                if (this.axisY2 && 0 < this.axisY2.length)
3753                    for (e = 0; e < this.axisY2.length; e++) this.axisY2[e].crosshair &&
3754                    this.axisY2[e].crosshair.enabled && this.axisY2[e].renderCrosshair(a, f)
3755            }
3756        };
3757        q.prototype._zoomPanToSelectedRegion = function(a, f, b, c, e) {
3758            a = this.validateRegion(a, f, b, c, e);
3759            f = a.axesWithValidRange;
3760            b = a.axesRanges;
3761            if (a.isValid)
3762                for (c = 0; c < f.length;
3762 c++) e = b[c], f[c].setViewPortRange(e.val1, e.val2);
3763            return a.isValid
3764        };
3765        q.prototype.validateRegion = function(a, f, b, c, e) {
3766            e = e || !1;
3767            for (var g = 0 <= this.zoomType.indexOf("x"), h = 0 <= this.zoomType.indexOf("y"), l = !1, t = [], k = [], r = [], p = 0; p < this._axes.length; p++)("axisX" === this._axes[p].type &&
3768            g || "axisY" === this._axes[p].type && h) && k.push(this._axes[p]);
3769            for (h = 0; h < k.length; h++) {
3770                var p = k[h],
3771                    g = !1,
3772                    n = p.convertPixelToValue({
3773                        x: a,
3774                        y: f
3775                    }),
3776                    d = p.convertPixelToValue({
3777                        x: b,
3778                        y: c
3779                    });
3780                if (n > d) var w = d,
3781                    d = n,
3782                    n = w;
3783                if (p.scaleBreaks)
3784                    for (w = 0; !g && w < p.scaleBreaks._appliedBreaks.length; w++) g = p.scaleBreaks._appliedBreaks[w].startValue <= n && p.scaleBreaks._appliedBreaks[w].endValue >= d;
3785                if (isFinite(p.dataInfo.minDiff))
3786                    if (w = p.getApparentDifference(n, d, null, !0), !(g || !(this.panEnabled && p.scaleBreaks && p.scaleBreaks._appliedBreaks.length) &&
3787                        (p.logarithmic && w < Math.pow(p.dataInfo.minDiff, 3) || !p.logarithmic && w < 3 * Math.abs(p.dataInfo.minDiff)) || n < p.minimum || d > p.maximum)) t.push(p), r.push({
3788                        val1: n,
3789                        val2: d
3790                    }), l = !0;
3791                    else if (!e) {
3792                        l = !1;
3793                        break
3794                    }
3795            }
3796            return {
3797                isValid: l,
3798                axesWithValidRange: t,
3799                axesRanges: r
3800            }
3801        };
3802        q.prototype.preparePlotArea = function() {
3803            var a = this.plotArea;
3804            !v && (0 < a.x1 || 0 < a.y1) && a.ctx.translate(a.x1, a.y1);
3805            if ((this.axisX[0] || this.axisX2[0]) && (this.axisY[0] || this.axisY2[0])) {
3806                var f = this.axisX[0] ? this.axisX[0].lineCoordinates : this.axisX2[0].lineCoordinates;
3807                if (this.axisY && 0 < this.axisY.length && this.axisY[0]) {
3808                    var b = this.axisY[0];
3809                    a.x1 = f.x1 < f.x2 ? f.x1 : b.lineCoordinates.x1;
3810                    a.y1 = f.y1 < b.lineCoordinates.y1 ? f.y1 : b.lineCoordinates.y1;
3811                    a.x2 = f.x2 > b.lineCoordinates.x2 ? f.x2 : b.lineCoordinates.x2;
3812                    a.y2 = f.y2 > f.y1 ? f.y2 : b.lineCoordinates.y2;
3813                    a.width = a.x2 - a.x1;
3814                    a.height = a.y2 - a.y1
3815                }
3816                this.axisY2 && 0 < this.axisY2.length && this.axisY2[0] && (b = this.axisY2[0], a.x1 = f.x1 < f.x2 ? f.x1 : b.lineCoordinates.x1, a.y1 = f.y1 < b.lineCoordinates.y1 ? f.y1 : b.lineCoordinates.y1, a.x2 = f.x2 > b.lineCoordinates.x2 ?
3817                    f.x2 : b.lineCoordinates.x2, a.y2 = f.y2 > f.y1 ? f.y2 : b.lineCoordinates.y2, a.width = a.x2 - a.x1, a.height = a.y2 - a.y1)
3818            } else f = this.layoutManager.getFreeSpace(), a.x1 = f.x1, a.x2 = f.x2, a.y1 = f.y1, a.y2 = f.y2, a.width = f.width, a.height = f.height;
3819            v || (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));
3820            a.layoutManager = new Ea(a.x1, a.y1, a.x2, a.y2, 2)
3821        };
3822        q.prototype.renderIndexLabels = function(a) {
3823            var f = a || this.plotArea.ctx,
3824                b = this.plotArea,
3825                c = 0,
3826                e = 0,
3827                g = 0,
3828                h = 0,
3829                l = c = h = e = g = 0,
3830                t = 0;
3831            for (a = 0; a < this._indexLabels.length; a++) {
3832                var k = this._indexLabels[a],
3833                    r = k.chartType.toLowerCase(),
3834                    p, n, l = na("indexLabelFontColor", k.dataPoint, k.dataSeries
3834),
3835                    t = na("indexLabelFontSize", k.dataPoint, k.dataSeries);
3836                p = na("indexLabelFontFamily", k.dataPoint, k.dataSeries);
3837                n = na("indexLabelFontStyle", k.dataPoint, k.dataSeries);
3838                var h = na("indexLabelFontWeight", k.dataPoint, k.dataSeries),
3839                    d = na("indexLabelBackgroundColor", k.dataPoint, k.dataSeries),
3840                    e = na("indexLabelMaxWidth", k.dataPoint, k.dataSeries),
3841                    g = na("indexLabelWrap", k.dataPoint, k.dataSeries),
3842                    w = na("indexLabelLineDashType", k.dataPoint, k.dataSeries),
3843                    m = na("indexLabelLineColor", k.dataPoint, k.dataSeries),
3844                    D = y(k.dataPoint.indexLabelLineThickness) ? y(k.dataSeries.options.indexLabelLineThickness) ? 0 : k.dataSeries.options.indexLabelLineThickness : k.dataPoint.indexLabelLineThickness,
3845                    c = 0 < D ? Math.min(10, ("normal" === this.plotInfo.axisPlacement ? this.plotArea.height : this.plotArea.width) << 0) : 0,
3846                    u = {
3847                        percent: null,
3848                        total: null
3849                    },
3850                    S = null;
3851                if (0 <= k.dataSeries.type.indexOf("stacked") ||
3852                    "pie" === k.dataSeries.type || "doughnut" === k.dataSeries.type) u = this.getPercentAndTotal(k.dataSeries, k.dataPoint);
3853                if (k.dataSeries.indexLabelFormatter || k.dataPoint.indexLabelFormatter) S = {
3854                    chart: this,
3855                    dataSeries: k.dataSeries,
3856                    dataPoint: k.dataPoint,
3857                    index: k.indexKeyword,
3858                    total: u.total,
3859                    percent: u.percent
3860                };
3861                var ca = k.dataPoint.indexLabelFormatter ? k.dataPoint.indexLabelFormatter(S) : k.dataPoint.indexLabel ? this.replaceKeywordsWithValue(k.dataPoint.indexLabel, k.dataPoint, k.dataSeries, null, k.indexKeyword) : k.dataSeries.indexLabelFormatter ?
3862                    k.dataSeries.indexLabelFormatter(S) : k.dataSeries.indexLabel ? this.replaceKeywordsWithValue(k.dataSeries.indexLabel, k.dataPoint, k.dataSeries, null, k.indexKeyword) : null;
3863                if (null !== ca && "" !== ca) {
3864                    var u = na("indexLabelPlacement", k.dataPoint, k.dataSeries),
3865                        S = na("indexLabelOrientation", k.dataPoint, k.dataSeries),
3866                        s = k.direction,
3867                        q = k.dataSeries.axisX,
3868                        A = k.dataSeries.axisY,
3869                        x = !1,
3870                        d = new la(f, {
3871                            x: 0,
3872                            y: 0,
3873                            maxWidth: e ? e : 0.5 * this.width,
3874                            maxHeight: g ? 5 * t : 1.5 * t,
3875                            angle: "horizontal" === S ? 0 : -90,
3876                            text: ca,
3877                            padding: 0,
3878                            backgroundColor: d,
3879                            horizontalAlign: "left",
3880                            fontSize: t,
3881                            fontFamily: p,
3882                            fontWeight: h,
3883                            fontColor: l,
3884                            fontStyle: n,
3885                            textBaseline: "top"
3886                        });
3887                    d.measureText();
3888                    k.dataSeries.indexLabelMaxWidth = d.maxWidth;
3889                    if ("stackedarea100" === r) {
3890                        if (k.point.x < b.x1 || k.point.x > b.x2 || k.point.y < b.y1 - 1 || k.point.y > b.y2 + 1) continue
3891                    } else if ("rangearea" === r || "rangesplinearea" === r) {
3892                        if (k.dataPoint.x < q.viewportMinimum || k.dataPoint.x > q.viewportMaximum || Math.max.apply(null, k.dataPoint.y) < A.viewportMinimum || Math.min.apply(null, k.dataPoint.y) > A.viewportMaximum) continue
3893                    } else if (0 <= r.indexOf("line") ||
3894                        0 <= r.indexOf("area") || 0 <= r.indexOf("bubble") || 0 <= r.indexOf("scatter")) {
3895                        if (k.dataPoint.x < q.viewportMinimum || k.dataPoint.x > q.viewportMaximum || k.dataPoint.y < A.viewportMinimum || k.dataPoint.y > A.viewportMaximum) continue
3896                    } else if (0 <= r.indexOf("column") || "waterfall" === r || "error" === r && !k.axisSwapped) {
3897                        if (k.dataPoint.x < q.viewportMinimum || k.dataPoint.x > q.viewportMaximum || k.bounds.y1 > b.y2 || k.bounds.y2 < b.y1) continue
3898                    } else if (0 <= r.indexOf("bar") || "error" === r) {
3899                        if (k.dataPoint.x < q.viewportMinimum || k.dataPoint.x > q.viewportMaximum ||
3900                            k.bounds.x1 >
3900 b.x2 || k.bounds.x2 < b.x1) continue
3901                    } else if ("candlestick" === r || "ohlc" === r) {
3902                        if (k.dataPoint.x < q.viewportMinimum || k.dataPoint.x > q.viewportMaximum || Math.max.apply(null, k.dataPoint.y) < A.viewportMinimum || Math.min.apply(null, k.dataPoint.y) > A.viewportMaximum) continue
3903                    } else if (k.dataPoint.x < q.viewportMinimum || k.dataPoint.x > q.viewportMaximum) continue;
3904                    e = h = 2;
3905                    "horizontal" === S ? (l = d.width, t = d.height) : (t = d.width, l = d.height);
3906                    if ("normal" === this.plotInfo.axisPlacement) {
3907                        if (0 <= r.indexOf("line") || 0 <= r.indexOf("area")) u =
3908                            "auto", h = 4;
3909                        else if (0 <= r.indexOf("stacked")) "auto" === u && (u = "inside");
3910                        else if ("bubble" === r || "scatter" === r) u = "inside";
3911                        p = k.point.x - l / 2;
3912                        "inside" !== u ? (e = b.y1, g = b.y2, 0 < s ? (n = k.point.y - t - h - c, n < e && (n = "auto" === u ? Math.max(k.point.y, e) + h + c : e + h + c, x = n + t > k.point.y)) : (n = k.point.y + h + c, n > g - t - h - c && (n = "auto" === u ? Math.min(k.point.y, g) - t - h - c : g - t - h - c, x = n < k.point.y))) : (e = Math.max(k.bounds.y1, b.y1), g = Math.min(k.bounds.y2, b.y2), c = 0 <= r.indexOf("range") || "error" === r ? 0 < s ? Math.max(k.bounds.y1, b.y1) + t / 2 + h : Math.min(k.bounds.y2, b.y2) -
3913                            t / 2 - h : (Math.max(k.bounds.y1, b.y1) + Math.min(k.bounds.y2, b.y2)) / 2, 0 < s ? (n = Math.max(k.point.y, c) - t / 2, n < e && ("bubble" === r || "scatter" === r) && (n = Math.max(k.point.y - t - h, b.y1 + h))) : (n = Math.min(k.point.y, c) - t / 2, n > g - t - h && ("bubble" === r || "scatter" === r) && (n = Math.min(k.point.y + h, b.y2 - t - h))), n = Math.min(n, g - t))
3914                    } else 0 <= r.indexOf("line") || 0 <= r.indexOf("area") || 0 <= r.indexOf("scatter") ? (u = "auto", e = 4) : 0 <= r.indexOf("stacked") ? "auto" === u && (u = "inside") : "bubble" === r && (u = "inside"), n = k.point.y - t / 2, "inside" !== u ? (h = b.x1, g = b.x2,
3915                        0 > s ? (p = k.point.x - l - e - c, p < h && (p = "auto" === u ? Math.max(k.point.x, h) + e + c : h + e + c, x = p + l > k.point.x)) : (p = k.point.x + e + c, p > g - l - e - c && (p = "auto" === u ? Math.min(k.point.x, g) - l - e - c : g - l - e - c, x = p < k.point.x))) : (h = Math.max(k.bounds.x1, b.x1), Math.min(k.bounds.x2, b.x2), c = 0 <= r.indexOf("range") || "error" === r ? 0 > s ? Math.max(k.bounds.x1, b.x1) + l / 2 + e : Math.min(k.bounds.x2, b.x2) - l / 2 - e : (Math.max(k.bounds.x1, b.x1) + Math.min(k.bounds.x2, b.x2)) / 2, p = 0 > s ? Math.max(k.point.x, c) - l / 2 : Math.min(k.point.x, c) - l / 2, p = Math.max(p, h));
3916                    "vertical" === S && (n +=
3917                        t);
3918                    d.x = p;
3919                    d.y = n;
3920                    d.render(!0);
3921                    D && ("inside" !== u && (0 > r.indexOf("bar") && ("error" !== r || !k.axisSwapped) && k.point.x > b.x1 && k.point.x < b.x2 || !x) && (0 > r.indexOf("column") && ("error" !== r || k.axisSwapped) && k.point.y > b.y1 && k.point.y < b.y2 || !x)) && (f.lineWidth = D, f.strokeStyle = m ? m : "gray", f.setLineDash && f.setLineDash(G(w, D)), f.beginPath(), f.moveTo(k.point.x, k.point.y), 0 <= r.indexOf("bar") || "error" === r && k.axisSwapped ? f.lineTo(p + (0 < k.direction ? 0 : l), n + ("horizontal" === S ? t : -t) / 2) : 0 <= r.indexOf("column") || "error" === r && !k.axisSwapped ?
3922                        f.lineTo(p + l / 2, n + ((0 < k.direction ? t : -t) + ("horizontal" === S ? t : -t)) / 2) : f.lineTo(p + l / 2, n + ((n < k.point.y ? t : -t) + ("horizontal" === S ? t : -t)) / 2), f.stroke())
3923                }
3924            }
3925            f = {
3926                source: f,
3927                dest: this.plotArea.ctx,
3928                animationCallback: H.fadeInAnimation,
3929                easingFunction: H.easing.easeInQuad,
3930                animationBase: 0,
3931                startTimePercent: 0.7
3932            };
3933            for (a = 0; a < this._indexLabels.length;
3933 a++) k = this._indexLabels[a], d = na("indexLabelBackgroundColor", k.dataPoint, k.dataSeries), k.dataSeries.indexLabelBackgroundColor = y(d) ? v ? "transparent" : null : d;
3934            return f
3935        };
3936        q.prototype.renderLine =
3937            function(a) {
3938                var f = a.targetCanvasCtx || this.plotArea.ctx,
3939                    b = v ? this._preRenderCtx : f;
3940                if (!(0 >= a.dataSeriesIndexes.length)) {
3941                    var c = this._eventManager.ghostCtx;
3942                    b.save();
3943                    var e = this.plotArea;
3944                    b.beginPath();
3945                    b.rect(e.x1, e.y1, e.width, e.height);
3946                    b.clip();
3947                    for (var g = [], h, l = 0; l < a.dataSeriesIndexes.length; l++) {
3948                        var t = a.dataSeriesIndexes[l],
3949                            k = this.data[t];
3950                        b.lineWidth = k.lineThickness;
3951                        var r = k.dataPoints,
3952                            p = "solid";
3953                        if (b.setLineDash) {
3954                            var n = G(k.nullDataLineDashType, k.lineThickness),
3955                                p = k.lineDashType,
3956                                d = G(p, k.lineThickness);
3957                            b.setLineDash(d)
3958                        }
3959                        var w =
3960                            k.id;
3961                        this._eventManager.objectMap[w] = {
3962                            objectType: "dataSeries",
3963                            dataSeriesIndex: t
3964                        };
3965                        w = R(w);
3966                        c.strokeStyle = w;
3967                        c.lineWidth = 0 < k.lineThickness ? Math.max(k.lineThickness, 4) : 0;
3968                        var w = k._colorSet,
3969                            m = w = k.lineColor = k.options.lineColor ? k.options.lineColor : w[0];
3970                        b.strokeStyle = w;
3971                        var D = !0,
3972                            u = 0,
3973                            S, ca;
3974                        b.beginPath();
3975                        if (0 < r.length) {
3976                            for (var s = !1, u = 0; u < r.length; u++)
3977                                if (S = r[u].x.getTime ? r[u].x.getTime() : r[u].x, !(S < a.axisX.dataInfo.viewPortMin || S > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !s)))
3978                                    if ("number" !== typeof r[u].y) 0 <
3979                                    u && !(k.connectNullData || s || D) && (b.stroke(), v && c.stroke()), s = !0;
3980                                    else {
3981                                        S = a.axisX.convertValueToPixel(S);
3982                                        ca = a.axisY.convertValueToPixel(r[u].y);
3983                                        var q = k.dataPointIds[u];
3984                                        this._eventManager.objectMap[q] = {
3985                                            id: q,
3986                                            objectType: "dataPoint",
3987                                            dataSeriesIndex: t,
3988                                            dataPointIndex: u,
3989                                            x1: S,
3990                                            y1: ca
3991                                        };
3992                                        D || s ? (!D && k.connectNullData ? (b.setLineDash && (k.options.nullDataLineDashType || p === k.lineDashType && k.lineDashType !== k.nullDataLineDashType) && (b.stroke(), b.beginPath(), b.moveTo(h.x, h.y), p = k.nullDataLineDashType, b.setLineDash(n)), b.lineTo(S,
3993                                            ca), v && c.lineTo(S, ca)) : (b.beginPath(), b.moveTo(S, ca), v && (c.beginPath(), c.moveTo(S, ca))), s = D = !1) : (b.lineTo(S, ca), v && c.lineTo(S, ca), 0 == u % 500 && (b.stroke(), b.beginPath(), b.moveTo(S, ca), v && (c.stroke(), c.beginPath(), c.moveTo(S, ca))));
3994                                        h = {
3995                                            x: S,
3996                                            y: ca
3997                                        };
3998                                        u < r.length - 1 && (m !== (r[u].lineColor || w) || p !== (r[u].lineDashType || k.lineDashType)) && (b.stroke(), b.beginPath(), b.moveTo(S, ca), m = r[u].lineColor || w, b.strokeStyle = m, b.setLineDash && (r[u].lineDashType ? (p = r[u].lineDashType, b.setLineDash(G(p, k.lineThickness))) : (p = k.lineDashType,
3999                                            b.setLineDash(d))));
4000                                        if (0 < r[u].markerSize || 0 < k.markerSize) {
4001                                            var A = k.getMarkerProperties(u, S, ca, b);
4002                                            g.push(A);
4003                                            q = R(q);
4004                                            v && g.push({
4005                                                x: S,
4006                                                y: ca,
4007                                                ctx: c,
4008                                                type: A.type,
4009                                                size: A.size,
4010                                                color: q,
4011                                                borderColor: q,
4012                                                borderThickness: A.borderThickness
4013                                            })
4014                                        }(r[u].indexLabel || k.indexLabel || r[u].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({
4015                                            chartType: "line",
4016                                            dataPoint: r[u],
4017                                            dataSeries: k,
4018                                            point: {
4019                                                x: S,
4020                                                y: ca
4021                                            },
4022                                            direction: 0 > r[u].y === a.axisY.reversed ? 1 : -1,
4023                                            color: w
4024                                        })
4025                                    }
4026                            b.stroke();
4027                            v && c.stroke()
4028                        }
4029                    }
4030                    ja.drawMarkers(g);
4031                    v && (f.drawImage(this._preRenderCanvas,
4032                        0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.clearRect(e.x1, e.y1, e.width, e.height), c.beginPath());
4033                    b.restore();
4034                    b.beginPath();
4035                    return {
4036                        source: f,
4037                        dest: this.plotArea.ctx,
4038                        animationCallback: H.xClipAnimation,
4039                        easingFunction: H.easing.linear,
4040                        animationBase: 0
4041                    }
4042                }
4043            };
4044        q.prototype.renderStepLine = function(a) {
4045            var f = a.targetCanvasCtx || this.plotArea.ctx,
4046                b = v ? this._preRenderCtx : f;
4047            if (!(0 >= a.dataSeriesIndexes.length)) {
4048                var c = this._eventManager.ghostCtx;
4049                b.save();
4050                var e = this.plotArea;
4051                b.beginPath();
4052                b.rect(e.x1, e.y1, e.width, e.height);
4053                b.clip();
4054                for (var g = [], h, l = 0; l < a.dataSeriesIndexes.length; l++) {
4055                    var t = a.dataSeriesIndexes[l],
4056                        k = this.data[t];
4057                    b.lineWidth = k.lineThickness;
4058                    var r = k.dataPoints,
4059                        p = "solid";
4060                    if (b.setLineDash) {
4061                        var n = G(k.nullDataLineDashType, k.lineThickness),
4062                            p = k.lineDashType,
4063                            d = G(p, k.lineThickness);
4064                        b.setLineDash(d)
4065                    }
4066                    var w = k.id;
4067                    this._eventManager.objectMap[w] = {
4068                        objectType: "dataSeries",
4069                        dataSeriesIndex: t
4070                    };
4071                    w = R(w);
4072                    c.strokeStyle = w;
4073                    c.lineWidth = 0 < k.lineThickness ? Math.max(k.lineThickness, 4) : 0;
4074                    var w = k._colorSet,
4075                        m = w = k.lineColor = k.options.lineColor ? k.options.lineColor : w[0];
4076                    b.strokeStyle = w;
4077                    var D = !0,
4078                        u = 0,
4079                        S, ca;
4080                    b.beginPath();
4081                    if (0 < r.length) {
4082                        for (var s = !1, u = 0; u < r.length; u++)
4083                            if (S = r[u].getTime ? r[u].x.getTime() : r[u].x, !(S < a.axisX.dataInfo.viewPortMin || S > a.axisX.dataInfo.viewPortMax &&
4084                                (!k.connectNullData || !s)))
4085                                if ("number" !== typeof r[u].y) 0 < u && !(k.connectNullData || s || D) && (b.stroke(), v && c.stroke()), s = !0;
4086                                else {
4087                                    var q = ca;
4088                                    S = a.axisX.convertValueToPixel(S);
4089                                    ca = a.axisY.convertValueToPixel(r[u].y);
4090                                    var A = k.dataPointIds[u];
4091                                    this._eventManager.objectMap[A] = {
4092                                        id: A,
4093                                        objectType: "dataPoint",
4094                                        dataSeriesIndex: t,
4095                                        dataPointIndex: u,
4096                                        x1: S,
4097                                        y1: ca
4098                                    };
4099                                    D || s ? (!D && k.connectNullData ? (b.setLineDash && (k.options.nullDataLineDashType || p === k.lineDashType && k.lineDashType !== k.nullDataLineDashType) && (b.stroke(), b.beginPath(),
4100                                        b.moveTo(h.x, h.y), p = k.nullDataLineDashType, b.setLineDash(n)), b.lineTo(S, q), b.lineTo(S, ca), v && (c.lineTo(S, q), c.lineTo(S, ca))) : (b.beginPath(), b.moveTo(S, ca), v && (c.beginPath(), c.moveTo(S, ca))), s = D = !1) : (b.lineTo(S, q), v && c.lineTo(S, q), b.lineTo(S, ca), v && c.lineTo(S, ca), 0 == u % 500 && (b.stroke(), b.beginPath(), b.moveTo(S, ca), v && (c.stroke(), c.beginPath(), c.moveTo(S, ca))));
4101                                    h = {
4102                                        x: S,
4103                                        y: ca
4104                                    };
4105                                    u < r.length - 1 && (m !== (r[u].lineColor || w) || p !== (r[u].lineDashType || k.lineDashType)) && (b.stroke(), b.beginPath(), b.moveTo(S, ca), m = r[u].lineColor ||
4106                                        w, b.strokeStyle = m, b.setLineDash && (r[u].lineDashType ? (p = r[u].lineDashType, b.setLineDash(G(p, k.lineThickness))) : (p = k.lineDashType, b.setLineDash(d))));
4107                                    if (0 < r[u].markerSize || 0 < k.markerSize) q = k.getMarkerProperties(u, S, ca, b), g.pu
4107sh(q), A = R(A), v && g.push({
4108                                        x: S,
4109                                        y: ca,
4110                                        ctx: c,
4111                                        type: q.type,
4112                                        size: q.size,
4113                                        color: A,
4114                                        borderColor: A,
4115                                        borderThickness: q.borderThickness
4116                                    });
4117                                    (r[u].indexLabel || k.indexLabel || r[u].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({
4118                                        chartType: "stepLine",
4119                                        dataPoint: r[u],
4120                                        dataSeries: k,
4121                                        point: {
4122                                            x: S,
4123                                            y: ca
4124                                        },
4125                                        direction: 0 > r[u].y === a.axisY.reversed ? 1 : -1,
4126                                        color: w
4127                                    })
4128                                }
4129                        b.stroke();
4130                        v && c.stroke()
4131                    }
4132                }
4133                ja.drawMarkers(g);
4134                v && (f.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.clearRect(e.x1, e.y1, e.width,
4135                    e.height), c.beginPath());
4136                b.restore();
4137                b.beginPath();
4138                return {
4139                    source: f,
4140                    dest: this.plotArea.ctx,
4141                    animationCallback: H.xClipAnimation,
4142                    easingFunction: H.easing.linear,
4143                    animationBase: 0
4144                }
4145            }
4146        };
4147        q.prototype.renderSpline = function(a) {
4148            function f(a) {
4149                a = x(a, 2);
4150                if (0 < a.length) {
4151                    c.beginPath();
4152                    v && e.beginPath();
4153                    c.moveTo(a[0].x, a[0].y);
4154                    a[0].newStrokeStyle && (c.strokeStyle = a[0].newStrokeStyle);
4155                    a[0].newLineDashArray && c.setLineDash(a[0].newLineDashArray);
4156                    v && e.moveTo(a[0].x, a[0].y);
4157                    for (var b = 0; b < a.length - 3; b += 3)
4158                        if (c.bezierCurveTo(a[b +
4159                            1].x, a[b + 1].y, a[b + 2].x, a[b + 2].y, a[b + 3].x, a[b + 3].y), v && e.bezierCurveTo(a[b + 1].x, a[b + 1].y, a[b + 2].x, a[b + 2].y, a[b + 3].x, a[b + 3].y), 0 < b && 0 === b % 3E3 || a[b + 3].newStrokeStyle || a[b + 3].newLineDashArray) c.stroke(), c.beginPath(), c.moveTo(a[b + 3].x, a[b + 3].y), a[b + 3].newStrokeStyle && (c.strokeStyle = a[b + 3].newStrokeStyle), a[b + 3].newLineDashArray && c.setLineDash(a[b + 3].newLineDashArray), v && (e.stroke(), e.beginPath(), e.moveTo(a[b + 3].x, a[b + 3].y));
4160                    c.stroke();
4161                    v && e.stroke()
4162                }
4163            }
4164            var b = a.targetCanvasCtx || this.plotArea.ctx,
4165                c = v ? this._preRenderCtx :
4166                    b;
4167            if (!(0 >= a.dataSeriesIndexes.length)) {
4168                var e = this._eventManager.ghostCtx;
4169                c.save();
4170                var g = this.plotArea;
4171                c.beginPath();
4172                c.rect(g.x1, g.y1, g.width, g.height);
4173                c.clip();
4174                for (var h = [], l = 0; l < a.dataSeriesIndexes.length; l++) {
4175                    var t = a.dataSeriesIndexes[l],
4176                        k = this.data[t];
4177                    c.lineWidth = k.lineThickness;
4178                    var r = k.dataPoints,
4179                        p = "solid";
4180                    if (c.setLineDash) {
4181                        var n = G(k.nullDataLineDashType, k.lineThickness),
4182                            p = k.lineDashType,
4183                            d = G(p, k.lineThickness);
4184                        c.setLineDash(d)
4185                    }
4186                    var w = k.id;
4187                    this._eventManager.objectMap[w] = {
4188                        objectType: "dataSeries",
4189                        dataSeriesIndex: t
4190                    };
4191                    w = R(w);
4192                    e.strokeStyle = w;
4193                    e.lineWidth = 0 < k.lineThickness ? Math.max(k.lineThickness, 4) : 0;
4194                    var w = k._colorSet,
4195                        m = w = k.lineColor = k.options.lineColor ? k.options.lineColor : w[0];
4196                    c.strokeStyle = w;
4197                    var D = 0,
4198                        u, S, q = [];
4199                    c.beginPath();
4200                    if (0 < r.length)
4201                        for (S = !1, D = 0; D < r.length; D++)
4202                            if (u = r[D].getTime ? r[D].x.getTime() : r[D].x, !(u < a.axisX.dataInfo.viewPortMin || u > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !S)))
4203                                if ("number" !== typeof r[D].y) 0 < D && !S && (k.connectNullData ? c.set
4203LineDash && (0 < q.length && (k.options.nullDataLineDashType ||
4204                                    !r[D - 1].lineDashType)) && (q[q.length - 1].newLineDashArray = n, p = k.nullDataLineDashType) : (f(q), q = [])), S = !0;
4205                                else {
4206                                    u = a.axisX.convertValueToPixel(u);
4207                                    S = a.axisY.convertValueToPixel(r[D].y);
4208                                    var s = k.dataPointIds[D];
4209                                    this._eventManager.objectMap[s] = {
4210                                        id: s,
4211                                        objectType: "dataPoint",
4212                                        dataSeriesIndex: t,
4213                                        dataPointIndex: D,
4214                                        x1: u,
4215                                        y1: S
4216                                    };
4217                                    q[q.length] = {
4218                                        x: u,
4219                                        y: S
4220                                    };
4221                                    D < r.length - 1 && (m !== (r[D].lineColor || w) || p !== (r[D].lineDashType || k.lineDashType)) && (m = r[D].lineColor || w, q[q.length - 1].newStrokeStyle = m, c.setLineDash && (r[D].lineDashType ? (p =
4222                                        r[D].lineDashType, q[q.length - 1].newLineDashArray = G(p, k.lineThickness)) : (p = k.lineDashType, q[q.length - 1].newLineDashArray = d)));
4223                                    if (0 < r[D].markerSize || 0 < k.markerSize) {
4224                                        var y = k.getMarkerProperties(D, u, S, c);
4225                                        h.push(y);
4226                                        s = R(s);
4227                                        v && h.push({
4228                                            x: u,
4229                                            y: S,
4230                                            ctx: e,
4231                                            type: y.type,
4232                                            size: y.size,
4233                                            color: s,
4234                                            borderColor: s,
4235                                            borderThickness: y.borderThickness
4236                                        })
4237                                    }(r[D].indexLabel || k.indexLabel || r[D].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({
4238                                        chartType: "spline",
4239                                        dataPoint: r[D],
4240                                        dataSeries: k,
4241                                        point: {
4242                                            x: u,
4243                                            y: S
4244                                        },
4245                                        direction: 0 >
4246                                        r[D].y === a.axisY.reversed ? 1 : -1,
4247                                        color: w
4248                                    });
4249                                    S = !1
4250                                }
4251                    f(q)
4252                }
4253                ja.drawMarkers(h);
4254                v && (b.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(g.x1, g.y1, g.width, g.height), e.beginPath());
4255                c.restore();
4256                c.beginPath();
4257                return {
4258                    source: b,
4259                    dest: this.plotArea.ctx,
4260                    animationCallback: H.xClipAnimation,
4261                    easingFunction: H.easing.linear,
4262                    animationBase: 0
4263                }
4264            }
4265        };
4266        var V = function(a, f, b, c, e, g, h, l, t, k, r, p, n) {
4267            "undefined" === typeof n && (n = 1);
4268            h = h || 0;
4269            l = l || "black";
4270            var d = 15 < c - f && 15 < e - b ? 8 : 0.35 * Math.min(c - f, e - b);
4271            a.beginPath();
4272            a.moveTo(f, b);
4273            a.save();
4274            a.fillStyle = g;
4275            a.globalAlpha = n;
4276            a.fillRect(f, b, c - f, e - b);
4277            a.globalAlpha = 1;
4278            0 < h && (n = 0 === h % 2 ? 0 : 0.5, a.beginPath(), a.lineWidth = h, a.strokeStyle = l, a.moveTo(f, b), a.rect(f - n, b - n, c - f + 2 * n, e - b + 2 * n), a.stroke());
4279            a.restore();
4280            !0 === t && (a.save(), a.beginPath(), a.moveTo(f, b), a.lineTo(f + d, b + d), a.lineTo(c - d, b + d), a.lineTo(c, b), a.closePath(), h = a.createLinearGradient((c + f) / 2, b + d, (c + f) / 2, b), h.addColorStop(0, g), h.addColorStop(1, "rgba(255, 255, 255, .4)"), a.fillStyle = h, a.fill(), a.restore());
4281            !0 === k && (a.save(), a.beginPath(), a.moveTo(f, e), a.lineTo(f + d, e - d), a.lineTo(c - d, e - d), a.lineTo(c, e), a.closePath(), h = a.createLinearGradient((c + f) / 2, e - d, (c + f) / 2, e), h.addColorStop(0, g), h.addColorStop(1, "rgba(255, 255, 255, .4)"), a.fillStyle =
4282                h, a.fill(), a.restore());
4283            !0 === r && (a.save(), a.beginPath(), a.moveTo(f, b), a.lineTo(f + d, b + d), a.lineTo(f + d, e - d), a.lineTo(f, e), a.closePath(), h = a.createLinearGradient(f + d, (e + b) / 2, f, (e + b) / 2), h.addColorStop(0, g), h.addColorStop(1, "rgba(255, 255, 255, 0.1)"), a.fillStyle = h, a.fill(), a.restore());
4284            !0 === p && (a.save(), a.beginPath(), a.moveTo(c, b), a.lineTo(c - d, b + d), a.lineTo(c - d, e - d), a.lineTo(c, e), h = a.createLinearGradient(c - d, (e + b) / 2, c, (e + b) / 2), h.addColorStop(0, g), h.addColorStop(1, "rgba(255, 255, 255, 0.1)"), a.fillStyle =
4285                h, h.addColorStop(0, g), h.addColorStop(1, "rgba(255, 255, 255, 0.1)"), a.fillStyle = h, a.fill(), a.closePath(), a.restore())
4286        };
4287        q.prototype.renderColumn = function(a) {
4288            var f = a.targetCanvasCtx || this.plotArea.ctx,
4289                b = v ? this._preRenderCtx : f;
4290            if (!(0 >= a.dataSeriesIndexes.length)) {
4291                var c = null,
4292                    e = this.plotArea,
4293                    g = 0,
4294                    h, l, t, k = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
4295                    g = this.dataPointMinWidth = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1,
4296                    r = this.dataPointMaxWidth =
4297                        this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : Math.min(0.15 * this.width, 0.9 * (this.plotArea.width / a.plotType.totalDataSeries)) << 0,
4298                    p = a.axisX.dataInfo.minDiff;
4299                isFinite(p) || (p = 0.3 * Math.abs(a.axisX.range));
4300                p = this.dataPointWidth = this.dataPointWidth ? this.dataPointWidth : 0.9 * (e.width * (a.axisX.logarithmic ? Math.log(p) / Math.log(a.axisX.range) : Math.abs(p) / Math.abs(a.axisX.range)) / a.plotType.totalDataSeries) << 0;
4301                this.dataPointMaxWidth && g > r && (g = Math.min(this.dataPointWidth ?
4302                    this.dataPointWidth : Infinity, r));
4303                !this.dataPointMaxWidth && (this.dataPointMinWidth && r < g) && (r = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, g));
4304                p < g && (p = g);
4305                p > r && (p = r);
4306                b.save();
4307                v && this._eventManager.ghostCtx.save();
4308                b.beginPath();
4309                b.rect(e.x1, e.y1, e.width, e.height);
4310                b.clip();
4311                v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip());
4312                for (r = 0; r < a.dataSeriesIndexes.length; r++) {
4313                    var n = a.dataSeriesIndexes[r],
4314                        d = this.data[n],
4315                        w = d.dataPoints;
4316                    if (0 < w.length)
4317                        for (var m = 5 < p && d.bevelEnabled ? !0 : !1, g = 0; g < w.length; g++)
4318                            if (w[g].getTime ? t = w[g].x.getTime() : t = w[g].x, !(t < a.axisX.dataInfo.viewPortMin || t > a.axisX.dataInfo.viewPortMax) && "number" === typeof w[g].y) {
4319                                h = a.axisX.convertValueToPixel(t);
4320                                l = a.axisY.convertValueToPixel(w[g].y);
4321                                h = a.axisX.reversed ? h + a.plotType.totalDataSeries * p / 2 - (a.previousDataSeriesCount + r) * p << 0 : h - a.plotType.totalDataSeries * p / 2 + (a.previousDataSeriesCount + r) * p << 0;
4322                                var D = a.axisX.reversed ? h - p << 0 : h + p << 0,
4323                                    u;
4324                                0 <= w[g].y ? u = k : (u =
4325                                    l, l = k);
4326                                l > u && (c = l, l = u, u = c);
4327                                c = w[g].color ? w[g].color : d._colorSet[g % d._colorSet.length];
4328                                V(b, h, l, D, u, c, 0, null, m && 0 <= w[g].y, 0 > w[g].y && m, !1, !1, d.fillOpacity);
4329                                c = d.dataPointIds[g];
4330                                this._eventManager.objectMap[c] = {
4331                                    id: c,
4332                                    objectType: "dataPoint",
4333                                    dataSeriesIndex: n,
4334                                    dataPointIndex: g,
4335                                    x1: h,
4336                                    y1: l,
4337                                    x2: D,
4338                                    y2: u
4339                                };
4340                                c = R(c);
4341                                v && V(this._eventManager.ghostCtx, h, l, D, u, c, 0, null, !1, !1, !1, !1);
4342                                (w[g].indexLabel || d.indexLabel || w[g].indexLabelFormatter || d.indexLabelFormatter) && this._indexLabels.push({
4343                                    chartType: "column",
4344                                    dataPoint: w[g],
4345                                    dataSeries: d,
4346                                    point: {
4347                                        x: h + (D - h) / 2,
4348                                        y: 0 > w[g].y === a.axisY.reversed ? l : u
4349                                    },
4350                                    direction: 0 >
4350 w[g].y === a.axisY.reversed ? 1 : -1,
4351                                    bounds: {
4352                                        x1: h,
4353                                        y1: Math.min(l, u),
4354                                        x2: D,
4355                                        y2: Math.max(l, u)
4356                                    },
4357                                    color: c
4358                                })
4359                            }
4360                }
4361                v && (f.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
4362                    0, 0, this.width, this.height), b.clearRect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.restore());
4363                b.restore();
4364                return {
4365                    source: f,
4366                    dest: this.plotArea.ctx,
4367                    animationCallback: H.yScaleAnimation,
4368                    easingFunction: H.easing.easeOutQuart,
4369                    animationBase: k < a.axisY.bounds.y1 ? a.axisY.bounds.y1 : k > a.axisY.bounds.y2 ? a.axisY.bounds.y2 : k
4370                }
4371            }
4372        };
4373        q.prototype.renderStackedColumn = function(a) {
4374            var f = a.targetCanvasCtx || this.plotArea.ctx,
4375                b = v ? this._preRenderCtx : f;
4376            if (!(0 >= a.dataSeriesIndexes.length)) {
4377                var c = null,
4378                    e = this.plotArea,
4379                    g = [],
4380                    h = [],
4381                    l = [],
4382                    t = [],
4383                    k = 0,
4384                    r, p, n = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
4385                    k = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1;
4386                r = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.15 * this.width << 0;
4387                var d = a.axisX.dataInfo.minDiff;
4388                isFinite(d) || (d = 0.3 * Math.abs(a.axisX.range));
4389                d = this.dataPointWidth ? this.dataPointWidth : 0.9 * (e.width * (a.axisX.logarithmic ? Math.log(d) / Math.log(a.axisX.range) : Math.abs(d) /
4390                        Math.abs(a.axisX.range)) / a.plotType.plotUnits.length) << 0;
4391                this.dataPointMaxWidth && k > r && (k = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, r));
4392                !this.dataPointMaxWidth && (this.dataPointMinWidth && r < k) && (r = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, k));
4393                d < k && (d = k);
4394                d > r && (d = r);
4395                b.save();
4396                v && this._eventManager.ghostCtx.save();
4397                b.beginPath();
4398                b.rect(e.x1, e.y1, e.width, e.height);
4399                b.clip();
4400                v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height),
4401                    this._eventManager.ghostCtx.clip());
4402                for (var w = 0; w < a.dataSeriesIndexes.length; w++) {
4403                    var m = a.dataSeriesIndexes[w],
4404                        D = this.data[m],
4405                        u = D.dataPoints;
4406                    if (0 < u.length) {
4407                        var q = 5 < d && D.bevelEnabled ? !0 : !1;
4408                        b.strokeStyle = "#4572A7 ";
4409                        for (k = 0; k < u.length; k++)
4410                            if (c = u[k].x.getTime ? u[k].x.getTime() : u[k].x, !(c < a.axisX.dataInfo.viewPortMin || c > a.axisX.dataInfo.viewPortMax) && "number" === typeof u[k].y) {
4411                                r = a.axisX.convertValueToPixel(c);
4412                                var s = r - a.plotType.plotUnits.length * d / 2 + a.index * d << 0,
4413                                    y = s + d << 0,
4414                                    B;
4415                                if (a.axisY.logarithmic || a.axisY.scaleBreaks &&
4416                                    0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 < u[k].y) l[c] = u[k].y + (l[c] ? l[c] : 0), 0 < l[c] && (p = a.axisY.convertValueToPixel(l[c]), B = "undefined" !== typeof g[c] ? g[c] : n, g[c] = p);
4417                                else if (a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 >= u[k].y) t[c] = u[k].y + (t[c] ? t[c] : 0), B = a.axisY.convertValueToPixel(t[c]), p = "undefined" !== typeof h[c] ? h[c] : n, h[c] = B;
4418                                else if (p = a.axisY.convertValueToPixel(u[k].y), 0 <= u[k].y) {
4419                                    var A = "undefined" !== typeof g[c] ? g[c] : 0;
4420                                    p -= A;
4421                                    B = n - A;
4422                                    g[c] = A + (B - p)
4423                                } else A = h[c] ? h[c] : 0, B = p + A,
4424                                    p = n + A, h[c] = A + (B - p);
4425                                c = u[k].color ? u[k].color : D._colorSet[k % D._colorSet.length];
4426                                V(b, s, p, y, B, c, 0, null, q && 0 <= u[k].y, 0 > u[k].y && q, !1, !1, D.fillOpacity);
4427                                c = D.dataPointIds[k];
4428                                this._eventManager.objectMap[c] = {
4429                                    id: c,
4430                                    objectType: "dataPoint",
4431                                    dataSeriesIndex: m,
4432                                    dataPointIndex: k,
4433                                    x1: s,
4434                                    y1: p,
4435                                    x2: y,
4436                                    y2: B
4437                                };
4438                                c = R(c);
4439                                v && V(this._eventManager.ghostCtx, s, p, y, B, c, 0, null, !1, !1, !1, !1);
4440                                (u[k].indexLabel || D.indexLabel || u[k].indexLabelFormatter || D.indexLabelFormatter) && this._indexLabels.push({
4441                                    chartType: "stackedColumn",
4442                                    dataPoint: u[k],
4443                                    dataSeries: D,
4444                                    point: {
4445                                        x: r,
4446                                        y: 0 <= u[k].y ? p : B
4447                                    },
4448                                    direction: 0 > u[k].y === a.axisY.reversed ? 1 : -1,
4449                                    bounds: {
4450                                        x1: s,
4451                                        y1: Math.min(p, B),
4452                                        x2: y,
4453                                        y2: Math.max(p, B)
4454                                    },
4455                                    color: c
4456                                })
4457                            }
4458                    }
4459                }
4460                v && (f.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height),
4461                    b.clearRect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.restore());
4462                b.restore();
4463                return {
4464                    source: f,
4465                    dest: this.plotArea.ctx,
4466                    animationCallback: H.yScaleAnimation,
4467                    easingFunction: H.easing.easeOutQuart,
4468                    animationBase: n < a.axisY.bounds.y1 ? a.axisY.bounds.y1 : n > a.axisY.bounds.y2 ? a.axisY.bounds.y2 : n
4469                }
4470            }
4471        };
4472        q.prototype.renderStackedColumn100 = function(a) {
4473            var f = a.targetCanvasCtx || this.plotArea.ctx,
4474                b = v ? this._preRenderCtx : f;
4475            if (!(0 >= a.dataSeriesIndexes.length)) {
4476                var c = null,
4477                    e = this.plotArea,
4478                    g = [],
4479                    h = [],
4480                    l = [],
4481                    t = [],
4482                    k = 0,
4483                    r, p, n = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
4484                    k = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1;
4485                r = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.15 * this.width << 0;
4486                var d = a.axisX.dataInfo.minDiff;
4487                isFinite(d) || (d = 0.3 * Math.abs(a.axisX.range));
4488                d = this.dataPointWidth ? this.dataPointWidth : 0.9 * (e.width * (a.axisX.logarithmic ? Math.log(d) / Math.log(a.axisX.range) : Math.abs(d) / Math.abs(a.axisX.range)) /
4489                    a.plotType.plotUnits.length) << 0;
4490                this.dataPointMaxWidth && k > r && (k = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, r));
4491                !this.dataPointMaxWidth && (this.dataPointMinWidth && r < k) && (r = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, k));
4492                d < k && (d = k);
4493                d > r && (d = r);
4494                b.save();
4495                v && this._eventManager.ghostCtx.save();
4496                b.beginPath();
4497                b.rect(e.x1, e.y1, e.width, e.height);
4498                b.clip();
4499                v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip());
4500                for (var w = 0; w < a.dataSeriesIndexes.length; w++) {
4501                    var m = a.dataSeriesIndexes[w],
4502                        D = this.data[m],
4503                        u = D.dataPoints;
4504                    if (0 < u.length)
4505                        for (var q = 5 < d && D.bevelEnabled ? !0 : !1, k = 0; k < u.length; k++)
4506                            if (c = u[k].x.getTime ? u[k].x.getTime() : u[k].x, !(c < a.axisX.dataInfo.viewPortMin || c > a.axisX.dataInfo.viewPortMax) && "number" === typeof u[k].y) {
4507                                r = a.axisX.convertValueToPixel(c);
4508                                p = 0 !== a.dataPointYSums[c] ? 100 * (u[k].y / a.dataPointYSums[c]) : 0;
4509                                var s = r - a.plotType.plotUnits.length * d / 2 + a.index * d << 0,
4510                                    y = s + d << 0,
4511                                    B;
4512                                if (a.axisY.logarithmic || a.axisY.scaleBreaks &&
4513                                    0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 < u[k].y) {
4514                                    l[c] = p + ("undefined" !== typeof l[c] ? l[c] : 0);
4515                                    if (0 >= l[c]) continue;
4516                                    p = a.axisY.convertValueToPixel(l[c]);
4517                                    B = g[c] ? g[c] : n;
4518                                    g[c] = p
4519                                } else if (a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 >= u[k].y) t[c] = p + ("undefined" !== typeof t[c] ? t[c] : 0), B = a.axisY.convertValueToPixel(t[c]), p = h[c] ? h[c] : n, h[c] = B;
4520                                else if (p = a.axisY.convertValueToPixel(p), 0 <= u[k].y) {
4521                                    var A = "undefined" !== typeof g[c] ? g[c] : 0;
4522                                    p -= A;
4523                                    B = n - A;
4524                                    g[c] = A + (B - p)
4525                                } else A = "undefined" !== typeof h[c] ?
4526                                    h[c] : 0, B = p + A, p = n + A, h[c] = A + (B - p);
4527                                c = u[k].color ? u[k].color : D._colorSet[k % D._colorSet.length];
4528                                V(b, s, p, y, B, c, 0, null, q && 0 <= u[k].y, 0 > u[k].y && q, !1, !1, D.fillOpacity);
4529                                c = D.dataPointIds[k];
4530                                this._eventManager.objectMap[c] = {
4531                                    id: c,
4532                                    objectType: "dataPoint",
4533                                    dataSeriesIndex: m,
4534                                    dataPointIndex: k,
4535                                    x1: s,
4536                                    y1: p,
4537                                    x2: y,
4538                                    y2: B
4539                                };
4540                                c = R(c);
4541                                v && V(this._eventManager.ghostCtx, s, p, y, B, c, 0, null, !1, !1, !1, !1);
4542                                (u[k].indexLabel || D.indexLabel || u[k].indexLabelFormatter || D.indexLabelFormatter) && this._indexLabels.push({
4543                                    chartType: "stackedColumn100",
4544                                    dataPoint: u[k],
4545                                    dataSeries: D,
4546                                    point: {
4547                                        x: r,
4548                                        y: 0 <= u[k].y ? p : B
4549                                    },
4550                                    direction: 0 > u[k].y === a.axisY.reversed ? 1 : -1,
4551                                    bounds: {
4552                                        x1: s,
4553                                        y1: Math.min(p, B),
4554                                        x2: y,
4555                                        y2: Math.max(p, B)
4556                                    },
4557                                    color: c
4558                                })
4559                            }
4560                }
4561                v && (f.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width,
4562                    this.height), b.clearRect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.restore());
4563                b.restore();
4564                return {
4565                    source: f,
4566                    dest: this.plotArea.ctx,
4567                    animationCallback: H.yScaleAnimation,
4568                    easingFunction: H.easing.easeOutQuart,
4569                    animationBase: n < a.axisY.bounds.y1 ? a.axisY.bounds.y1 : n > a.axisY.bounds.y2 ? a.axisY.bounds.y2 : n
4570                }
4571            }
4572        };
4573        q.prototype.renderBar = function(a) {
4574            var f = a.targetCanvasCtx || this.plotArea.ctx,
4575                b = v ? this._preRenderCtx : f;
4576            if (!(0 >= a.dataSeriesIndexes.length)) {
4577                var c = null,
4578                    e = this.plotArea,
4579                    g = 0,
4580                    h, l, t, k = a.axisY.convertValueToPixel(a.axisY.logarithmic ?
4581                        a.axisY.viewportMinimum : 0),
4582                    g = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1,
4583                    r = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : Math.min(0.15 * this.height, 0.9 * (this.plotArea.height / a.plotType.totalDataSeries)) << 0,
4584                    p = a.axisX.dataInfo.minDiff;
4585                isFinite(p) || (p = 0.3 * Math.abs(a.axisX.range));
4586                p = this.dataPointWidth ? this.dataPointWidth : 0.9 * (e.height * (a.axisX.logarithmic ? Math.log(p) / Math.log(a.axisX.range) : Math.abs(p) / Math.abs(a.axisX.range)) /
4587                    a.plotType.totalDataSeries) << 0;
4588                this.dataPointMaxWidth && g > r && (g = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, r));
4589                !this.dataPointMaxWidth && (this.dataPointMinWidth && r < g) && (r = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, g));
4590                p < g && (p = g);
4591                p > r && (p = r);
4592                b.save();
4593                v && this._eventManager.ghostCtx.save();
4594                b.beginPath();
4595                b.rect(e.x1, e.y1, e.width, e.height);
4596                b.clip();
4597                v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip());
4598                for (r = 0; r < a.dataSeriesIndexes.length; r++) {
4599                    var n = a.dataSeriesIndexes[r],
4600                        d = this.data[n],
4601                        w = d.dataPoints;
4602                    if (0 < w.length) {
4603                        var m = 5 < p && d.bevelEnabled ? !0 : !1;
4604                        b.strokeStyle = "#4572A7 ";
4605                        for (g = 0; g < w.length; g++)
4606                            if (w[g].getTime ? t = w[g].x.getTime() : t = w[g].x, !(t < a.axisX.dataInfo.viewPortMin || t > a.axisX.dataInfo.viewPortMax) && "number" === typeof w[g].y) {
4607                                l = a.axisX.convertValueToPixel(t);
4608                                h = a.axisY.convertValueToPixel(w[g].y);
4609                                l = a.axisX.reversed ? l + a.plotType.totalDataSeries * p / 2 - (a.previousDataSeriesCount + r) * p << 0 : l - a.plotType.totalDataSeries *
4610                                    p / 2 + (a.previousDataSeriesCount + r) * p << 0;
4611                                var D = a.axisX.reversed ? l - p << 0 : l + p << 0,
4612                                    u;
4613                                0 <= w[g].y ? u = k : (u = h, h 
4613= k);
4614                                c = w[g].color ? w[g].color : d._colorSet[g % d._colorSet.length];
4615                                V(b, u, l, h, D, c, 0, null, m, !1, !1, !1, d.fillOpacity);
4616                                c = d.dataPointIds[g];
4617                                this._eventManager.objectMap[c] = {
4618                                    id: c,
4619                                    objectType: "dataPoint",
4620                                    dataSeriesIndex: n,
4621                                    dataPointIndex: g,
4622                                    x1: u,
4623                                    y1: l,
4624                                    x2: h,
4625                                    y2: D
4626                                };
4627                                c = R(c);
4628                                v && V(this._eventManager.ghostCtx, u, l, h, D, c, 0, null, !1, !1, !1, !1);
4629                                (w[g].indexLabel || d.indexLabel || w[g].indexLabelFormatter || d.indexLabelFormatter) && this._indexLabels.push({
4630                                    chartType: "bar",
4631                                    dataPoint: w[g],
4632                                    dataSeries: d,
4633                                    point: {
4634                                        x: 0 <= w[g].y ? h : u,
4635                                        y: l + (D - l) / 2
4636                                    },
4637                                    direction: 0 > w[g].y === a.axisY.reversed ? 1 : -1,
4638                                    bounds: {
4639                                        x1: Math.min(u, h),
4640                                        y1: l,
4641                                        x2: Math.max(u, h),
4642                                        y2: D
4643                                    },
4644                                    color: c
4645                                })
4646                            }
4647                    }
4648                }
4649                v && (f.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
4650                    0, 0, this.width, this.height), b.clearRect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.restore());
4651                b.restore();
4652                return {
4653                    source: f,
4654                    dest: this.plotArea.ctx,
4655                    animationCallback: H.xScaleAnimation,
4656                    easingFunction: H.easing.easeOutQuart,
4657                    animationBase: k < a.axisY.bounds.x1 ? a.axisY.bounds.x1 : k > a.axisY.bounds.x2 ? a.axisY.bounds.x2 : k
4658                }
4659            }
4660        };
4661        q.prototype.renderStackedBar = function(a) {
4662            var f = a.targetCanvasCtx || this.plotArea.ctx,
4663                b = v ? this._preRenderCtx : f;
4664            if (!(0 >= a.dataSeriesIndexes.length)) {
4665                var c = null,
4666                    e = this.plotArea,
4667                    g = [],
4668                    h = [],
4669                    l = [],
4670                    t = [],
4671                    k = 0,
4672                    r, p, n = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
4673                    k = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1;
4674                p = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.15 * this.height << 0;
4675                var d = a.axisX.dataInfo.minDiff;
4676                isFinite(d) || (d = 0.3 * Math.abs(a.axisX.range));
4677                d = this.dataPointWidth ? this.dataPointWidth : 0.9 * (e.height * (a.axisX.logarithmic ? Math.log(d) / Math.log(a.axisX.range) : Math.abs(d) /
4678                        Math.abs(a.axisX.range)) / a.plotType.plotUnits.length) << 0;
4679                this.dataPointMaxWidth && k > p && (k = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, p));
4680                !this.dataPointMaxWidth && (this.dataPointMinWidth && p < k) && (p = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, k));
4681                d < k && (d = k);
4682                d > p && (d = p);
4683                b.save();
4684                v && this._eventManager.ghostCtx.save();
4685                b.beginPath();
4686                b.rect(e.x1, e.y1, e.width, e.height);
4687                b.clip();
4688                v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height),
4689                    this._eventManager.ghostCtx.clip());
4690                for (var w = 0; w < a.dataSeriesIndexes.length; w++) {
4691                    var m = a.dataSeriesIndexes[w],
4692                        D = this.data[m],
4693                        u = D.dataPoints;
4694                    if (0 < u.length) {
4695                        var q = 5 < d && D.bevelEnabled ? !0 : !1;
4696                        b.strokeStyle = "#4572A7 ";
4697                        for (k = 0; k < u.length; k++)
4698                            if (c = u[k].x.getTime ? u[k].x.getTime() : u[k].x, !(c < a.axisX.dataInfo.viewPortMin || c > a.axisX.dataInfo.viewPortMax) && "number" === typeof u[k].y) {
4699                                p = a.axisX.convertValueToPixel(c);
4700                                var s = p - a.plotType.plotUnits.length * d / 2 + a.index * d << 0,
4701                                    y = s + d << 0,
4702                                    B;
4703                                if (a.axisY.logarithmic || a.axisY.scaleBreaks &&
4704                                    0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 < u[k].y) l[c] = u[k].y + (l[c] ? l[c] : 0), 0 < l[c] && (B = g[c] ? g[c] : n, g[c] = r = a.axisY.convertValueToPixel(l[c]));
4705                                else if (a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 >= u[k].y) t[c] = u[k].y + (t[c] ? t[c] : 0), r = h[c] ? h[c] : n, h[c] = B = a.axisY.convertValueToPixel(t[c]);
4706                                else if (r = a.axisY.convertValueToPixel(u[k].y), 0 <= u[k].y) {
4707                                    var A = g[c] ? g[c] : 0;
4708                                    B = n + A;
4709                                    r += A;
4710                                    g[c] = A + (r - B)
4711                                } else A = h[c] ? h[c] : 0, B = r - A, r = n - A, h[c] = A + (r - B);
4712                                c = u[k].color ? u[k].color : D._colorSet[k % D._colorSet.length];
4713                                V(b, B, s, r, y, c, 0, null, q, !1, !1, !1, D.fillOpacity);
4714                                c = D.dataPointIds[k];
4715                                this._eventManager.objectMap[c] = {
4716                                    id: c,
4717                                    objectType: "dataPoint",
4718                                    dataSeriesIndex: m,
4719                                    dataPointIndex: k,
4720                                    x1: B,
4721                                    y1: s,
4722                                    x2: r,
4723                                    y2: y
4724                                };
4725                                c = R(c);
4726                                v && V(this._eventManager.ghostCtx, B, s, r, y, c, 0, null, !1, !1, !1, !1);
4727                                (u[k].indexLabel || D.indexLabel || u[k].indexLabelFormatter || D.indexLabelFormatter) && this._indexLabels.push({
4728                                    chartType: "stackedBar",
4729                                    dataPoint: u[k],
4730                                    dataSeries: D,
4731                                    point: {
4732                                        x: 0 <= u[k].y ? r : B,
4733                                        y: p
4734                                    },
4735                                    direction: 0 > u[k].y === a.axisY.reversed ? 1 : -1,
4736                                    bounds: {
4737                                        x1: Math.min(B,
4738                                            r),
4739                                        y1: s,
4740                                        x2: Math.max(B, r),
4741                                        y2: y
4742                                    },
4743                                    color: c
4744                                })
4745                            }
4746                    }
4747                }
4748                v && (f.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.clearRect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.restore());
4749                b.restore();
4750                return {
4751                    source: f,
4752                    dest: this.plotArea.ctx,
4753                    animationCallback: H.xScaleAnimation,
4754                    easingFunction: H.easing.easeOutQuart,
4755                    animationBase: n < a.axisY.bounds.x1 ? a.axisY.bounds.x1 : n > a.axisY.bounds.x2 ? a.axisY.bounds.x2 : n
4756                }
4757            }
4758        };
4759        q.prototype.renderStackedBar100 = function(a) {
4760            var f = a.targetCanvasCtx || this.plotArea.ctx,
4761                b = v ? this._preRenderCtx : f;
4762            if (!(0 >= a.dataSeriesIndexes.length)) {
4763                var c = null,
4764                    e = this.plotArea,
4765                    g = [],
4766                    h = [],
4767                    l = [],
4768                    t = [],
4769                    k = 0,
4770                    r, p, n = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
4771                    k = this.dataPointMinWidth ?
4772                        this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1;
4773                p = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.15 * this.height << 0;
4774                var d = a.axisX.dataInfo.minDiff;
4775                isFinite(d) || (d = 0.3 * Math.abs(a.axisX.range));
4776                d = this.dataPointWidth ? this.dataPointWidth : 0.9 * (e.height * (a.axisX.logarithmic ? Math.log(d) / Math.log(a.axisX.range) : Math.abs(d) / Math.abs(a.axisX.range)) / a.plotType.plotUnits.length) << 0;
4777                this.dataPointMaxWidth && k > p && (k = Math.min(this.dataPointWidth ? this.dataPointWidth :
4778                    Infinity, p));
4779                !this.dataPointMaxWidth && (this.dataPointMinWidth && p < k) && (p = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, k));
4780                d < k && (d = k);
4781                d > p && (d = p);
4782                b.save();
4783                v && this._eventManager.ghostCtx.save();
4784                b.beginPath();
4785                b.rect(e.x1, e.y1, e.width, e.height);
4786                b.clip();
4787                v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip());
4788                for (var w = 0; w < a.dataSeriesIndexes.length; w++) {
4789                    var m = a.dataSeriesIndexes[w],
4790                        D = this.data[m],
4791                        u = D.dataPoints;
4792                    if (0 < u.length) {
4793                        var q = 5 < d && D.bevelEnabled ? !0 : !1;
4794                        b.strokeStyle = "#4572A7 ";
4795                        for (k = 0; k < u.length; k++)
4796                            if (c = u[k].x.getTime ? u[k].x.getTime() : u[k].x, !(c < a.axisX.dataInfo.viewPortMin || c > a.axisX.dataInfo.viewPortMax) && "number" === typeof u[k].y) {
4797                                p = a.axisX.convertValueToPixel(c);
4798                                var s;
4799                                s = 0 !== a.dataPointYSums[c] ? 100 * (u[k].y / a.dataPointYSums[c]) : 0;
4800                                var y = p - a.plotType.plotUnits.length * d / 2 + a.index * d << 0,
4801                                    B = y + d << 0;
4802                                if (a.axisY.logarithmic || a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 < u[k].y) {
4803                                    l[c] = s +
4804                                        (l[c] ? l[c] : 0);
4805                                    if (0 >= l[c]) continue;
4806                                    s = g[c] ? g[c] : n;
4807                                    g[c] = r = a.axisY.convertValueToPixel(l[c])
4808                                } else if (a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 >= u[k].y) t[c] = s + (t[c] ? t[c] : 0), r = h[c] ? h[c] : n, h[c] = s = a.axisY.convertValueToPixel(t[c]);
4809                                else if (r = a.axisY.convertValueToPixel(s), 0 <= u[k].y) {
4810                                    var A = g[c] ? g[c] : 0;
4811                                    s = n + A;
4812                                    r += A;
4813                                    g[c] = A + (r - s)
4814                                } else A = h[c] ? h[c] : 0, s = r - A, r = n - A, h[c] = A + (r - s);
4815                                c = u[k].color ? u[k].color : D._colorSet[k % D._colorSet.length];
4816                                V(b, s, y, r, B, c, 0, null, q, !1, !1, !1, D.fillOpacity);
4817                                c = D.dataPointIds[k];
4818                                this._eventManager.objectMap[c] = {
4819                                    id: c,
4820                                    objectType: "dataPoint",
4821                                    dataSeriesIndex: m,
4822                                    dataPointIndex: k,
4823                                    x1: s,
4824                                    y1: y,
4825                                    x2: r,
4826                                    y2: B
4827                                };
4828                                c = R(c);
4829                                v && V(this._eventManager.ghostCtx, s, y, r, B, c, 0, null, !1, !1, !1, !1);
4830                                (u[k].indexLabel || D.indexLabel || u[k].indexLabelFormatter || D.indexLabelFormatter) && this._indexLabels.push({
4831                                    chartType: "stackedBar100",
4832                                    dataPoint: u[k],
4833                                    dataSeries: D,
4834                                    point: {
4835                                        x: 0 <= u[k].y ? r : s,
4836                                        y: p
4837                                    },
4838                                    direction: 0 > u[k].y === a.axisY.reversed ? 1 : -1,
4839                                    bounds: {
4840                                        x1: Math.min(s, r),
4841                                        y1: y,
4842                                        x2: Math.max(s, r),
4843                                        y2: B
4844                                    },
4845                                    color: c
4846                                })
4847                            }
4848                    }
4849                }
4850                v && (f.drawImage(this._preRenderCanvas,
4851                    0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.clearRect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.restore());
4852                b.restore();
4853                return {
4854                    source: f,
4855                    dest: this.plotArea.ctx,
4856                    animationCallback: H.xScaleAnimation,
4857                    easingFunction: H.easing.easeOutQuart,
4858                    animationBase: n < a.axisY.bounds.x1 ? a.axisY.bounds.x1 : n > a.axisY.bounds.x2 ? a.axisY.bounds.x2 : n
4859                }
4860            }
4861        };
4862        q.prototype.renderArea = function(a) {
4863            var f, b;
4864
4865            function c() {
4866                A && (0 < w.lineThickness && g.stroke(), a.axisY.logarithmic || 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? B = y : 0 > a.axisY.viewportMaximum ? B = t.y1 : 0 < a.axisY.viewportMinimum && (B = l.y2), g.lineTo(u, B), g.lineTo(A.x, B), g.closePath(), g.globalAlpha = w.fillOpacity, g.fill(), g.globalAlpha = 1, v && (h.lineTo(u, B), h.lineTo(A.x, B), h.closePath(), h.fill()), g.beginPath(),
4867                    g.moveTo(u, s), h.beginPath(), h.moveTo(u, s), A = {
4868                    x: u,
4869                    y: s
4870                })
4871            }
4872            var e = a.targetCanvasCtx || this.plotArea.ctx,
4873                g = v ? this._preRenderCtx : e;
4874            if (!(0 >= a.dataSeriesIndexes.length)) {
4875                var h = this._eventManager.ghostCtx,
4876                    l = a.axisX.lineCoordinates,
4877                    t = a.axisY.lineCoordinates,
4878                    k = [],
4879                    r = this.plotArea,
4880                    p;
4881                g.save();
4882                v && h.save();
4883                g.beginPath();
4884                g.rect(r.x1, r.y1, r.width, r.height);
4885                g.clip();
4886                v && (h.beginPath(), h.rect(r.x1, r.y1, r.width, r.height), h.clip());
4887                for (var n = 0; n < a.dataSeriesIndexes.length; n++) {
4888                    var d = a.dataSeriesIndexes[n],
4889                        w = this.data[d],
4890                        m = w.dataPoints,
4891                        k = w.id;
4892                    this._eventManager.objectMap[k] = {
4893                        objectType: "dataSeries",
4894                        dataSeriesIndex: d
4895                    };
4896                    k = R(k);
4897                    h.fillStyle = k;
4898                    k = [];
4899                    f = !0;
4900                    var D = 0,
4901                        u, s, q, y = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
4902                        B, A = null;
4903                    if (0 < m.length) {
4904                        var x = w._colorSet[D % w._colorSet.length],
4905                            z = w.lineColor = w.options.lineColor || x,
4906                            J = z;
4907                        g.fillStyle = x;
4908                        g.strokeStyle = z;
4909                        g.lineWidth = w.lineThickness;
4910                        b = "solid";
4911                        if (g.setLineDash) {
4912                            var I = G(w.nullDataLineDashType, w.lineThickness);
4913                            b = w.lineDashType;
4914                            var da = G(b, w.lineThickness);
4915                            g.setLineDash(da)
4916                        }
4917                        for (var ea = !0; D < m.length; D++)
4918                            if (q = m[D].x.getTime ? m[D].x.getTime() : m[D].x, !(q < a.axisX.dataInfo.viewPortMin || q > a.axisX.dataInfo.viewPortMax && (!w.connectNullData || !ea)))
4919                                if ("number" !== typeof m[D].y) w.connectNullData || (ea || f) || c(), ea = !0;
4920                                else {
4921                                    u = a.axisX.convertValueToPixel(q);
4922                                    s = a.axisY.convertValueToPixel(m[D].y);
4923                                    f || ea ? (!f && w.connectNullData ? (g.setLineDash && (w.options.nullDataLineDashType || b === w.lineDashType && w.lineDashType !== w.nullDataLineDashType) && (f = u, b = s, u = p.x, s = p.y, c(), g.moveTo(p.x,
4924                                        p.y), u = f, s = b, A = p, b = w.nullDataLineDashType, g.setLineDash(I)), g.lineTo(u, s), v && h.lineTo(u, s)) : (g.beginPath(), g.moveTo(u, s), v && (h.beginPath(), h.moveTo(u, s)), A = {
4925                                        x: u,
4926                                        y: s
4927                                    }), ea = f = !1) : (g.lineTo(u, s), v && h.lineTo(u, s), 0 == D % 250 && c());
4928                                    p = {
4929                                        x: u,
4930                                        y: s
4931                                    };
4932                                    D < m.length - 1 && (J !== (m[D].lineColor || z) || b !== (m[D].lineDashType || w.lineDashType)) && (c(), J = m[D].lineColor || z, g.strokeStyle = J, g.setLineDash && (m[D].lineDashType ? (b = m[D].lineDashType, g.setLineDash(G(b, w.lineThickness))) : (b = w.lineDashType, g.setLineDash(da))));
4933                                    var $ = w.dataPointIds[D];
4934                                    this._eventManager.objectMap[$] = {
4935                                        id: $,
4936                                        objectType: "dataPoint",
4937                                        dataSeriesIndex: d,
4938                                        dataPointIndex: D,
4939                                        x1: u,
4940                                        y1: s
4941                                    };
4942                                    0 !== m[D].markerSize && (0 < m[D].markerSize || 0 < w.markerSize) && (q = w.getMarkerProperties(D, u, s, g), k.push(q), $ = R($), v && k.push({
4943                                        x: u,
4944                                        y: s,
4945                                        ctx: h,
4946                                        type: q.type,
4947                                        size: q.size,
4948                                        color: $,
4949                                        borderColor: $,
4950                                        borderThickness: q.borderThickness
4951                                    }));
4952                                    (m[D].indexLabel || w.indexLabel || m[D].indexLabelFormatter || w.indexLabelFormatter) && this._indexLabels.push({
4953                                        chartType: "area",
4954                                        dataPoint: m[D],
4955                                        dataSeries: w,
4956                                        point: {
4957                                            x: u,
4958                                            y: s
4959                                        },
4960                                        direction: 0 >
4961                                        m[D].y === a.axisY.reversed ? 1 : -1,
4962                                        color: x
4963                                    })
4964                                }
4965                        c();
4966                        ja.drawMarkers(k)
4967                    }
4968                }
4969                v && (e.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), g.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && g.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && g.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), g.clearRect(r.x1, r.y1, r.width, r.height), this._eventManager.ghostCtx.restore(
4969));
4970                g.restore();
4971                return {
4972                    source: e,
4973                    dest: this.plotArea.ctx,
4974                    animationCallback: H.xClipAnimation,
4975                    easingFunction: H.easing.linear,
4976                    animationBase: 0
4977                }
4978            }
4979        };
4980        q.prototype.renderSplineArea = function(a) {
4981            function f() {
4982                var b = x(q, 2);
4983                if (0 < b.length) {
4984                    if (0 < p.lineThickness) {
4985                        c.beginPath();
4986                        c.moveTo(b[0].x, b[0].y);
4987                        b[0].newStrokeStyle && (c.strokeStyle = b[0].newStrokeStyle);
4988                        b[0].newLineDashArray && c.setLineDash(b[0].newLineDashArray);
4989                        for (var d = 0; d < b.length - 3; d += 3)
4990                            if (c.bezierCurveTo(b[d + 1].x, b[d + 1].y, b[d + 2].x, b[d + 2].y, b[d + 3].x, b[d + 3].y), v &&
4991                                e.bezierCurveTo(b[d + 1].x, b[d + 1].y, b[d + 2].x, b[d + 2].y, b[d + 3].x, b[d + 3].y), b[d + 3].newStrokeStyle || b[d + 3].newLineDashArray) c.stroke(), c.beginPath(), c.moveTo(b[d + 3].x, b[d + 3].y), b[d + 3].newStrokeStyle && (c.strokeStyle = b[d + 3].newStrokeStyle), b[d + 3].newLineDashArray && c.setLineDash(b[d + 3].newLineDashArray);
4992                        c.stroke()
4993                    }
4994                    c.beginPath();
4995                    c.moveTo(b[0].x, b[0].y);
4996                    v && (e.beginPath(), e.moveTo(b[0].x, b[0].y));
4997                    for (d = 0; d < b.length - 3; d += 3) c.bezierCurveTo(b[d + 1].x, b[d + 1].y, b[d + 2].x, b[d + 2].y, b[d + 3].x, b[d + 3].y), v && e.bezierCurveTo(b[d +
4998                    1].x, b[d + 1].y, b[d + 2].x, b[d + 2].y, b[d + 3].x, b[d + 3].y);
4999                    a.axisY.logarithmic || 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? u = D : 0 > a.axisY.viewportMaximum ? u = h.y1 : 0 < a.axisY.viewportMinimum && (u = g.y2);
5000                    s = {
5001                        x: b[0].x,
5002                        y: b[0].y
5003                    };
5004                    c.lineTo(b[b.length - 1].x, u);
5005                    c.lineTo(s.x, u);
5006                    c.closePath();
5007                    c.globalAlpha = p.fillOpacity;
5008                    c.fill();
5009                    c.globalAlpha = 1;
5010                    v && (e.lineTo(b[b.length - 1].x, u), e.lineTo(s.x, u), e.closePath(), e.fill())
5011                }
5012            }
5013            var b = a.targetCanvasCtx || this.plotArea.ctx,
5014                c = v ? this._preRenderCtx : b;
5015            if (!(0 >= a.dataSeriesIndexes.length)) {
5016                var e =
5017                        this._eventManager.ghostCtx,
5018                    g = a.axisX.lineCoordinates,
5019                    h = a.axisY.lineCoordinates,
5020                    l = [],
5021                    t = this.plotArea;
5022                c.save();
5023                v && e.save();
5024                c.beginPath();
5025                c.rect(t.x1, t.y1, t.width, t.height);
5026                c.clip();
5027                v && (e.beginPath(), e.rect(t.x1, t.y1, t.width, t.height), e.clip());
5028                for (var k = 0; k < a.dataSeriesIndexes.length; k++) {
5029                    var r = a.dataSeriesIndexes[k],
5030                        p = this.data[r],
5031                        n = p.dataPoints,
5032                        l = p.id;
5033                    this._eventManager.objectMap[l] = {
5034                        objectType: "dataSeries",
5035                        dataSeriesIndex: r
5036                    };
5037                    l = R(l);
5038                    e.fillStyle = l;
5039                    var l = [],
5040                        d = 0,
5041                        w, m, D = a.axisY.convertValueToPixel(a.axisY.logarithmic ?
5042                            a.axisY.viewportMinimum : 0),
5043                        u, s = null,
5044                        q = [];
5045                    if (0 < n.length) {
5046                        var y = p._colorSet[d % p._colorSet.length],
5047                            B = p.lineColor = p.options.lineColor || y,
5048                            A = B;
5049                        c.fillStyle = y;
5050                        c.strokeStyle = B;
5051                        c.lineWidth = p.lineThickness;
5052                        var z = "solid";
5053                        if (c.setLineDash) {
5054                            var L = G(p.nullDataLineDashType, p.lineThickness),
5055                                z = p.lineDashType,
5056                                J = G(z, p.lineThickness);
5057                            c.setLineDash(J)
5058                        }
5059                        for (m = !1; d < n.length; d++)
5060                            if (w = n[d].x.getTime ? n[d].x.getTime() : n[d].x, !(w < a.axisX.dataInfo.viewPortMin || w > a.axisX.dataInfo.viewPortMax && (!p.connectNullData || !m)))
5061                                if ("number" !==
5062                                    typeof n[d].y) 0 < d && !m && (p.connectNullData ? c.set
5062LineDash && (0 < q.length && (p.options.nullDataLineDashType || !n[d - 1].lineDashType)) && (q[q.length - 1].newLineDashArray = L, z = p.nullDataLineDashType) : (f(), q = [])), m = !0;
5063                                else {
5064                                    w = a.axisX.convertValueToPixel(w);
5065                                    m = a.axisY.convertValueToPixel(n[d].y);
5066                                    var I = p.dataPointIds[d];
5067                                    this._eventManager.objectMap[I] = {
5068                                        id: I,
5069                                        objectType: "dataPoint",
5070                                        dataSeriesIndex: r,
5071                                        dataPointIndex: d,
5072                                        x1: w,
5073                                        y1: m
5074                                    };
5075                                    q[q.length] = {
5076                                        x: w,
5077                                        y: m
5078                                    };
5079                                    d < n.length - 1 && (A !== (n[d].lineColor || B) || z !== (n[d].lineDashType || p.lineDashType)) &&
5080                                    (A = n[d].lineColor || B, q[q.length - 1].newStrokeStyle = A, c.setLineDash && (n[d].lineDashType ? (z = n[d].lineDashType, q[q.length - 1].newLineDashArray = G(z, p.lineThickness)) : (z = p.lineDashType, q[q.length - 1].newLineDashArray = J)));
5081                                    if (0 !== n[d].markerSize && (0 < n[d].markerSize || 0 < p.markerSize)) {
5082                                        var da = p.getMarkerProperties(d, w, m, c);
5083                                        l.push(da);
5084                                        I = R(I);
5085                                        v && l.push({
5086                                            x: w,
5087                                            y: m,
5088                                            ctx: e,
5089                                            type: da.type,
5090                                            size: da.size,
5091                                            color: I,
5092                                            borderColor: I,
5093                                            borderThickness: da.borderThickness
5094                                        })
5095                                    }(n[d].indexLabel || p.indexLabel || n[d].indexLabelFormatter || p.indexLabelFormatter) &&
5096                                    this._indexLabels.push({
5097                                        chartType: "splineArea",
5098                                        dataPoint: n[d],
5099                                        dataSeries: p,
5100                                        point: {
5101                                            x: w,
5102                                            y: m
5103                                        },
5104                                        direction: 0 > n[d].y === a.axisY.reversed ? 1 : -1,
5105                                        color: y
5106                                    });
5107                                    m = !1
5108                                }
5109                        f();
5110                        ja.drawMarkers(l)
5111                    }
5112                }
5113                v && (b.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
5114                    0, 0, this.width, this.height), c.clearRect(t.x1, t.y1, t.width, t.height), this._eventManager.ghostCtx.restore());
5115                c.restore();
5116                return {
5117                    source: b,
5118                    dest: this.plotArea.ctx,
5119                    animationCallback: H.xClipAnimation,
5120                    easingFunction: H.easing.linear,
5121                    animationBase: 0
5122                }
5123            }
5124        };
5125        q.prototype.renderStepArea = function(a) {
5126            var f, b;
5127
5128            function c() {
5129                A && (0 < w.lineThickness && g.stroke(), a.axisY.logarithmic || 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? B = y : 0 > a.axisY.viewportMaximum ? B = t.y1 : 0 < a.axisY.viewportMinimum && (B = l.y2), g.lineTo(u, B), g.lineTo(A.x,
5130                    B), g.closePath(), g.globalAlpha = w.fillOpacity, g.fill(), g.globalAlpha = 1, v && (h.lineTo(u, B), h.lineTo(A.x, B), h.closePath(), h.fill()), g.beginPath(), g.moveTo(u, s), h.beginPath(), h.moveTo(u, s), A = {
5131                    x: u,
5132                    y: s
5133                })
5134            }
5135            var e = a.targetCanvasCtx || this.plotArea.ctx,
5136                g = v ? this._preRenderCtx : e;
5137            if (!(0 >= a.dataSeriesIndexes.length)) {
5138                var h = this._eventManager.ghostCtx,
5139                    l = a.axisX.lineCoordinates,
5140                    t = a.axisY.lineCoordinates,
5141                    k = [],
5142                    r = this.plotArea,
5143                    p;
5144                g.save();
5145                v && h.save();
5146                g.beginPath();
5147                g.rect(r.x1, r.y1, r.width, r.height);
5148                g.clip();
5149                v && (h.beginPath(),
5150                    h.rect(r.x1, r.y1, r.width, r.height), h.clip());
5151                for (var n = 0; n < a.dataSeriesIndexes.length; n++) {
5152                    var d = a.dataSeriesIndexes[n],
5153                        w = this.data[d],
5154                        m = w.dataPoints,
5155                        k = w.id;
5156                    this._eventManager.objectMap[k] = {
5157                        objectType: "dataSeries",
5158                        dataSeriesIndex: d
5159                    };
5160                    k = R(k);
5161                    h.fillStyle = k;
5162                    k = [];
5163                    f = !0;
5164                    var D = 0,
5165                        u, s, q, y = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
5166                        B, A = null;
5167                    b = !1;
5168                    if (0 < m.length) {
5169                        var x = w._colorSet[D % w._colorSet.length],
5170                            z = w.lineColor = w.options.lineColor || x,
5171                            J = z;
5172                        g.fillStyle = x;
5173                        g.strokeStyle = z;
5174                        g.lineWidth =
5175                            w.lineThickness;
5176                        var I = "solid";
5177                        if (g.setLineDash) {
5178                            var da = G(w.nullDataLineDashType, w.lineThickness),
5179                                I = w.lineDashType,
5180                                ea = G(I, w.lineThickness);
5181                            g.setLineDash(ea)
5182                        }
5183                        for (; D < m.length; D++)
5184                            if (q = m[D].x.getTime ? m[D].x.getTime() : m[D].x, !(q < a.axisX.dataInfo.viewPortMin || q > a.axisX.dataInfo.viewPortMax && (!w.connectNullData || !b))) {
5185                                var $ = s;
5186                                "number" !== typeof m[D].y ? (w.connectNullData || (b || f) || c(), b = !0) : (u = a.axisX.convertValueToPixel(q), s = a.axisY.convertValueToPixel(m[D].y), f || b ? (!f && w.connectNullData ? (g.setLineDash && (w.options.nullDataLineDashType ||
5187                                I === w.lineDashType && w.lineDashType !== w.nullDataLineDashType) && (f = u, b = s, u = p.x, s = p.y, c(), g.moveTo(p.x, p.y), u = f, s = b, A = p, I = w.nullDataLineDashType, g.setLineDash(da)), g.lineTo(u, $), g.lineTo(u, s), v && (h.lineTo(u, $), h.lineTo(u, s))) : (g.beginPath(), g.moveTo(u, s), v && (h.beginPath(), h.moveTo(u, s)), A = {
5188                                    x: u,
5189                                    y: s
5190                                }), b = f = !1) : (g.lineTo(u, $), v && h.lineTo(u, $), g.lineTo(u, s), v && h.lineTo(u, s), 0 == D % 250 && c()), p = {
5191                                    x: u,
5192                                    y: s
5193                                }, D < m.length - 1 && (J !== (m[D].lineColor || z) || I !== (m[D].lineDashType || w.lineDashType)) && (c(), J = m[D].lineColor ||
5194                                    z, g.strokeStyle = J, g.setLineDash && (m[D].lineDashType ? (I = m[D].lineDashType, g.setLineDash(G(I, w.lineThickness))) : (I = w.lineDashType, g.setLineDash(ea)))), q = w.dataPointIds[D], this._eventManager.objectMap[q] = {
5195                                    id: q,
5196                                    objectType: "dataPoint",
5197                                    dataSeriesIndex: d,
5198                                    dataPointIndex: D,
5199                                    x1: u,
5200                                    y1: s
5201                                }, 0 !== m[D].markerSize && (0 < m[D].markerSize || 0 < w.markerSize) && ($ = w.getMarkerProperties(D, u, s, g), k.push($), q = R(q), v && k.push({
5202                                    x: u,
5203                                    y: s,
5204                                    ctx: h,
5205                                    type: $.type,
5206                                    size: $.size,
5207                                    color: q,
5208                                    borderColor: q,
5209                                    borderThickness: $.borderThickness
5210                                })), (m[D].indexLabel ||
5211                                w.indexLabel || m[D].indexLabelFormatter || w.indexLabelFormatter) && this._indexLabels.push({
5212                                    chartType: "stepArea",
5213                                    dataPoint: m[D],
5214                                    dataSeries: w,
5215                                    point: {
5216                                        x: u,
5217                                        y: s
5218                                    },
5219                                    direction: 0 > m[D].y === a.axisY.reversed ? 1 : -1,
5220                                    color: x
5221                                }))
5222                            }
5223                        c();
5224                        ja.drawMarkers(k)
5225                    }
5226                }
5227                v && (e.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), g.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && g.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && g.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx &&
5228                this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), g.clearRect(r.x1, r.y1, r.width, r.height), this._eventManager.ghostCtx.restore(
5228));
5229                g.restore();
5230                return {
5231                    source: e,
5232                    dest: this.plotArea.ctx,
5233                    animationCallback: H.xClipAnimation,
5234                    easingFunction: H.easing.linear,
5235                    animationBase: 0
5236                }
5237            }
5238        };
5239        q.prototype.renderStackedArea = function(a) {
5240            function f() {
5241                if (!(1 > t.length)) {
5242                    for (0 < A.lineThickness && c.stroke(); 0 < t.length;) {
5243                        var a = t.pop();
5244                        c.lineTo(a.x, a.y);
5245                        v && s.lineTo(a.x, a.y)
5246                    }
5247                    c.closePath();
5248                    c.globalAlpha = A.fillOpacity;
5249                    c.fill();
5250                    c.globalAlpha = 1;
5251                    c.beginPath();
5252                    v && (s.closePath(), s.fill(), s.beginPath());
5253                    t = []
5254                }
5255            }
5256            var b = a.targetCanvasCtx || this.plotArea.ctx,
5257                c = v ? this._preRenderCtx : b;
5258            if (!(0 >= a.dataSeriesIndexes.length)) {
5259                var e = null,
5260                    g = [],
5261                    h = this.plotArea,
5262                    l = [],
5263                    t = [],
5264                    k = [],
5265                    r = [],
5266                    p = 0,
5267                    n, d, w, m = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
5268                    s = this._eventManager.ghostCtx,
5269                    u, q, y;
5270                v && s.beginPath();
5271                c.save();
5272                v && s.save();
5273                c.beginPath();
5274                c.rect(h.x1, h.y1, h.width, h.height);
5275                c.clip();
5276                v && (s.beginPath(), s.rect(h.x1, h.y1, h.width,
5277                    h.height), s.clip());
5278                for (var e = [], x = 0; x < a.dataSeriesIndexes.length; x++) {
5279                    var B = a.dataSeriesIndexes[x],
5280                        A = this.data[B],
5281                        z = A.dataPoints;
5282                    A.dataPointIndexes = [];
5283                    for (p = 0; p < z.length; p++) B = z[p].x.getTime ? z[p].x.getTime() : z[p].x, A.dataPointIndexes[B] = p, e[B] || (k.push(B), e[B] = !0);
5284                    k.sort(Pa)
5285                }
5286                for (x = 0; x < a.dataSeriesIndexes.length; x++) {
5287                    B = a.dataSeriesIndexes[x];
5288                    A = this.data[B];
5289                    z = A.dataPoints;
5290                    q = !0;
5291                    t = [];
5292                    p = A.id;
5293                    this._eventManager.objectMap[p] = {
5294                        objectType: "dataSeries",
5295                        dataSeriesIndex: B
5296                    };
5297                    p = R(p);
5298                    s.fillStyle = p;
5299                    if (0 < k.length) {
5300                        var e =
5301                                A._colorSet[0],
5302                            L = A.lineColor = A.options.lineColor || e,
5303                            J = L;
5304                        c.fillStyle = e;
5305                        c.strokeStyle = L;
5306                        c.lineWidth = A.lineThickness;
5307                        y = "solid";
5308                        if (c.setLineDash) {
5309                            var I = G(A.nullDataLineDashType, A.lineThickness);
5310                            y = A.lineDashType;
5311                            var da = G(y, A.lineThickness);
5312                            c.setLineDash(da)
5313                        }
5314                        for (var ea = !0, p = 0; p < k.length; p++) {
5315                            w = k[p];
5316                            var $ = null,
5317                                $ = 0 <= A.dataPointIndexes[w] ? z[A.dataPointIndexes[w]] : {
5318                                    x: w,
5319                                    y: null
5320                                };
5321                            if (!(w < a.axisX.dataInfo.viewPortMin || w > a.axisX.dataInfo.viewPortMax && (!A.connectNullData || !ea)))
5322                                if ("number" !== typeof $.y) A.connectNullData ||
5323                                (ea || q) || f(), ea = !0;
5324                                else {
5325                                    n = a.axisX.convertValueToPixel(w);
5326                                    var xa = l[w] ? l[w] : 0;
5327                                    if (a.axisY.logarithmic || a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length) {
5328                                        r[w] = $.y + (r[w] ? r[w] : 0);
5329                                        if (0 >= r[w] && a.axisY.logarithmic) continue;
5330                                        d = a.axisY.convertValueToPixel(r[w])
5331                                    } else d = a.axisY.convertValueToPixel($.y), d -= xa;
5332                                    t.push({
5333                                        x: n,
5334                                        y: m - xa
5335                                    });
5336                                    l[w] = m - d;
5337                                    q || ea ? (!q && A.connectNullData ? (c.setLineDash && (A.options.nullDataLineDashType || y === A.lineDashType && A.lineDashType !== A.nullDataLineDashType) && (q = t.pop(), y = t[t.length -
5338                                    1], f(), c.moveTo(u.x, u.y), t.push(y), t.push(q), y = A.nullDataLineDashType, c.setLineDash(I)), c.lineTo(n, d), v && s.lineTo(n, d)) : (c.beginPath(), c.moveTo(n, d), v && (s.beginPath(), s.moveTo(n, d))), ea = q = !1) : (c.lineTo(n, d), v && s.lineTo(n, d), 0 == p % 250 && (f(), c.moveTo(n, d), v && s.moveTo(n, d), t.push({
5339                                        x: n,
5340                                        y: m - xa
5341                                    })));
5342                                    u = {
5343                                        x: n,
5344                                        y: d
5345                                    };
5346                                    p < z.length - 1 && (J !== (z[p].lineColor || L) || y !== (z[p].lineDashType || A.lineDashType)) && (f(), c.beginPath(), c.moveTo(n, d), t.push({
5347                                        x: n,
5348                                        y: m - xa
5349                                    }), J = z[p].lineColor || L, c.strokeStyle = J, c.setLineDash && (z[p].lineDashType ?
5350                                        (y = z[p].lineDashType, c.setLineDash(G(y, A.lineThickness))) : (y = A.lineDashType, c.setLineDash(da))));
5351                                    if (0 <= A.dataPointIndexes[w]) {
5352                                        var oa = A.dataPointIds[A.dataPointIndexes[w]];
5353                                        this._eventManager.objectMap[oa] = {
5354                                            id: oa,
5355                                            objectType: "dataPoint",
5356                                            dataSeriesIndex: B,
5357                                            dataPointIndex: A.dataPointIndexes[w],
5358                                            x1: n,
5359                                            y1: d
5360                                        }
5361                                    }
5362                                    0 <= A.dataPointIndexes[w] && 0 !== $.markerSize && (0 < $.markerSize || 0 < A.markerSize) && (w = A.getMarkerProperties(A.dataPointIndexes[w], n, d, c), g.push(w), markerColor = R(oa), v && g.push({
5363                                        x: n,
5364                                        y: d,
5365                                        ctx: s,
5366                                        type: w.type,
5367                                        size: w.size,
5368                                        color: markerColor,
5369                                        borderColor: markerColor,
5370                                        borderThickness: w.borderThickness
5371                                    }));
5372                                    ($.indexLabel || A.indexLabel || $.indexLabelFormatter || A.indexLabelFormatter) && this._indexLabels.push({
5373                                        chartType: "stackedArea",
5374                                        dataPoint: $,
5375                                        dataSeries: A,
5376                                        point: {
5377                                            x: n,
5378                                            y: d
5379                                        },
5380                                        direction: 0 > z[p].y === a.axisY.reversed ? 1 : -1,
5381                                        color: e
5382                                    })
5383                                }
5384                        }
5385                        f();
5386                        c.moveTo(n, d);
5387                        v && s.moveTo(n, d)
5388                    }
5389                    delete A.dataPointIndexes
5390                }
5391                ja.drawMarkers(g);
5392                v && (b.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas &&
5393                c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(h.x1, h.y1, h.width, h.height), s.restore(
5393));
5394                c.restore();
5395                return {
5396                    source: b,
5397                    dest: this.plotArea.ctx,
5398                    animationCallback: H.xClipAnimation,
5399                    easingFunction: H.easing.linear,
5400                    animationBase: 0
5401                }
5402            }
5403        };
5404        q.prototype.renderStackedArea100 = function(a) {
5405            function f() {
5406                for (0 < A.lineThickness &&
5407                     c.stroke(); 0 < t.length;) {
5408                    var a = t.pop();
5409                    c.lineTo(a.x, a.y);
5410                    v && y.lineTo(a.x, a.y)
5411                }
5412                c.closePath();
5413                c.globalAlpha = A.fillOpacity;
5414                c.fill();
5415                c.globalAlpha = 1;
5416                c.beginPath();
5417                v && (y.closePath(), y.fill(), y.beginPath());
5418                t = []
5419            }
5420            var b = a.targetCanvasCtx || this.plotArea.ctx,
5421                c = v ? this._preRenderCtx : b;
5422            if (!(0 >= a.dataSeriesIndexes.length)) {
5423                var e = null,
5424                    g = this.plotArea,
5425                    h = [],
5426                    l = [],
5427                    t = [],
5428                    k = [],
5429                    r = [],
5430                    p = 0,
5431                    n, d, w, m, s, u, q = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
5432                    y = this._eventManager.ghostCtx;
5433                c.save();
5434                v && y.save();
5435                c.beginPath();
5436                c.rect(g.x1, g.y1, g.width, g.height);
5437                c.clip();
5438                v && (y.beginPath(), y.rect(g.x1, g.y1, g.width, g.height), y.clip());
5439                for (var e = [], x = 0; x < a.dataSeriesIndexes.length; x++) {
5440                    var B = a.dataSeriesIndexes[x],
5441                        A = this.data[B],
5442                        z = A.dataPoints;
5443                    A.dataPointIndexes = [];
5444                    for (p = 0; p < z.length; p++) B = z[p].x.getTime ? z[p].x.getTime() : z[p].x, A.dataPointIndexes[B] = p, e[B] || (k.push(B), e[B] = !0);
5445                    k.sort(Pa)
5446                }
5447                for (x = 0; x < a.dataSeriesIndexes.length; x++) {
5448                    B = a.dataSeriesIndexes[x];
5449                    A = this.data[B];
5450                    z = A.dataPoints;
5451                    s = !0;
5452                    e = A.id;
5453                    this._eventManager.objectMap[e] = {
5454                        objectType: "dataSeries",
5455                        dataSeriesIndex: B
5456                    };
5457                    e = R(e);
5458                    y.fillStyle = e;
5459                    t = [];
5460                    if (0 < k.length) {
5461                        var e = A._colorSet[p % A._colorSet.length],
5462                            L = A.lineColor = A.options.lineColor || e,
5463                            J = L;
5464                        c.fillStyle = e;
5465                        c.strokeStyle = L;
5466                        c.lineWidth = A.lineThickness;
5467                        u = "solid";
5468                        if (c.setLineDash) {
5469                            var I = G(A.nullDataLineDashType, A.lineThickness);
5470                            u = A.lineDashType;
5471                            var da = G(u, A.lineThickness);
5472                            c.setLineDash(da)
5473                        }
5474                        for (var ea = !0, p = 0; p < k.length; p++) {
5475                            w = k[p];
5476                            var $ = null,
5477                                $ = 0 <= A.dataPointIndexes[w] ? z[A.dataPointIndexes[w]] : {
5478                                    x: w,
5479                                    y: null
5480                                };
5481                            if (!(w < a.axisX.dataInfo.viewPortMin ||
5482                                w > a.axisX.dataInfo.viewPortMax && (!A.connectNullData || !ea)))
5483                                if ("number" !== typeof $.y) A.connectNullData || (ea || s) || f(), ea = !0;
5484                                else {
5485                                    var xa;
5486                                    xa = 0 !== a.dataPointYSums[w] ? 100 * ($.y / a.dataPointYSums[w]) : 0;
5487                                    n = a.axisX.convertValueToPixel(w);
5488                                    var oa = l[w] ? l[w] : 0;
5489                                    if (a.axisY.logarithmic || a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length) {
5490                                        r[w] = xa + (r[w] ? r[w] : 0);
5491                                        if (0 >= r[w] && a.axisY.logarithmic) continue;
5492                                        d = a.axisY.convertValueToPixel(r[w])
5493                                    } else d = a.axisY.convertValueToPixel(xa), d -= oa;
5494                                    t.push({
5495                                        x: n,
5496                                        y: q - oa
5497                                    });
5498                                    l[w] =
5499                                        q - d;
5500                                    s || ea ? (!s && A.connectNullData ? (c.setLineDash && (A.options.nullDataLineDashType || u === A.lineDashType && A.lineDashType !== A.nullDataLineDashType) && (s = t.pop(), u = t[t.length - 1], f(), c.moveTo(m.x, m.y), t.push(u), t.push(s), u = A.nullDataLineDashType, c.setLineDash(I)), c.lineTo(n, d), v && y.lineTo(n, d)) : (c.beginPath(), c.moveTo(n, d), v && (y.beginPath(), y.moveTo(n, d))), ea = s = !1) : (c.lineTo(n, d), v && y.lineTo(n, d), 0 == p % 250 && (f(), c.moveTo(n, d), v && y.moveTo(n, d), t.push({
5501                                        x: n,
5502                                        y: q - oa
5503                                    })));
5504                                    m = {
5505                                        x: n,
5506                                        y: d
5507                                    };
5508                                    p < z.length - 1 && (J !== (z[p].lineColor ||
5509                                    L) || u !== (z[p].lineDashType || A.lineDashType)) && (f(), c.beginPath(), c.moveTo(n, d), t.push({
5510                                        x: n,
5511                                        y: q - oa
5512                                    }), J = z[p].lineColor || L, c.strokeStyle = J, c.setLineDash && (z[p].lineDashType ? (u = z[p].lineDashType, c.setLineDash(G(u, A.lineThickness))) : (u = A.lineDashType, c.setLineDash(da))));
5513                                    if (0 <= A.dataPointIndexes[w]) {
5514                                        var E = A.dataPointIds[A.dataPointIndexes[w]];
5515                                        this._eventManager.objectMap[E] = {
5516                                            id: E,
5517                                            objectType: "dataPoint",
5518                                            dataSeriesIndex: B,
5519                                            dataPointIndex: A.dataPointIndexes[w],
5520                                            x1: n,
5521                                            y1: d
5522                                        }
5523                                    }
5524                                    0 <= A.dataPointIndexes[w] && 0 !== $.markerSize &&
5525                                    (0 < $.markerSize || 0 < A.markerSize) && (w = A.getMarkerProperties(p, n, d, c), h.push(w), markerColor = R(E), v && h.push({
5526                                        x: n,
5527                                        y: d,
5528                                        ctx: y,
5529                                        type: w.type,
5530                                        size: w.size,
5531                                        color: markerColor,
5532                                        borderColor: markerColor,
5533                                        borderThickness: w.borderThickness
5534                                    }));
5535                                    ($.indexLabel || A.indexLabel || $.indexLabelFormatter || A.indexLabelFormatter) && this._indexLabels.push({
5536                                        chartType: "stackedArea100",
5537                                        dataPoint: $,
5538                                        dataSeries: A,
5539                                        point: {
5540                                            x: n,
5541                                            y: d
5542                                        },
5543                                        direction: 0 > z[p].y === a.axisY.reversed ? 1 : -1,
5544                                        color: e
5545                                    })
5546                                }
5547                        }
5548                        f();
5549                        c.moveTo(n, d);
5550                        v && y.moveTo(n, d)
5551                    }
5552                    delete A.dataPointIndexes
5553                }
5554                ja.drawMarkers(h);
5555                v && (b.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(g.x1, g.y1, g.width, g.height), y.restore(
5555));
5556                c.restore();
5557                return {
5558                    source: b,
5559                    dest: this.plotArea.ctx,
5560                    animationCallback: H.xClipAnimation,
5561                    easingFunction: H.easing.linear,
5562                    animationBase: 0
5563                }
5564            }
5565        };
5566        q.prototype.renderBubble = function(a) {
5567            var f = a.targetCanvasCtx || this.plotArea.ctx,
5568                b = v ? this._preRenderCtx : f;
5569            if (!(0 >= a.dataSeriesIndexes.length)) {
5570                var c = this.plotArea,
5571                    e = 0,
5572                    g, h;
5573                b.save();
5574                v && this._eventManager.ghostCtx.save();
5575                b.beginPath();
5576                b.rect(c.x1, c.y1, c.width, c.height);
5577                b.clip();
5578                v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(c.x1, c.y1, c.width, c.height), this._eventManager.ghostCtx.clip());
5579                for (var l = -Infinity, t = Infinity, k = 0; k <
5580                a.dataSeriesIndexes.length; k++)
5581                    for (var r = a.dataSeriesIndexes[k], p = this.data[r], n = p.dataPoints, d = 0, 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 || (d = n[e].z, d > l && (l = d), d < t && (t = d));
5582                for (var w = 25 * Math.PI, m = Math.max(Math.pow(0.25 * Math.min(c.height, c.width) / 2, 2) * Math.PI, w), k = 0; k < a.dataSeriesIndexes.length; k++)
5583                    if (r = a.dataSeriesIndexes[k], p = this.data[r], n = p.dataPoints, 0 < n.length)
5584                        for (b.strokeStyle = "#4572A7 ",
5585                                 e = 0; e < n.length; e++)
5586                            if (g = n[e].getTime ? g = n[e].x.getTime() : g = n[e].x, !(g < a.axisX.dataInfo.viewPortMin || g > a.axisX.dataInfo.viewPortMax) && "number" === typeof n[e].y) {
5587                                g = a.axisX.convertValueToPixel(g);
5588                                h = a.axisY.convertValueToPixel(n[e].y);
5589                                var d = n[e].z,
5590                                    s = 2 * Math.max(Math.sqrt((l === t ? m / 2 : w + (m - w) / (l - t) * (d - t)) / Math.PI) << 0, 1),
5591                                    d = p.getMarkerProperties(e, b);
5592                                d.size = s;
5593                                b.globalAlpha = p.fillOpacity;
5594                                ja.drawMarker(g, h, b, d.type, d.size, d.color, d.borderColor, d.borderThickness);
5595                                b.globalAlpha = 1;
5596                                var u = p.dataPointIds[e];
5597                                this._eventManager.objectMap[u] = {
5598                                    id: u,
5599                                    objectType: "dataPoint",
5600                                    dataSeriesIndex: r,
5601                                    dataPointIndex: e,
5602                                    x1: g,
5603                                    y1: h,
5604                                    size: s
5605                                };
5606                                s = R(u);
5607                                v && ja.drawMarker(g, h, this._eventManager.ghostCtx, d.type, d.size, s, s, d.borderThickness);
5608                                (n[e].indexLabel || p.indexLabel || n[e].indexLabelFormatter || p.indexLabelFormatter) && this._indexLabels.push({
5609                                    chartType: "bubble",
5610                                    dataPoint: n[e],
5611                                    dataSeries: p,
5612                                    point: {
5613                                        x: g,
5614                                        y: h
5615                                    },
5616                                    direction: 1,
5617                                    bounds: {
5618                                        x1: g - d.size / 2,
5619                                        y1: h - d.size / 2,
5620                                        x2: g + d.size / 2,
5621                                        y2: h + d.size / 2
5622                                    },
5623                                    color: null
5624                                })
5625                            }
5626                v && (f.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation =
5627                    "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.clearRect(c.x1, c.y1, c.width, c.height), this._eventManager.ghostCtx.restore(
5627));
5628                b.restore();
5629                return {
5630                    source: f,
5631                    dest: this.plotArea.ctx,
5632                    animationCallback: H.fadeInAnimation,
5633                    easingFunction: H.easing.easeInQuad,
5634                    animationBase: 0
5635                }
5636            }
5637        };
5638        q.prototype.renderScatter =
5639            function(a) {
5640                var f = a.targetCanvasCtx || this.plotArea.ctx,
5641                    b = v ? this._preRenderCtx : f;
5642                if (!(0 >= a.dataSeriesIndexes.length)) {
5643                    var c = this.plotArea,
5644                        e = 0,
5645                        g, h;
5646                    b.save();
5647                    v && this._eventManager.ghostCtx.save();
5648                    b.beginPath();
5649                    b.rect(c.x1, c.y1, c.width, c.height);
5650                    b.clip();
5651                    v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(c.x1, c.y1, c.width, c.height), this._eventManager.ghostCtx.clip());
5652                    for (var l = 0; l < a.dataSeriesIndexes.length; l++) {
5653                        var t = a.dataSeriesIndexes[l],
5654                            k = this.data[t],
5655                            r = k.dataPoints;
5656                        if (0 <
5657                            r.length) {
5658                            b.strokeStyle = "#4572A7 ";
5659                            Math.pow(0.3 * Math.min(c.height, c.width) / 2, 2);
5660                            for (var p = 0, n = 0, e = 0; e < r.length; e++)
5661                                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) {
5662                                    g = a.axisX.convertValueToPixel(g);
5663                                    h = a.axisY.convertValueToPixel(r[e].y);
5664                                    var d = k.getMarkerProperties(e, g, h, b);
5665                                    b.globalAlpha = k.fillOpacity;
5666                                    ja.drawMarker(d.x, d.y, d.ctx, d.type, d.size, d.color, d.borderColor, d.borderThickness);
5667                                    b.globalAlpha = 1;
5668                                    Math.sqrt((p -
5669                                        g) * (p - g) + (n - h) * (n - h)) < Math.min(d.size, 5) && r.length > Math.min(this.plotArea.width, this.plotArea.height) || (p = k.dataPointIds[e], this._eventManager.objectMap[p] = {
5670                                        id: p,
5671                                        objectType: "dataPoint",
5672                                        dataSeriesIndex: t,
5673                                        dataPointIndex: e,
5674                                        x1: g,
5675                                        y1: h
5676                                    }, p = R(p), v && ja.drawMarker(d.x, d.y, this._eventManager.ghostCtx, d.type, d.size, p, p, d.borderThickness), (r[e].indexLabel || k.indexLabel || r[e].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({
5677                                        chartType: "scatter",
5678                                        dataPoint: r[e],
5679                                        dataSeries: k,
5680                                        point: {
5681                                            x: g,
5682                                            y: h
5683                                        },
5684                                        direction: 1,
5685                                        bounds: {
5686                                            x1: g - d.size / 2,
5687                                            y1: h - d.size / 2,
5688                                            x2: g + d.size / 2,
5689                                            y2: h + d.size / 2
5690                                        },
5691                                        color: null
5692                                    }), p = g, n = h)
5693                                }
5694                        }
5695                    }
5696                    v && (f.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.clearRect(c.x1, c.y1, c.width, c.height), this._eventManager.ghostCtx.restore(
5696));
5697                    b.restore();
5698                    return {
5699                        source: f,
5700                        dest: this.plotArea.ctx,
5701                        animationCallback: H.fadeInAnimation,
5702                        easingFunction: H.easing.easeInQuad,
5703                        animationBase: 0
5704                    }
5705                }
5706            };
5707        q.prototype.renderCandlestick = function(a) {
5708            var f = a.targetCanvasCtx || this.plotArea.ctx,
5709                b = v ? this._preRenderCtx : f,
5710                c = this._eventManager.ghostCtx;
5711            if (!(0 >= a.dataSeriesIndexes.length)) {
5712                var e = null,
5713                    g = null,
5714                    h = this.plotArea,
5715                    l = 0,
5716                    t, k, r, p, n, d, e = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1,
5717                    g = this.dataPointMaxWidth ? this.dataPointMaxWidth :
5718                        this.dataPointWidth ? this.dataPointWidth : 0.015 * this.width,
5719                    w = a.axisX.dataInfo.minDiff;
5720                isFinite(w) || (w = 0.3 * Math.abs(a.axisX.range));
5721                w = this.dataPointWidth ? this.dataPointWidth : 0.7 * h.width * (a.axisX.logarithmic ? Math.log(w) / Math.log(a.axisX.range) : Math.abs(w) / Math.abs(a.axisX.range)) << 0;
5722                this.dataPointMaxWidth && e > g && (e = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, g));
5723                !this.dataPointMaxWidth && (this.dataPointMinWidth && g < e) && (g = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, e));
5724                w < e &&
5725                (w = e);
5726                w > g && (w = g);
5727                b.save();
5728                v && c.save();
5729                b.beginPath();
5730                b.rect(h.x1, h.y1, h.width, h.height);
5731                b.clip();
5732                v && (c.beginPath(), c.rect(h.x1, h.y1, h.width, h.height), c.clip());
5733                for (var m = 0; m < a.dataSeriesIndexes.length; m++) {
5734                    var s = a.dataSeriesIndexes[m],
5735                        u = this.data[s],
5736                        q = u.dataPoints;
5737                    if (0 < q.length)
5738                        for (var ca = 5 < w && u.bevelEnabled ? !0 : !1, l = 0; l < q.length; l++)
5739                            if (q[l].getTime ? d = q[l].x.getTime() : d = q[l].x, !(d < a.axisX.dataInfo.viewPortMin || d > a.axisX.dataInfo.viewPortMax) && !y(q[l].y) && q[l].y.length && "number" === typeof q[l].y[0] &&
5740                                "number" === typeof q[l].y[1] && "number" === typeof q[l].y[2] && "number" === typeof q[l].y[3]) {
5741                                t = a.axisX.convertValueToPixel(d);
5742                                k = a.axisY.convertValueToPixel(q[l].y[0]);
5743                                r = a.axisY.convertValueToPixel(q[l].y[1]);
5744                                p = a.axisY.convertValueToPixel(q[l].y[2]);
5745                                n = a.axisY.convertValueToPixel(q[l].y[3]);
5746                                var x = t - w / 2 << 0,
5747                                    B = x + w << 0,
5748                                    g = u.options.fallingColor ? u.fallingColor : u._colorSet[0],
5749                                    e = q[l].color ? q[l].color : u._colorSet[0],
5750                                    A = Math.round(Math.max(1, 0.15 * w)),
5751                                    z = 0 === A % 2 ? 0 : 0.5,
5752                                    L = u.dataPointIds[l];
5753                                this._eventManager.objectMap[L] = {
5754                                    id: L,
5755                                    objectType: "dataPoint",
5756                                    dataSeriesIndex: s,
5757                                    dataPointIndex: l,
5758                                    x1: x,
5759                                    y1: k,
5760                                    x2: B,
5761                                    y2: r,
5762                                    x3: t,
5763                                    y3: p,
5764                                    x4: t,
5765                                    y4: n,
5766                                    borderThickness: A,
5767                                    color: e
5768                                };
5769                                b.strokeStyle = e;
5770                                b.beginPath();
5771                                b.lineWidth = A;
5772                                c.lineWidth = Math.max(A, 4);
5773                                "candlestick" === u.type ? (b.moveTo(t - z, r), b.lineTo(t - z, Math.min(k, n)), b.stroke(), b.moveTo(t - z, Math.max(k, n)), b.lineTo(t - z, p), b.stroke(), V(b, x, Math.min(k, n), B, Math.max(k, n), q[l].y[0] <= q[l].y[3] ? u.risingColor : g, A, e, ca, ca, !1, !1, u.fillOpacity), v && (e = R(L), c.strokeStyle = e, c.moveTo(t - z, r), c.lineTo(t - z, Math.min(k,
5774                                    n)), c.stroke(), c.moveTo(t - z, Math.max(k, n)), c.lineTo(t - z, p), c.stroke(), V(c, x, Math.min(k, n), B, Math.max(k, n), e, 0, null, !1, !1, !1, !1))) : "ohlc" === u.type && (b.moveTo(t - z, r), b.lineTo(t - z, p), b.stroke(), b.beginPath(), b.moveTo(t, k), b.lineTo(x, k), b.stroke(), b.beginPath(), b.moveTo(t, n), b.lineTo(B, n), b.stroke(), v && (e = R(L), c.strokeStyle = e, c.moveTo(t - z, r), c.lineTo(t - z, p), c.stroke(), c.beginPath(), c.moveTo(t, k), c.lineTo(x, k), c.stroke(), c.beginPath(), c.moveTo(t, n), c.lineTo(B, n), c.stroke()));
5775                                (q[l].indexLabel || u.indexLabel ||
5776                                q[l].indexLabelFormatter || u.indexLabelFormatter) && this._indexLabels.push({
5777                                    chartType: u.type,
5778                                    dataPoint: q[l],
5779                                    dataSeries: u,
5780                                    point: {
5781                                        x: x + (B - x) / 2,
5782                                        y: a.axisY.reversed ? p : r
5783                                    },
5784                                    direction: 1,
5785                                    bounds: {
5786                                        x1: x,
5787                                        y1: Math.min(r, p),
5788                                        x2: B,
5789                                        y2: Math.max(r, p)
5790                                    },
5791                                    color: e
5792                                })
5793                            }
5794                }
5795                v && (f.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height),
5796                this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.clearRect(h.x1, h.y1, h.width, h.height), c.restore(
5796));
5797                b.restore();
5798                return {
5799                    source: f,
5800                    dest: this.plotArea.ctx,
5801                    animationCallback: H.fadeInAnimation,
5802                    easingFunction: H.easing.easeInQuad,
5803                    animationBase: 0
5804                }
5805            }
5806        };
5807        q.prototype.renderBoxAndWhisker = function(a) {
5808            var f = a.targetCanvasCtx || this.plotArea.ctx,
5809                b = v ? this._preRenderCtx : f,
5810                c = this._eventManager.ghostCtx;
5811            if (!(0 >= a.dataSeriesIndexes.length)) {
5812                var e = null,
5813                    g = this.plotArea,
5814                    h = 0,
5815                    l, t, k, r, p, n, d, e = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1,
5816                    h = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.015 * this.width,
5817                    w = a.axisX.dataInfo.minDiff;
5818                isFinite(w) || (w = 0.3 * Math.abs(a.axisX.range));
5819                w = this.dataPointWidth ? this.dataPointWidth : 0.7 * g.width * (a.axisX.logarithmic ? Math.log(w) / Math.log(a.axisX.range) : Math.abs(w) / Math.abs(a.axisX.range)) << 0;
5820                this.dataPointMaxWidth && e > h && (e = Math.min(this.dataPointWidth ? this.dataPointWidth :
5821                    Infinity, h));
5822                !this.dataPointMaxWidth && (this.dataPointMinWidth && h < e) && (h = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, e));
5823                w < e && (w = e);
5824                w > h && (w = h);
5825                b.save();
5826                v && c.save();
5827                b.beginPath();
5828                b.rect(g.x1, g.y1, g.width, g.height);
5829                b.clip();
5830                v && (c.beginPath(), c.rect(g.x1, g.y1, g.width, g.height), c.clip());
5831                for (var m = !1, m = !!a.axisY.reversed, s = 0; s < a.dataSeriesIndexes.length; s++) {
5832                    var u = a.dataSeriesIndexes[s],
5833                        q = this.data[u],
5834                        x = q.dataPoints;
5835                    if (0 < x.length)
5836                        for (var z = 5 < w && q.bevelEnabled ? !0 : !1, h = 0; h < x.length; h++)
5837                            if (x[h].getTime ?
5838                                    d = x[h].x.getTime() : d = x[h].x, !(d < a.axisX.dataInfo.viewPortMin || d > a.axisX.dataInfo.viewPortMax) && !y(x[h].y) && x[h].y.length && "number" === typeof x[h].y[0] && "number" === typeof x[h].y[1] && "number" === typeof x[h].y[2] && "number" === typeof x[h].y[3] && "number" === typeof x[h].y[4] && 5 === x[h].y.length) {
5839                                l = a.axisX.convertValueToPixel(d);
5840                                t = a.axisY.convertValueToPixel(x[h].y[0]);
5841                                k = a.axisY.convertValueToPixel(x[h].y[1]);
5842                                r = a.axisY.convertValueToPixel(x[h].y[2]);
5843                                p = a.axisY.convertValueToPixel(x[h].y[3]);
5844                                n = a.axisY.convertValueToPixel(x[h].y[4]);
5845                                var B = l - w / 2 << 0,
5846                                    A = l + w / 2 << 0,
5847                                    e = x[h].color ? x[h].color : q._colorSet[0],
5848                                    C = Math.round(Math.max(1, 0.15 * w)),
5849                                    L = 0 === C % 2 ? 0 : 0.5,
5850                                    J = x[h].whiskerColor ? x[h].whiskerColor : x[h].color ? q.whiskerColor ? q.whiskerColor : x[h].color : q.whiskerColor ? q.whiskerColor : e,
5851                                    I = "number" === typeof x[h].whiskerThickness ? x[h].whiskerThickness : "number" === typeof q.options.whiskerThickness ? q.whiskerThickness : C,
5852                                    da = x[h].whiskerDashType ? x[h].whiskerDashType : q.whiskerDashType,
5853                                    ea = y(x[h].whiskerLength) ? y(q.options.whiskerLength) ? w : q.whiskerLength : x[h].whiskerLength,
5854                                    ea = "number" === typeof ea ? 0 >= ea ? 0 : ea >= w ? w : ea : "string" === typeof ea ? parseInt(ea) * w / 100 > w ? w : parseInt(ea) * w / 100 : w,
5855                                    $ = 1 === Math.round(I) % 2 ? 0.5 : 0,
5856                                    xa = x[h].stemColor ? x[h].stemColor : x[h].color ? q.stemColor ? q.stemColor : x[h].color : q.stemColor ? q.stemColor : e,
5857                                    oa = "number" === typeof x[h].stemThickness ? x[h].stemThickness : "number" === typeof q.options.stemThickness ? q.stemThickness : C,
5858                                    E = 1 === Math.round(oa) % 2 ? 0.5 : 0,
5859                                    eb = x[h].stemDashType ? x[h].stemDashType : q.stemDashType,
5860                                    P = x[h].lineColor ? x[h].lineColor : x[h].color ? q.lineColor ? q.lineColor :
5861                                        x[h].color : q.lineColor ? q.lineColor : e,
5862                                    O = "number" === typeof x[h].lineThickness ? x[h].lineThickness : "number" === typeof q.options.lineThickness ? q.lineThickness : C,
5863                                    Q = x[h].lineDashType ? x[h].lineDashType : q.lineDashType,
5864                                    K = 1 === Math.round(O) % 2 ? 0.5 : 0,
5865                                    N = q.upperBoxColor,
5866                                    U = q.lowerBoxColor,
5867                                    ta = y(q.options.fillOpacity) ? 1 : q.fillOpacity,
5868                                    M = q.dataPointIds[h];
5869                                this._eventManager.objectMap[M] = {
5870                                    id: M,
5871                                    objectType: "dataPoint",
5872                                    dataSeriesIndex: u,
5873                                    dataPointIndex: h,
5874                                    x1: B,
5875                                    y1: t,
5876                                    x2: A,
5877                                    y2: k,
5878                                    x3: l,
5879                                    y3: r,
5880                                    x4: l,
5881                                    y4: p,
5882                                    y5: n,
5883                                    borderThickness: C,
5884                                    color: e,
5885                                    stemThickness: oa,
5886                                    stemColor: xa,
5887                                    whiskerThickness: I,
5888                                    whiskerLength: ea,
5889                                    whiskerColor: J,
5890                                    lineThickness: O,
5891                                    lineColor: P
5892                                };
5893                                b.save();
5894                                0 < oa && (b.beginPath(), b.strokeStyle = xa, b.lineWidth = oa, b.setLineDash && b.setLineDash(G(eb, oa)), b.moveTo(l - E, k), b.lineTo(l - E, t), b.stroke(), b.moveTo(l - E, p), b.lineTo(l - E, r), b.stroke());
5895                                b.restore();
5896                                c.lineWidth = Math.max(C, 4);
5897                                b.beginPath();
5898                                V(b, B, Math.min(n, k), A, Math.max(k, n), U, 0, e, m ? z : !1, m ? !1 : z, !1, !1, ta);
5899                                b.beginPath();
5900                                V(b, B, Math.min(r, n), A, Math.max(n, r), N, 0, e, m ? !1 : z, m ? z : !1, !1, !1, ta);
5901                                b.beginPath();
5902                                b.lineWidth = C;
5903                                b.strokeStyle = e;
5904                                b.rect(B - L, Math.min(k, r) - L, A - B + 2 * L, Math.max(k, r) - Math.min(k, r) + 2 * L);
5905                                b.stroke();
5906                                b.save();
5907                                0 < O && (b.beginPath(), b.globalAlpha = 1, b.setLineDash && b.setLineDash(G(Q, O)), b.strokeStyle = P, b.lineWidth = O, b.moveTo(B, n - K), b.lineTo(A, n - K), b.stroke());
5908                                b.restore();
5909                                b.save();
5910                                0 < I && (b.beginPath(), b.setLineDash && b.setLineDash(G(da, I)), b.strokeStyle = J, b.lineWidth = I, b.moveTo(l - ea / 2 << 0, p - $), b.lineTo(l + ea / 2 << 0, p - $), b.stroke(), b.moveTo(l - ea / 2 << 0, t + $), b.lineTo(l + ea / 2 << 0, t + $), b.stroke());
5911                                b.restore();
5912                                v && (e = R(M), c.strokeStyle = e, c.lineWidth = oa, 0 < oa && (c.moveTo(l - L - E, k), c.lineTo(l - L - E, Math.max(t, p)), c.stroke(), c.moveTo(l - L - E, Math.min(t, p)), c.lineTo(l - L - E, r), c.stroke()), V(c, B, Math.max(k, r), A, Math.min(k, r), e, 0, null, !1, !1, !1, !1), 0 < I && (c.beginPath(), c.lineWidth = I, c.moveTo(l + ea / 2, p - $), c.lineTo(l - ea / 2, p - $), c.stroke(), c.moveTo(l + ea / 2, t + $), c.lineTo(l - ea / 2, t + $), c.stroke()));
5913                                (x[h].indexLabel || q.indexLabel || x[h].indexLabelFormatter || q.indexLabelFormatter) && this._indexLabels.push({
5914                                    chartType: q.type,
5915                                    dataPoint: x[h],
5916                                    dataSeries: q,
5917                                    point: {
5918                                        x: B + (A - B) / 2,
5919                                        y: a.axisY.reversed ? t : p
5920                                    },
5921                                    direction: 1,
5922                                    bounds: {
5923                                        x1: B,
5924                                        y1: Math.min(t, p),
5925                                        x2: A,
5926                                        y2: Math.max(t, p)
5927                                    },
5928                                    color: e
5929                                })
5930                            }
5931                }
5932                v && (f.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height),
5933                    b.clearRect(g.x1, g.y1, g.width, g.height), c.restore());
5934                b.restore();
5935                return {
5936                    source: f,
5937                    dest: this.plotArea.ctx,
5938                    animationCallback: H.fadeInAnimation,
5939                    easingFunction: H.easing.easeInQuad,
5940                    animationBase: 0
5941                }
5942            }
5943        };
5944        q.prototype.renderRangeColumn = function(a) {
5945            var f = a.targetCanvasCtx || this.plotArea.ctx,
5946                b = v ? this._preRenderCtx : f;
5947            if (!(0 >= a.dataSeriesIndexes.length)) {
5948                var c = null,
5949                    e = this.plotArea,
5950                    g = 0,
5951                    h, l, t, g = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1;
5952                h = this.dataPointMaxWidth ? this.dataPointMaxWidth :
5953                    this.dataPointWidth ? this.dataPointWidth : 0.03 * this.width;
5954                var k = a.axisX.dataInfo.minDiff;
5955                isFinite(k) || (k = 0.3 * Math.abs(a.axisX.range));
5956                k = this.dataPointWidth ? this.dataPointWidth : 0.9 * (e.width * (a.axisX.logarithmic ? Math.log(k) / Math.log(a.axisX.range) : Math.abs(k) / Math.abs(a.axisX.range)) / a.plotType.totalDataSeries
5956) << 0;
5957                this.dataPointMaxWidth && g > h && (g = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, h));
5958                !this.dataPointMaxWidth && (this.dataPointMinWidth && h < g) && (h = Math.max(this.dataPointWidth ? this.dataPointWidth :
5959                    -Infinity, g));
5960                k < g && (k = g);
5961                k > h && (k = h);
5962                b.save();
5963                v && this._eventManager.ghostCtx.save();
5964                b.beginPath();
5965                b.rect(e.x1, e.y1, e.width, e.height);
5966                b.clip();
5967                v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip());
5968                for (var r = 0; r < a.dataSeriesIndexes.length; r++) {
5969                    var p = a.dataSeriesIndexes[r],
5970                        n = this.data[p],
5971                        d = n.dataPoints;
5972                    if (0 < d.length)
5973                        for (var w = 5 < k && n.bevelEnabled ? !0 : !1, g = 0; g < d.length; g++)
5974                            if (d[g].getTime ? t = d[g].x.getTime() : t = d[g].x, !(t <
5975                                a.axisX.dataInfo.viewPortMin || t > a.axisX.dataInfo.viewPortMax) && !y(d[g].y) && d[g].y.length && "number" === typeof d[g].y[0] && "number" === typeof d[g].y[1]) {
5976                                c = a.axisX.convertValueToPixel(t);
5977                                h = a.axisY.convertValueToPixel(d[g].y[0]);
5978                                l = a.axisY.convertValueToPixel(d[g].y[1]);
5979                                var m = a.axisX.reversed ? c + a.plotType.totalDataSeries * k / 2 - (a.previousDataSeriesCount + r) * k << 0 : c - a.plotType.totalDataSeries * k / 2 + (a.previousDataSeriesCount + r) * k << 0,
5980                                    q = a.axisX.reversed ? m - k << 0 : m + k << 0,
5981                                    c = d[g].color ? d[g].color : n._colorSet[g % n._colorSet.length];
5982                                if (h > l) {
5983                                    var u = h;
5984                                    h = l;
5985                                    l = u
5986                                }
5987                                u = n.dataPointIds[g];
5988                                this._eventManager.objectMap[u] = {
5989                                    id: u,
5990                                    objectType: "dataPoint",
5991                                    dataSeriesIndex: p,
5992                                    dataPointIndex: g,
5993                                    x1: m,
5994                                    y1: h,
5995                                    x2: q,
5996                                    y2: l
5997                                };
5998                                V(b, m, h, q, l, c, 0, c, w, w, !1, !1, n.fillOpacity);
5999                                c = R(u);
6000                                v && V(this._eventManager.ghostCtx, m, h, q, l, c, 0, null, !1, !1, !1, !1);
6001                                if (d[g].indexLabel || n.indexLabel || d[g].indexLabelFormatter || n.indexLabelFormatter) this._indexLabels.push({
6002                                    chartType: "rangeColumn",
6003                                    dataPoint: d[g],
6004                                    dataSeries: n,
6005                                    indexKeyword: 0,
6006                                    point: {
6007                                        x: m + (q - m) / 2,
6008                                        y: d[g].y[1] >= d[g].y[0] ? l : h
6009                                    },
6010                                    direction: d[g].y[1] >=
6011                                    d[g].y[0] ? -1 : 1,
6012                                    bounds: {
6013                                        x1: m,
6014                                        y1: Math.min(h, l),
6015                                        x2: q,
6016                                        y2: Math.max(h, l)
6017                                    },
6018                                    color: c
6019                                }), this._indexLabels.push({
6020                                    chartType: "rangeColumn",
6021                                    dataPoint: d[g],
6022                                    dataSeries: n,
6023                                    indexKeyword: 1,
6024                                    point: {
6025                                        x: m + (q - m) / 2,
6026                                        y: d[g].y[1] >= d[g].y[0] ? h : l
6027                                    },
6028                                    direction: d[g].y[1] >= d[g].y[0] ? 1 : -1,
6029                                    bounds: {
6030                                        x1: m,
6031                                        y1: Math.min(h, l),
6032                                        x2: q,
6033                                        y2: Math.max(h, l)
6034                                    },
6035                                    color: c
6036                                })
6037                            }
6038                }
6039                v && (f.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height),
6040                a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.clearRect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.restore(
6040));
6041                b.restore();
6042                return {
6043                    source: f,
6044                    dest: this.plotArea.ctx,
6045                    animationCallback: H.fadeInAnimation,
6046                    easingFunction: H.easing.easeInQuad,
6047                    animationBase: 0
6048                }
6049            }
6050        };
6051        q.prototype.renderError = function(a) {
6052            var f = a.targetCanvasCtx || this.plotArea.ctx,
6053                b = v ? this._preRenderCtx :
6054                    f,
6055                c = a.axisY._position ? "left" === a.axisY._position || "right" === a.axisY._position ? !1 : !0 : !1;
6056            if (!(0 >= a.dataSeriesIndexes.length)) {
6057                var e = null,
6058                    g = !1,
6059                    h = this.plotArea,
6060                    l = 0,
6061                    t, k, r, p, n, d, w, m = a.axisX.dataInfo.minDiff;
6062                isFinite(m) || (m = 0.3 * Math.abs(a.axisX.range));
6063                b.save();
6064                v && this._eventManager.ghostCtx.save();
6065                b.beginPath();
6066                b.rect(h.x1, h.y1, h.width, h.height);
6067                b.clip();
6068                v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(h.x1, h.y1, h.width, h.height), this._eventManager.ghostCtx.clip());
6069                for (var q =
6070                    0, u = 0; u < this.data.length; u++) !this.data[u].type.match(/(bar|column)/ig) || !this.data[u].visible || this.data[u].type.match(/(stacked)/ig) && q || q++;
6071                for (var s = 0; s < a.dataSeriesIndexes.length; s++) {
6072                    var x = a.dataSeriesIndexes[s],
6073                        ba = this.data[x],
6074                        B = ba.dataPoints,
6075                        A = y(ba._linkedSeries) ? !1 : ba._linkedSeries.type.match(/(bar|column)/ig) && ba._linkedSeries.visible ? !0 : !1,
6076                        C = 0;
6077                    if (A)
6078                        for (e = ba._linkedSeries.id, u = 0; u < e; u++) !this.data[u].type.match(/(bar|column)/ig) || !this.data[u].visible || this.data[u].type.match(/(stacked)/ig) &&
6079                        C || (this.data[u].type.match(/(range)/ig) && (g = !0), C++);
6080                    e = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1;
6081                    l = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : c ? Math.min(0.15 * this.height, 0.9 * (this.plotArea.height / (A ? q : 1))) << 0 : 0.3 * this.width;
6082                    g && (l = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : c ? Math.min(0.15 * this.height, 0.9 * (this.plotArea.height / (A ? q : 1))) << 0 : 0.03 * this.width);
6083                    u = this.options.dataPointWidth ?
6084                        this.dataPointWidth : 0.9 * ((c ? h.height : h.width) * (a.axisX.logarithmic ? Math.log(m) / Math.log(a.axisX.range) : Math.abs(m) / Math.abs(a.axisX.range)) / (A ? q : 1)) << 0;
6085                    this.dataPointMaxWidth && e > l && (e = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, l));
6086                    !this.dataPointMaxWidth && (this.dataPointMinWidth && l < e) && (l = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, e));
6087                    u < e && (u = e);
6088                    u > l && (u = l);
6089                    if (0 < B.length)
6090                        for (var L = ba._colorSet, l = 0; l < B.length; l++) {
6091                            var e = ba.lineColor = ba.options.color ? ba.options.color : L[0],
6092                                J = {
6093                                    color: B[l].whiskerColor ? B[l].whiskerColor : B[l].color ? ba.whiskerColor ? ba.whiskerColor : B[l].color : ba.whiskerColor ? ba.whiskerColor : e,
6094                                    thickness: y(B[l].whiskerThickness) ? ba.whiskerThickness : B[l].whiskerThickness,
6095                                    dashType: B[l].whiskerDashType ? B[l].whiskerDashType : ba.whiskerDashType,
6096                                    length: y(B[l].whiskerLength) ? y(ba.options.whiskerLength) ? u : ba.options.whiskerLength : B[l].whiskerLength,
6097                                    trimLength: y(B[l].whiskerLength) ? y(ba.options.whiskerLength) ? 50 : 0 : 0
6098                                };
6099                            J.length = "number" === typeof J.length ? 0 >= J.length ? 0 :
6100                                J.length >= u ? u : J.length : "string" === typeof J.length ? parseInt(J.length) * u / 100 > u ? u : parseInt(J.length) * u / 100 > u : u;
6101                            J.thickness = "number" === typeof J.thickness ? 0 > J.thickness ? 0 : Math.round(J.thickness) : 2;
6102                            var I = {
6103                                color: B[l].stemColor ? B[l].stemColor : B[l].color ? ba.stemColor ? ba.stemColor : B[l].color : ba.stemColor ? ba.stemColor : e,
6104                                thickness: B[l].stemThickness ? B[l].stemThickness : ba.stemThickness,
6105                                dashType: B[l].stemDashType ? B[l].stemDashType : ba.stemDashType
6106                            };
6107                            I.thickness = "number" === typeof I.thickness ? 0 > I.thickness ? 0 : Math.round(I.thickness) :
6108                                2;
6109                            B[l].getTime ? w = B[l].x.getTime() : w = B[l].x;
6110                            if (!(w < a.axisX.dataInfo.viewPortMin || w > a.axisX.dataInfo.viewPortMax) && !y(B[l].y) && B[l].y.length && "number" === typeof B[l].y[0] && "number" === typeof B[l].y[1]) {
6111                                var da = a.axisX.convertValueToPixel(w);
6112                                c ? k = da : t = da;
6113                                da = a.axisY.convertValueToPixel(B[l].y[0]);
6114                                c ? r = da : n = da;
6115                                da = a.axisY.convertValueToPixel(B[l].y[1]);
6116                                c ? p = da : d = da;
6117                                c ? (n = a.axisX.reversed ? k + (A ? q : 1) * u / 2 - (A ? C - 1 : 0) * u << 0 : k - (A ? q : 1) * u / 2 + (A ? C - 1 : 0) * u << 0, d = a.axisX.reversed ? n - u << 0 : n + u << 0) : (r = a.axisX.reversed ? t + (A ? q : 1) * u /
6118                                    2 - (A ? C - 1 : 0) * u << 0 : t - (A ? q : 1) * u / 2 + (A ? C - 1 : 0) * u << 0, p = a.axisX.reversed ? r - u << 0 : r + u << 0);
6119                                !c && n > d && (da = n, n = d, d = da);
6120                                c && r > p && (da = r, r = p, p = da);
6121                                da = ba.dataPointIds[l];
6122                                this._eventManager.objectMap[da] = {
6123                                    id: da,
6124                                    objectType: "dataPoint",
6125                                    dataSeriesIndex: x,
6126                                    dataPointIndex: l,
6127                                    x1: Math.min(r, p),
6128                                    y1: Math.min(n, d),
6129                                    x2: Math.max(p, r),
6130                                    y2: Math.max(d, n),
6131                                    isXYSwapped: c,
6132                                    stemProperties: I,
6133                                    whiskerProperties: J
6134                                };
6135                                z(b, Math.min(r, p), Math.min(n, d), Math.max(p, r), Math.max(d, n), e, J, I, c);
6136                                v && z(this._eventManager.ghostCtx, r, n, p, d, e, J, I, c);
6137                                if (B[l].indexLabel ||
6138                                    ba.indexLabel || B[l].indexLabelFormatter || ba.indexLabelFormatter) this._indexLabels.push({
6139                                    chartType: "error",
6140                                    dataPoint: B[l],
6141                                    dataSeries: ba,
6142                                    indexKeyword: 0,
6143                                    point: {
6144                                        x: c ? B[l].y[1] >= B[l].y[0] ? r : p : r + (p - r) / 2,
6145                                        y: c ? n + (d - n) / 2 : B[l].y[1] >= B[l].y[0] ? d : n
6146                                    },
6147                                    direction: B[l].y[1] >= B[l].y[0] ? -1 : 1,
6148                                    bounds: {
6149                                        x1: c ? Math.min(r, p) : r,
6150                                        y1: c ? n : Math.min(n, d),
6151                                        x2: c ? Math.max(r, p) : p,
6152                                        y2: c ? d : Math.max(n, d)
6153                                    },
6154                                    color: e,
6155                                    axisSwapped: c
6156                                }), this._indexLabels.push({
6157                                    chartType: "error",
6158                                    dataPoint: B[l],
6159                                    dataSeries: ba,
6160                                    indexKeyword: 1,
6161                                    point: {
6162                                        x: c ? B[l].y[1] >= B[l].y[0] ?
6163                                            p : r : r + (p - r) / 2,
6164                                        y: c ? n + (d - n) / 2 : B[l].y[1] >= B[l].y[0] ? n : d
6165                                    },
6166                                    direction: B[l].y[1] >= B[l].y[0] ? 1 : -1,
6167                                    bounds: {
6168                                        x1: c ? Math.min(r, p) : r,
6169                                        y1: c ? n : Math.min(n, d),
6170                                        x2: c ? Math.max(r, p) : p,
6171                                        y2: c ? d : Math.max(n, d)
6172                                    },
6173                                    color: e,
6174                                    axisSwapped: c
6175                                })
6176                            }
6177                        }
6178                }
6179                v && (f.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
6180                    0, 0, this.width, this.height), b.clearRect(h.x1, h.y1, h.width, h.height), this._eventManager.ghostCtx.restore(
6180));
6181                b.restore();
6182                return {
6183                    source: f,
6184                    dest: this.plotArea.ctx,
6185                    animationCallback: H.fadeInAnimation,
6186                    easingFunction: H.easing.easeInQuad,
6187                    animationBase: 0
6188                }
6189            }
6190        };
6191        q.prototype.renderRangeBar = function(a) {
6192            var f = a.targetCanvasCtx || this.plotArea.ctx,
6193                b = v ? this._preRenderCtx : f;
6194            if (!(0 >= a.dataSeriesIndexes.length)) {
6195                var c = null,
6196                    e = this.plotArea,
6197                    g = 0,
6198                    h, l, t, k, g = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth :
6199                        1;
6200                h = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : Math.min(0.15 * this.height, 0.9 * (this.plotArea.height / a.plotType.totalDataSeries)) << 0;
6201                var r = a.axisX.dataInfo.minDiff;
6202                isFinite(r) || (r = 0.3 * Math.abs(a.axisX.range));
6203                r = this.dataPointWidth ? this.dataPointWidth : 0.9 * (e.height * (a.axisX.logarithmic ? Math.log(r) / Math.log(a.axisX.range) : Math.abs(r) / Math.abs(a.axisX.range)) / a.plotType.totalDataSeries) << 0;
6204                this.dataPointMaxWidth && g > h && (g = Math.min(this.dataPointWidth ? this.dataPointWidth :
6205                    Infinity, h));
6206                !this.dataPointMaxWidth && (this.dataPointMinWidth && h < g) && (h = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, g));
6207                r < g && (r = g);
6208                r > h && (r = h);
6209                b.save();
6210                v && this._eventManager.ghostCtx.save();
6211                b.beginPath();
6212                b.rect(e.x1, e.y1, e.width, e.height);
6213                b.clip();
6214                v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip());
6215                for (var p = 0; p < a.dataSeriesIndexes.length; p++) {
6216                    var n = a.dataSeriesIndexes[p],
6217                        d = this.data[n],
6218                        w = d.dataPoints;
6219                    if (0 < w.length) {
6220                        var m = 5 < r && d.bevelEnabled ? !0 : !1;
6221                        b.strokeStyle = "#4572A7 ";
6222                        for (g = 0; g < w.length; g++)
6223                            if (w[g].getTime ? k = w[g].x.getTime() : k = w[g].x, !(k < a.axisX.dataInfo.viewPortMin || k > a.axisX.dataInfo.viewPortMax) && !y(w[g].y) && w[g].y.length && "number" === typeof w[g].y[0] && "number" === typeof w[g].y[1]) {
6224                                h = a.axisY.convertValueToPixel(w[g].y[0]);
6225                                l = a.axisY.convertValueToPixel(w[g].y[1]);
6226                                t = a.axisX.convertValueToPixel(k);
6227                                t = a.axisX.reversed ? t + a.plotType.totalDataSeries * r / 2 - (a.previousDataSeriesCount + p) * r << 0 : t - a.plotType.totalDataSeries *
6228                                    r / 2 + (a.previousDataSeriesCount + p) * r << 0;
6229                                var q = a.axisX.reversed ? t - r << 0 : t + r << 0;
6230                                h > l && (c = h, h = l, l = c);
6231                                c = w[g].color ? w[g].color : d._colorSet[g % d._colorSet.length];
6232                                V(b, h, t, l, q, c, 0, null, m, !1, !1, !1, d.fillOpacity);
6233                                c = d.dataPointIds[g];
6234                                this._eventManager.objectMap[c] = {
6235                                    id: c,
6236                                    objectType: "dataPoint",
6237                                    dataSeriesIndex: n,
6238                                    dataPointIndex: g,
6239                                    x1: h,
6240                                    y1: t,
6241                                    x2: l,
6242                                    y2: q
6243                                };
6244                                c = R(c);
6245                                v && V(this._eventManager.ghostCtx, h, t, l, q, c, 0, null, !1, !1, !1, !1);
6246                                if (w[g].indexLabel || d.indexLabel || w[g].indexLabelFormatter || d.indexLabelFormatter) this._indexLabels.push({
6247                                    chartType: "rangeBar",
6248                                    dataPoint: w[g],
6249                                    dataSeries: d,
6250                                    indexKeyword: 0,
6251                                    point: {
6252                                        x: w[g].y[1] >= w[g].y[0] ? h : l,
6253                                        y: t + (q - t) / 2
6254                                    },
6255                                    direction: w[g].y[1] >= w[g].y[0] ? -1 : 1,
6256                                    bounds: {
6257                                        x1: Math.min(h, l),
6258                                        y1: t,
6259                                        x2: Math.max(h, l),
6260                                        y2: q
6261                                    },
6262                                    color: c
6263                                }), this._indexLabels.push({
6264                                    chartType: "rangeBar",
6265                                    dataPoint: w[g],
6266                                    dataSeries: d,
6267                                    indexKeyword: 1,
6268                                    point: {
6269                                        x: w[g].y[1] >= w[g].y[0] ? l : h,
6270                                        y: t + (q - t) / 2
6271                                    },
6272                                    direction: w[g].y[1] >= w[g].y[0] ? 1 : -1,
6273                                    bounds: {
6274                                        x1: Math.min(h, l),
6275                                        y1: t,
6276                                        x2: Math.max(h, l),
6277                                        y2: q
6278                                    },
6279                                    color: c
6280                                })
6281                            }
6282                    }
6283                }
6284                v && (f.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation =
6285                    "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.clearRect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.restore(
6285));
6286                b.restore();
6287                return {
6288                    source: f,
6289                    dest: this.plotArea.ctx,
6290                    animationCallback: H.fadeInAnimation,
6291                    easingFunction: H.easing.easeInQuad,
6292                    animationBase: 0
6293                }
6294            }
6295        };
6296        q.prototype.renderRangeArea =
6297            function(a) {
6298                function f() {
6299                    if (s) {
6300                        var a = null;
6301                        0 < r.lineThickness && c.stroke();
6302                        for (var b = t.length - 1; 0 <= b; b--) a = t[b], c.lineTo(a.x, a.y), e.lineTo(a.x, a.y);
6303                        c.closePath();
6304                        c.globalAlpha = r.fillOpacity;
6305                        c.fill();
6306                        c.globalAlpha = 1;
6307                        e.fill();
6308                        if (0 < r.lineThickness) {
6309                            c.beginPath();
6310                            c.moveTo(a.x, a.y);
6311                            for (b = 0; b < t.length; b++) a = t[b], c.lineTo(a.x, a.y);
6312                            c.stroke()
6313                        }
6314                        c.beginPath();
6315                        c.moveTo(w, m);
6316                        e.beginPath();
6317                        e.moveTo(w, m);
6318                        s = {
6319                            x: w,
6320                            y: m
6321                        };
6322                        t = [];
6323                        t.push({
6324                            x: w,
6325                            y: q
6326                        })
6327                    }
6328                }
6329                var b = a.targetCanvasCtx || this.plotArea.ctx,
6330                    c = v ? this._preRenderCtx : b;
6331                if (!(0 >=
6332                    a.dataSeriesIndexes.length)) {
6333                    var e = this._eventManager.ghostCtx,
6334                        g = [],
6335                        h = this.plotArea;
6336                    c.save();
6337                    v && e.save();
6338                    c.beginPath();
6339                    c.rect(h.x1, h.y1, h.width, h.height);
6340                    c.clip();
6341                    v && (e.beginPath(), e.rect(h.x1, h.y1, h.width, h.height), e.clip());
6342                    for (var l = 0; l < a.dataSeriesIndexes.length; l++) {
6343                        var t = [],
6344                            k = a.dataSeriesIndexes[l],
6345                            r = this.data[k],
6346                            p = r.dataPoints,
6347                            g = r.id;
6348                        this._eventManager.objectMap[g] = {
6349                            objectType: "dataSeries",
6350                            dataSeriesIndex: k
6351                        };
6352                        g = R(g);
6353                        e.fillStyle = g;
6354                        var g = [],
6355                            n = !0,
6356                            d = 0,
6357                            w, m, q, u, s = null;
6358                        if (0 < p.length) {
6359                            var y = r._colorSet[d %
6360                                r._colorSet.length],
6361                                x = r.lineColor = r.options.lineColor || y,
6362                                B = x;
6363                            c.fillStyle = y;
6364                            c.strokeStyle = x;
6365                            c.lineWidth = r.lineThickness;
6366                            var A = "solid";
6367                            if (c.setLineDash) {
6368                                var z = G(r.nullDataLineDashType, r.lineThickness),
6369                                    A = r.lineDashType,
6370                                    C = G(A, r.lineThickness);
6371                                c.setLineDash(C)
6372                            }
6373                            for (var J = !0; d < p.length; d++)
6374                                if (u = p[d].x.getTime ? p[d].x.getTime() : p[d].x, !(u < a.axisX.dataInfo.viewPortMin || u > a.axisX.dataInfo.viewPortMax && (!r.connectNullData || !J)))
6375                                    if (null !== p[d].y && p[d].y.length && "number" === typeof p[d].y[0] && "number" === typeof p[d].y[1]) {
6376                                        w =
6377                                            a.axisX.convertValueToPixel(u);
6378                                        m = a.axisY.convertValueToPixel(p[d].y[0]);
6379                                        q = a.axisY.convertValueToPixel(p[d].y[1]);
6380                                        n || J ? (r.connectNullData && !n ? (c.setLineDash && (r.options.nullDataLineDashType || A === r.lineDashType && r.lineDashType !== r.nullDataLineDashType) && (t[t.length - 1].newLineDashArray = C, A = r.nullDataLineDashType, c.setLineDash(z)), c.lineTo(w, m), v && e.lineTo(w, m), t.push({
6381                                            x: w,
6382                                            y: q
6383                                        })) : (c.beginPath(), c.moveTo(w, m), s = {
6384                                            x: w,
6385                                            y: m
6386                                        }, t = [], t.push({
6387                                            x: w,
6388                                            y: q
6389                                        }), v && (e.beginPath(), e.moveTo(w, m))), J = n = !1) : (c.lineTo(w, m), t.push({
6390                                            x: w,
6391                                            y: q
6392                                        }), v && e.lineTo(w, m), 0 == d % 250 && f());
6393                                        u = r.dataPointIds[d];
6394                                        this._eventManager.objectMap[u] 
6394= {
6395                                            id: u,
6396                                            objectType: "dataPoint",
6397                                            dataSeriesIndex: k,
6398                                            dataPointIndex: d,
6399                                            x1: w,
6400                                            y1: m,
6401                                            y2: q
6402                                        };
6403                                        d < p.length - 1 && (B !== (p[d].lineColor || x) || A !== (p[d].lineDashType || r.lineDashType)) && (f(), B = p[d].lineColor || x, t[t.length - 1].newStrokeStyle = B, c.strokeStyle = B, c.setLineDash && (p[d].lineDashType ? (A = p[d].lineDashType, t[t.length - 1].newLineDashArray = G(A, r.lineThickness), c.setLineDash(t[t.length - 1].newLineDashArray)) : (A = r.lineDashType, t[t.length -
6404                                        1].newLineDashArray = C, c.setLineDash(C))));
6405                                        if (0 !== p[d].markerSize && (0 < p[d].markerSize || 0 < r.markerSize)) {
6406                                            var I = r.getMarkerProperties(d, w, q, c);
6407                                            g.push(I);
6408                                            var da = R(u);
6409                                            v && g.push({
6410                                                x: w,
6411                                                y: q,
6412                                                ctx: e,
6413                                                type: I.type,
6414                                                size: I.size,
6415                                                color: da,
6416                                                borderColor: da,
6417                                                borderThickness: I.borderThickness
6418                                            });
6419                                            I = r.getMarkerProperties(d, w, m, c);
6420                                            g.push(I);
6421                                            da = R(u);
6422                                            v && g.push({
6423                                                x: w,
6424                                                y: m,
6425                                                ctx: e,
6426                                                type: I.type,
6427                                                size: I.size,
6428                                                color: da,
6429                                                borderColor: da,
6430                                                borderThickness: I.borderThickness
6431                                            })
6432                                        }
6433                                        if (p[d].indexLabel || r.indexLabel || p[d].indexLabelFormatter || r.indexLabelFormatter) this._indexLabels.push({
6434                                            chartType: "rangeArea",
6435                                            dataPoint: p[d],
6436                                            dataSeries: r,
6437                                            indexKeyword: 0,
6438                                            point: {
6439                                                x: w,
6440                                                y: m
6441                                            },
6442                                            direction: p[d].y[0] > p[d].y[1] === a.axisY.reversed ? -1 : 1,
6443                                            color: y
6444                                        }), this._indexLabels.push({
6445                                            chartType: "rangeArea",
6446                                            dataPoint: p[d],
6447                                            dataSeries: r,
6448                                            indexKeyword: 1,
6449                                            point: {
6450                                                x: w,
6451                                                y: q
6452                                            },
6453                                            direction: p[d].y[0] > p[d].y[1] === a.axisY.reversed ? 1 : -1,
6454                                            color: y
6455                                        })
6456                                    } else J || n || f(), J = !0;
6457                            f();
6458                            ja.drawMarkers(g)
6459                        }
6460                    }
6461                    v && (b.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width,
6462                        this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(h.x1, h.y1, h.width, h.height), this._eventManager.ghostCtx.restore(
6462));
6463                    c.restore();
6464                    return {
6465                        source: b,
6466                        dest: this.plotArea.ctx,
6467                        animationCallback: H.xClipAnimation,
6468                        easingFunction: H.easing.linear,
6469                        animationBase: 0
6470                    }
6471                }
6472            };
6473        q.prototype.renderRangeSplineArea = function(a) {
6474            function f(a, b) {
6475                var d = x(m, 2);
6476                if (0 < d.length) {
6477                    if (0 <
6478                        k.lineThickness) {
6479                        c.strokeStyle = b;
6480                        c.setLineDash && c.setLineDash(a);
6481                        c.beginPath();
6482                        c.moveTo(d[0].x, d[0].y);
6483                        for (var f = 0; f < d.length - 3; f += 3) {
6484                            if (d[f].newStrokeStyle || d[f].newLineDashArray) c.stroke(), c.beginPath(), c.moveTo(d[f].x, d[f].y), d[f].newStrokeStyle && (c.strokeStyle = d[f].newStrokeStyle), d[f].newLineDashArray && c.setLineDash(d[f].newLineDashArray);
6485                            c.bezierCurveTo(d[f + 1].x, d[f + 1].y, d[f + 2].x, d[f + 2].y, d[f + 3].x, d[f + 3].y)
6486                        }
6487                        c.stroke()
6488                    }
6489                    c.beginPath();
6490                    c.moveTo(d[0].x, d[0].y);
6491                    v && (e.beginPath(), e.moveTo(d[0].x, d[0].y));
6492                    for (f = 0; f < d.length - 3; f += 3) c.bezierCurveTo(d[f + 1].x, d[f + 1].y, d[f + 2].x, d[f + 2].y, d[f + 3].x, d[f + 3].y), v && e.bezierCurveTo(d[f + 1].x, d[f + 1].y, d[f + 2].x, d[f + 2].y, d[f + 3].x, d[f + 3].y);
6493                    d = x(q, 2);
6494                    c.lineTo(q[q.length - 1].x, q[q.length - 1].y);
6495                    for (f = d.length - 1; 2 < f; f -= 3) c.bezierCurveTo(d[f - 1].x, d[f - 1].y, d[f - 2].x, d[f - 2].y, d[f - 3].x, d[f - 3].y), v && e.bezierCurveTo(d[f - 1].x, d[f - 1].y, d[f - 2].x, d[f - 2].y, d[f - 3].x, d[f - 3].y);
6496                    c.closePath();
6497                    c.globalAlpha = k.fillOpacity;
6498                    c.fill();
6499                    v && (e.closePath(), e.fill());
6500                    c.globalAlpha = 1;
6501                    if (0 < k.lineThickness) {
6502                        c.strokeStyle =
6503                            b;
6504                        c.setLineDash && c.setLineDash(a);
6505                        c.beginPath();
6506                        c.moveTo(d[0].x, d[0].y);
6507                        for (var g = f = 0; f < d.length - 3; f += 3, g++) {
6508                            if (m[g].newStrokeStyle || m[g].newLineDashArray) c.stroke(), c.beginPath(), c.moveTo(d[f].x, d[f].y), m[g].newStrokeStyle && (c.strokeStyle = m[g].newStrokeStyle), m[g].newLineDashArray && c.setLineDash(m[g].newLineDashArray);
6509                            c.bezierCurveTo(d[f + 1].x, d[f + 1].y, d[f + 2].x, d[f + 2].y, d[f + 3].x, d[f + 3].y)
6510                        }
6511                        c.stroke()
6512                    }
6513                    c.beginPath()
6514                }
6515            }
6516            var b = a.targetCanvasCtx || this.plotArea.ctx,
6517                c = v ? this._preRenderCtx : b;
6518            if (!(0 >= a.dataSeriesIndexes.length)) {
6519                var e =
6520                        this._eventManager.ghostCtx,
6521                    g = [],
6522                    h = this.plotArea;
6523                c.save();
6524                v && e.save();
6525                c.beginPath();
6526                c.rect(h.x1, h.y1, h.width, h.height);
6527                c.clip();
6528                v && (e.beginPath(), e.rect(h.x1, h.y1, h.width, h.height), e.clip());
6529                for (var l = 0; l < a.dataSeriesIndexes.length; l++) {
6530                    var t = a.dataSeriesIndexes[l],
6531                        k = this.data[t],
6532                        r = k.dataPoints,
6533                        g = k.id;
6534                    this._eventManager.objectMap[g] = {
6535                        objectType: "dataSeries",
6536                        dataSeriesIndex: t
6537                    };
6538                    g = R(g);
6539                    e.fillStyle = g;
6540                    var g = [],
6541                        p = 0,
6542                        n, d, w, m = [],
6543                        q = [];
6544                    if (0 < r.length) {
6545                        var u = k._colorSet[p % k._colorSet.length],
6546                            s = k.lineColor = k.options.lineColor ||
6547                                u,
6548                            y = s;
6549                        c.fillStyle = u;
6550                        c.lineWidth = k.lineThickness;
6551                        var z = "solid",
6552                            B;
6553                        if (c.setLineDash) {
6554                            var A = G(k.nullDataLineDashType, k.lineThickness),
6555                                z = k.lineDashType;
6556                            B = G(z, k.lineThickness)
6557                        }
6558                        for (d = !1; p < r.length; p++)
6559                            if (n = r[p].x.getTime ? r[p].x.getTime() : r[p].x, !(n < a.axisX.dataInfo.viewPortMin || n > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !d)))
6560                                if (null !== r[p].y && r[p].y.length && "number" === typeof r[p].y[0] && "number" === typeof r[p].y[1]) {
6561                                    n = a.axisX.convertValueToPixel(n);
6562                                    d = a.axisY.convertValueToPixel(r[p].y[0]);
6563                                    w = a.axisY.convertValueToPixel(r[p].y[1]);
6564                                    var C = k.dataPointIds[p];
6565                                    this._eventManager.objectMap[C] = {
6566                                        id: C,
6567                                        objectType: "dataPoint",
6568                                        dataSeriesIndex: t,
6569                                        dataPointIndex: p,
6570                                        x1: n,
6571                                        y1: d,
6572                                        y2: w
6573                                    };
6574                                    m[m.length] = {
6575                                        x: n,
6576                                        y: d
6577                                    };
6578                                    q[q.length] = {
6579                                        x: n,
6580                                        y: w
6581                                    };
6582                                    p < r.length - 1 && (y !== (r[p].lineColor || s) || z !== (r[p].lineDashType || k.lineDashType)) && (y = r[p].lineColor || s, m[m.length - 1].newStrokeStyle = y, c.setLineDash && (r[p].lineDashType ? (z = r[p].lineDashType, m[m.length - 1].newLineDashArray = G(z, k.lineThickness)) : (z = k.lineDashType, m[m.length - 1].newLineDashArray = B)));
6583                                    if (0 !== r[p].markerSize && (0 <
6584                                        r[p].markerSize || 0 < k.markerSize)) {
6585                                        var L = k.getMarkerProperties(p, n, d, c);
6586                                        g.push(L);
6587                                        var J = R(C);
6588                                        v && g.push({
6589                                            x: n,
6590                                            y: d,
6591                                            ctx: e,
6592                                            type: L.type,
6593                                            size: L.size,
6594                                            color: J,
6595                                            borderColor: J,
6596                                            borderThickness: L.borderThickness
6597                                        });
6598                                        L = k.getMarkerProperties(p, n, w, c);
6599                                        g.push(L);
6600                                        J = R(C);
6601                                        v && g.push({
6602                                            x: n,
6603                                            y: w,
6604                                            ctx: e,
6605                                            type: L.type,
6606                                            size: L.size,
6607                                            color: J,
6608                                            borderColor: J,
6609                                            borderThickness: L.borderThickness
6610                                        })
6611                                    }
6612                                    if (r[p].indexLabel || k.indexLabel || r[p].indexLabelFormatter || k.indexLabelFormatter) this._indexLabels.push({
6613                                        chartType: "rangeSplineArea",
6614                                        dataPoint: r[p],
6615                                        dataSeries: k,
6616                                        indexKeyword: 0,
6617                                        point: {
6618                                            x: n,
6619                                            y: d
6620                                        },
6621                                        direction: r[p].y[0] <= r[p].y[1] ? -1 : 1,
6622                                        color: u
6623                                    }), this._indexLabels.push({
6624                                        chartType: "rangeSplineArea",
6625                                        dataPoint: r[p],
6626                                        dataSeries: k,
6627                                        indexKeyword: 1,
6628                                        point: {
6629                                            x: n,
6630                                            y: w
6631                                        },
6632                                        direction: r[p].y[0] <= r[p].y[1] ? 1 : -1,
6633                                        color: u
6634                                    });
6635                                    d = !1
6636                                }
6636 else 0 < p && !d && (k.connectNullData ? c.setLineDash && (0 < m.length && (k.options.nullDataLineDashType || !r[p - 1].lineDashType)) && (m[m.length - 1].newLineDashArray = A, z = k.nullDataLineDashType) : (f(B, s), m = [], q = [])), d = !0;
6637                        f(B, s);
6638                        ja.drawMarkers(g)
6639                    }
6640                }
6641                v && (b.drawImage(this._preRenderCanvas,
6642                    0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(h.x1, h.y1, h.width, h.height), this._eventManager.ghostCtx.restore());
6643                c.restore();
6644                return {
6645                    source: b,
6646                    dest: this.plotArea.ctx,
6647                    animationCallback: H.xClipAnimation,
6648                    easingFunction: H.easing.linear,
6649                    animationBase: 0
6650                }
6651            }
6652        };
6653        q.prototype.renderWaterfall = function(a) {
6654            var f = a.targetCanvasCtx || this.plotArea.ctx,
6655                b = v ? this._preRenderCtx : f;
6656            if (!(0 >= a.dataSeriesIndexes.length)) {
6657                var c = this._eventManager.ghostCtx,
6658                    e = null,
6659                    g = this.plotArea,
6660                    h = 0,
6661                    l, t, k, r, p = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
6662                    h = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1;
6663                t = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : Math.min(0.15 *
6664                        this.width, 0.9 * (this.plotArea.width / a.plotType.totalDataSeries)) << 0;
6665                var n = a.axisX.dataInfo.minDiff;
6666                isFinite(n) || (n = 0.3 * Math.abs(a.axisX.range));
6667                n = this.dataPointWidth ? this.dataPointWidth : 0.6 * (g.width * (a.axisX.logarithmic ? Math.log(n) / Math.log(a.axisX.range) : Math.abs(n) / Math.abs(a.axisX.range)) / a.plotType.totalDataSeries) << 0;
6668                this.dataPointMaxWidth && h > t && (h = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, t));
6669                !this.dataPointMaxWidth && (this.dataPointMinWidth && t < h) && (t = Math.max(this.dataPointWidth ?
6670                    this.dataPointWidth : -Infinity, h));
6671                n < h && (n = h);
6672                n > t && (n = t);
6673                b.save();
6674                v && this._eventManager.ghostCtx.save();
6675                b.beginPath();
6676                b.rect(g.x1, g.y1, g.width, g.height);
6677                b.clip();
6678                v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(g.x1, g.y1, g.width, g.height), this._eventManager.ghostCtx.clip());
6679                for (var d = 0; d < a.dataSeriesIndexes.length; d++) {
6680                    var w = a.dataSeriesIndexes[d],
6681                        m = this.data[w],
6682                        q = m.dataPoints,
6683                        e = m._colorSet[0];
6684                    m.risingColor = m.options.risingColor ? m.options.risingColor : e;
6685                    m.fallingColor = m.options.fallingColor ?
6686                        m.options.fallingColor : "#e40a0a";
6687                    var u = "number" === typeof m.options.lineThickness ? Math.round(m.lineThickness) : 1,
6688                        s = 1 === Math.round(u) % 2 ? -0.5 : 0;
6689                    if (0 < q.length)
6690                        for (var y = 5 < n && m.bevelEnabled ? !0 : !1, x = !1, B = null, A = null, h = 0; h < q.length; h++)
6691                            if (q[h].getTime ? r = q[h].x.getTime() : r = q[h].x, "number" !== typeof q[h].y) {
6692                                if (0 < h && !x && m.connectNullData) var z = m.options.nullDataLineDashType || !q[h - 1].lineDashType ? m.nullDataLineDashType : q[h - 1].lineDashType;
6693                                x = !0
6694                            } else {
6695                                l = a.axisX.convertValueToPixel(r);
6696                                t = 0 === m.dataPointEOs[h].cumulativeSum ?
6697                                    p : a.axisY.convertValueToPixel(m.dataPointEOs[h].cumulativeSum);
6698                                k = 0 === m.dataPointEOs[h].cumulativeSumYStartValue ? p : a.axisY.convertValueToPixel(m.dataPointEOs[h].cumulativeSumYStartValue);
6699                                l = a.axisX.reversed ? l + a.plotType.totalDataSeries * n / 2 - (a.previousDataSeriesCount + d) * n << 0 : l - a.plotType.totalDataSeries * n / 2 + (a.previousDataSeriesCount + d) * n << 0;
6700                                var C = a.axisX.reversed ? l - n << 0 : l + n << 0;
6701                                t > k && (e = t, t = k, k = e);
6702                                a.axisY.reversed && (e = t, t = k, k = e);
6703                                e = m.dataPointIds[h];
6704                                this._eventManager.objectMap[e] = {
6705                                    id: e,
6706                                    objectType: "dataPoint",
6707                                    dataSeriesIndex: w,
6708                                    dataPointIndex: h,
6709                                    x1: l,
6710                                    y1: t,
6711                                    x2: C,
6712                                    y2: k
6713                                };
6714                                var J = q[h].color ? q[h].color : -1 < q[h].y ? m.risingColor : m.fallingColor;
6715                                V(b, l, t, C, k, J, 0, J, y, y, !1, !1, m.fillOpacity);
6716                                e = R(e);
6717                                v && V(this._eventManager.ghostCtx, l, t, C, k, e, 0, null, !1, !1, !1, !1);
6718                                var I, J = l;
6719                                I = "undefined" !== typeof q[h].isIntermediateSum && !0 === q[h].isIntermediateSum || "undefined" !== typeof q[h].isCumulativeSum && !0 === q[h].isCumulativeSum ? -1 < q[h].y ? t : k : 
6719-1 < q[h].y ? k : t;
6720                                0 < h && B && (!x || m.connectNullData) && (x && b.setLineDash && b.setLineDash(G(z, u)), b.beginPath(),
6721                                    b.moveTo(B, A - s), b.lineTo(J, I - s), 0 < u && b.stroke(), v && (c.beginPath(), c.moveTo(B, A - s), c.lineTo(J, I - s), 0 < u && c.stroke()));
6722                                x = !1;
6723                                B = C;
6724                                A = -1 < q[h].y ? t : k;
6725                                J = q[h].lineDashType ? q[h].lineDashType : m.options.lineDashType ? m.options.lineDashType : "shortDash";
6726                                b.strokeStyle = q[h].lineColor ? q[h].lineColor : m.options.lineColor ? m.options.lineColor : "#9e9e9e";
6727                                b.lineWidth = u;
6728                                b.setLineDash && (J = G(J, u), b.setLineDash(J));
6729                                (q[h].indexLabel || m.indexLabel || q[h].indexLabelFormatter || m.indexLabelFormatter) && this._indexLabels.push({
6730                                    chartType: "waterfall",
6731                                    dataPoint: q[h],
6732                                    dataSeries: m,
6733                                    point: {
6734                                        x: l + (C - l) / 2,
6735                                        y: 0 <= q[h].y ? t : k
6736                                    },
6737                                    direction: 0 > q[h].y === a.axisY.reversed ? 1 : -1,
6738                                    bounds: {
6739                                        x1: l,
6740                                        y1: Math.min(t, k),
6741                                        x2: C,
6742                                        y2: Math.max(t, k)
6743                                    },
6744                                    color: e
6745                                })
6746                            }
6747                }
6748                v && (f.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
6749                    0, 0, this.width, this.height), b.clearRect(g.x1, g.y1, g.width, g.height), this._eventManager.ghostCtx.restore());
6750                b.restore();
6751                return {
6752                    source: f,
6753                    dest: this.plotArea.ctx,
6754                    animationCallback: H.fadeInAnimation,
6755                    easingFunction: H.easing.easeInQuad,
6756                    animationBase: 0
6757                }
6758            }
6759        };
6760        var ra = function(a, f, b, c, e, g, h, l, t) {
6761            if (!(0 > b)) {
6762                "undefined" === typeof l && (l = 1);
6763                if (!v) {
6764                    var k = Number((h % (2 * Math.PI)).toFixed(8));
6765                    Number((g % (2 * Math.PI)).toFixed(8)) === k && (h -= 1E-4)
6766                }
6767                a.save();
6768                a.globalAlpha = l;
6769                "pie" === e ? (a.beginPath(), a.moveTo(f.x, f.y), a.arc(f.x, f.y,
6770                    b, g, h, !1), a.fillStyle = c, a.strokeStyle = "white", a.lineWidth = 2, a.closePath(), a.fill()) : "doughnut" === e && (a.beginPath(), a.arc(f.x, f.y, b, g, h, !1), 0 <= t && a.arc(f.x, f.y, t * b, h, g, !0), a.closePath(), a.fillStyle = c, a.strokeStyle = "white", a.lineWidth = 2, a.fill());
6771                a.globalAlpha = 1;
6772                a.restore()
6773            }
6774        };
6775        q.prototype.renderPie = function(a) {
6776            function f() {
6777                if (k && r) {
6778                    for (var a = 0, b = 0, c = 0, e = 0, f = 0; f < r.length; f++) {
6779                        var g = r[f],
6780                            h = k.dataPointIds[f];
6781                        d[f].id = h;
6782                        d[f].objectType = "dataPoint";
6783                        d[f].dataPointIndex = f;
6784                        d[f].dataSeriesIndex = 0;
6785                        var l = d[f],
6786                            p = {
6787                                percent: null,
6788                                total: null
6789                            },
6790                            m = null,
6791                            p = t.getPercentAndTotal(k, g);
6792                        if (k.indexLabelFormatter || g.indexLabelFormatter) m = {
6793                            chart: t.options,
6794                            dataSeries: k,
6795                            dataPoint: g,
6796                            total: p.total,
6797                            percent: p.percent
6798                        };
6799                        p = g.indexLabelFormatter ? g.indexLabelFormatter(m) : g.indexLabel ? t.replaceKeywordsWithValue(g.indexLabel, g, k, f) : k.indexLabelFormatter ? k.indexLabelFormatter(m) : k.indexLabel ? t.replaceKeywordsWithValue(k.indexLabel, g, k, f) : g.label ? g.label : "";
6800                        t._eventManager.objectMap[h] = l;
6801                        l.center = {
6802                            x: x.x,
6803                            y: x.y
6804                        };
6805                        l.y = g.y;
6806                        l.radius = A;
6807                        l.percentInnerRadius =
6808                            L;
6809                        l.indexLabelText = p;
6810                        l.indexLabelPlacement = k.indexLabelPlacement;
6811                        l.indexLabelLineColor = g.indexLabelLineColor ? g.indexLabelLineColor : k.options.indexLabelLineColor ? k.options.indexLabelLineColor : g.color ? g.color : k._colorSet[f % k._colorSet.length];
6812                        l.indexLabelLineThickness = y(g.indexLabelLineThickness) ? k.indexLabelLineThickness : g.indexLabelLineThickness;
6813                        l.indexLabelLineDashType = g.indexLabelLineDashType ? g.indexLabelLineDashType : k.indexLabelLineDashType;
6814                        l.indexLabelFontColor = g.indexLabelFontColor ? g.indexLabelFontColor :
6815                            k.indexLabelFontColor;
6816                        l.indexLabelFontStyle = g.indexLabelFontStyle ? g.indexLabelFontStyle : k.indexLabelFontStyle;
6817                        l.indexLabelFontWeight = g.indexLabelFontWeight ? g.indexLabelFontWeight : k.indexLabelFontWeight;
6818                        l.indexLabelFontSize = y(g.indexLabelFontSize) ? k.indexLabelFontSize : g.indexLabelFontSize;
6819                        l.indexLabelFontFamily = g.indexLabelFontFamily ? g.indexLabelFontFamily : k.indexLabelFontFamily;
6820                        l.indexLabelBackgroundColor = g.indexLabelBackgroundColor ? g.indexLabelBackgroundColor : k.options.indexLabelBackgroundColor ?
6821                            k.options.indexLabelBackgroundColor : k.indexLabelBackgroundColor;
6822                        l.indexLabelMaxWidth = g.indexLabelMaxWidth ? g.indexLabelMaxWidth : k.indexLabelMaxWidth ? k.indexLabelMaxWidth : 0.33 * n.width;
6823                        l.indexLabelWrap = "undefined" !== typeof g.indexLabelWrap ? g.indexLabelWrap : k.indexLabelWrap;
6824                        l.startAngle = 0 === f ? k.startAngle ? k.startAngle / 180 * Math.PI : 0 : d[f - 1].endAngle;
6825                        l.startAngle = (l.startAngle + 2 * Math.PI) % (2 * Math.PI);
6826                        l.endAngle = l.startAngle + 2 * Math.PI / z * Math.abs(g.y);
6827                        g = (l.endAngle + l.startAngle) / 2;
6828                        g = (g + 2 * Math.PI) % (2 * Math.PI);
6829                        l.midAngle = g;
6830                        if (l.midAngle > Math.PI / 2 - u && l.midAngle < Math.PI / 2 + u) {
6831                            if (0 === a || d[c].midAngle > l.midAngle) c = f;
6832                            a++
6833                        } else if (l.midAngle > 3 * Math.PI / 2 - u && l.midAngle < 3 * Math.PI / 2 + u) {
6834                            if (0 === b || d[e].midAngle > l.midAngle) e = f;
6835                            b++
6836                        }
6837                        l.hemisphere = g > Math.PI / 2 && g <= 3 * Math.PI / 2 ? "left" : "right";
6838                        l.indexLabelTextBlock = new la(t.plotArea.ctx, {
6839                            fontSize: l.indexLabelFontSize,
6840                            fontFamily: l.indexLabelFontFamily,
6841                            fontColor: l.indexLabelFontColor,
6842                            fontStyle: l.indexLabelFontStyle,
6843                            fontWeight: l.indexLabelFontWeight,
6844                            horizontalAlign: "left",
6845                            backgroundColor: l.indexLabelBackgroundColor,
6846                            maxWidth: l.indexLabelMaxWidth,
6847                            maxHeight: l.indexLabelWrap ? 5 * l.indexLabelFontSize : 1.5 * l.indexLabelFontSize,
6848                            text: l.indexLabelText,
6849                            padding: 0,
6850                            textBaseline: "top"
6851                        });
6852                        l.indexLabelTextBlock.measureText()
6853                    }
6854                    h = g = 0;
6855                    p = !1;
6856                    for (f = 0; f < r.length; f++) l = d[(c + f) % r.length], 1 < a && (l.midAngle > Math.PI / 2 - u && l.midAngle < Math.PI / 2 + u) && (g <= a / 2 && !p ? (l.hemisphere = "right", g++) : (l.hemisphere = "left", p = !0));
6857                    p = !1;
6858                    for (f = 0; f < r.length; f++) l = d[(e + f) % r.length], 1 < b && (l.midAngle > 3 * Math.PI / 2 - u && l.midAngle < 3 * Math.PI / 2 + u) && (h <= b / 2 && !p ? (l.hemisphere =
6859                        "left", h++) : (l.hemisphere = "right", p = !0))
6860                }
6861            }
6862
6863            function b(a) {
6864                var b = t.plotArea.ctx;
6865                b.clearRect(n.x1, n.y1, n.width, n.height);
6866                b.fillStyle = t.backgroundColor;
6867                b.fillRect(n.x1, n.y1, n.width, n.height);
6868                for (b = 0; b < r.length; b++) {
6869                    var c = d[b].startAngle,
6870                        e = d[b].endAngle;
6871                    if (e > c) {
6872                        var f = 0.07 * A * Math.cos(d[b].midAngle),
6873                            g = 0.07 * A * Math.sin(d[b].midAngle),
6874                            h = !1;
6875                        if (r[b].exploded) {
6876                            if (1E-9 < Math.abs(d[b].center.x - (x.x + f)) || 1E-9 < Math.abs(d[b].center.y - (x.y + g))) d[b].center.x = x.x + f * a, d[b].center.y = x.y + g * a, h = !0
6877                        } else if (0 < Math.abs(d[b].center.x -
6878                                x.x) || 0 < Math.abs(d[b].center.y - x.y)) d[b].center.x = x.x + f * (1 - a), d[b].center.y = x.y + g * (1 - a), h = !0;
6879                        h && (f = {}, f.dataSeries = k, f.dataPoint = k.dataPoints[b], f.index = b, t.toolTip.highlightObjects([f]));
6880                        ra(t.plotArea.ctx, d[b].center, d[b].radius, r[b].color ? r[b].color : k._colorSet[b % k._colorSet.length], k.type, c, e, k.fillOpacity, d[b].percentInnerRadius)
6881                    }
6882                }
6883                a = t.plotArea.ctx;
6884                a.save();
6885                a.fillStyle = "black";
6886                a.strokeStyle = "grey";
6887                a.textBaseline = "middle";
6888                a.lineJoin = "round";
6889                for (b = b = 0; b < r.length; b++) c = d[b], c.indexLabelText && (c.indexLabelTextBlock.y -=
6890                    c.indexLabelTextBlock.height / 2, e = 0, e = "left" === c.hemisphere ? "inside" !== k.indexLabelPlacement ? -(c.indexLabelTextBlock.width + p) : -c.indexLabelTextBlock.width / 2 : "inside" !== k.indexLabelPlacement ? p : -c.indexLabelTextBlock.width / 2, c.indexLabelTextBlock.x += e, c.indexLabelTextBlock.render(!0), c.indexLabelTextBlock.x -= e, c.indexLabelTextBlock.y += c.indexLabelTextBlock.height / 2, "inside" !== c.indexLabelPlacement && 0 < c.indexLabelLineThickness && (e = c.center.x + A * Math.cos(c.midAngle), f = c.center.y + A * Math.sin(c.midAngle),
6891                    a.strokeStyle = c.indexLabelLineColor, a.lineWidth = c.indexLabelLineThickness, a.setLineDash && a.setLineDash(G(c.indexLabelLineDashType, c.indexLabelLineThickness)), a.beginPath(), a.moveTo(e, f), a.lineTo(c.indexLabelTextBlock.x, c.indexLabelTextBlock.y), a.lineTo(c.indexLabelTextBlock.x + ("left" === c.hemisphere ? -p : p), c.indexLabelTextBlock.y), a.stroke()), a.lineJoin = "miter");
6892                a.save()
6893            }
6894
6895            function c(a, b) {
6896                var c = 0,
6897                    c = a.indexLabelTextBlock.y - a.indexLabelTextBlock.height / 2,
6898                    d = a.indexLabelTextBlock.y + a.indexLabelTextBlock.height /
6899                        2,
6900                    e = b.indexLabelTextBlock.y - b.indexLabelTextBlock.height / 2,
6901                    f = b.indexLabelTextBlock.y + b.indexLabelTextBlock.height / 2;
6902                return c = b.indexLabelTextBlock.y > a.indexLabelTextBlock.y ? e - d : c - f
6903            }
6904
6905            function e(a) {
6906                for (var b = null, e = 1; e < r.length; e++)
6907                    if (b = (a + e + d.length) % d.length, d[b].hemisphere !== d[a].hemisphere) {
6908                        b = null;
6909                        break
6910                    } else if (d[b].indexLabelText && b !== a && (0 > c(d[b], d[a]) || ("right" === d[a].hemisphere ? d[b].indexLabelTextBlock.y >= d[a].indexLabelTextBlock.y : d[b].indexLabelTextBlock.y <= d[a].indexLabelTextBlock.y))) break;
6911                    else b = null;
6912                return b
6913            }
6914
6915            function g(a, b, f) {
6916                f = (f || 0) + 1;
6917                if (1E3 < f) return 0;
6918                b = b || 0;
6919                var k = 0,
6920                    h = x.y - 1 * q,
6921                    n = x.y + 1 * q;
6922                if (0 <= a && a < r.length) {
6923                    var l = d[a];
6924                    if (0 > b && l.indexLabelTextBlock.y < h || 0 < b && l.indexLabelTextBlock.y > n) return 0;
6925                    var t = 0,
6926                        p = 0,
6927                        p = t = t = 0;
6928                    0 > b ? l.indexLabelTextBlock.y - l.indexLabelTextBlock.height / 2 > h && l.indexLabelTextBlock.y - l.indexLabelTextBlock.height / 2 + b < h && (b = -(h - (l.indexLabelTextBlock.y - l.indexLabelTextBlock.height / 2 + b))) : l.indexLabelTextBlock.y + l.indexLabelTextBlock.height / 2 < h && l.indexLabelTextBlock.y +
6929                        l.indexLabelTextBlock.height / 2 + b > n && (b = l.indexLabelTextBlock.y + l.indexLabelTextBlock.height / 2 + b - n);
6930                    b = l.indexLabelTextBlock.y + b;
6931                    h = 0;
6932                    h = "right" === l.hemisphere ? x.x + Math.sqrt(Math.pow(q, 2) - Math.pow(b - x.y, 2)) : x.x - Math.sqrt(Math.pow(q, 2) - Math.pow(b - x.y, 2));
6933                    p = x.x + A * Math.cos(l.midAngle);
6934                    t = x.y + A * Math.sin(l.midAngle);
6935                    t = Math.sqrt(Math.pow(h - p, 2) + Math.pow(b - t, 2));
6936                    p = Math.acos(A / q);
6937                    t = Math.acos((q * q + A * A - t * t) / (2 * A * q));
6938                    b = t < p ? b - l.indexLabelTextBlock.y : 0;
6939                    h = null;
6940                    for (n = 1; n < r.length; n++)
6941                        if (h = (a - n + d.length) % d.length, d[h].hemisphere !==
6942                            d[a].hemisphere) {
6943                            h = null;
6944                            break
6945                        } else if (d[h].indexLabelText && d[h].hemisphere === d[a].hemisphere && h !== a && (0 > c(d[h], d[a]) || ("right" === d[a].hemisphere ? d[h].indexLabelTextBlock.y <= d[a].indexLabelTextBlock.y : d[h].indexLabelTextBlock.y >= d[a].indexLabelTextBlock.y))) break;
6946                        else h = null;
6947                    p = h;
6948                    t = e(a);
6949                    n = h = 0;
6950                    0 > b ? (n = "right" === l.hemisphere ? p : t, k = b, null !== n && (p = -b, b = l.indexLabelTextBlock.y - l.indexLabelTextBlock.height / 2 - (d[n].indexLabelTextBlock.y + d[n].indexLabelTextBlock.height / 2), b - p < m && (h = -p, n = g(n, h, f + 1), +n.toFixed(v) >
6951                    +h.toFixed(v) && (k = b > m ? -(b - m) : -(p - (n - h)))))) : 0 < b && (n = "right" === l.hemisphere ? t : p, k = b, null !== n && (p = b, b = d[n].indexLabelTextBlock.y - d[n].indexLabelTextBlock.height / 2 - (l.indexLabelTextBlock.y + l.indexLabelTextBlock.height / 2), b - p < m && (h = p, n = g(n, h, f + 1), +n.toFixed(v) < +h.toFixed(v) && (k = b > m ? b - m : p - (h - n)))));
6952                    k && (f = l.indexLabelTextBlock.y + k, b = 0, b = "right" === l.hemisphere ? x.x + Math.sqrt(Math.pow(q, 2) - Math.pow(f - x.y, 2)) : x.x - Math.sqrt(Math.pow(q, 2) - Math.pow(f - x.y, 2)), l.midAngle > Math.PI / 2 - u && l.midAngle < Math.PI / 2 + u ? (h = (a -
6953                        1 + d.length) % d.length, h = d[h], a = d[(a + 1 + d.length) % d.length], "left" === l.hemisphere && "right" === h.hemisphere && b > h.indexLabelTextBlock.x ? b = h.indexLabelTextBlock.x - 15 : "right" === l.hemisphere && ("left" === a.hemisphere && b < a.indexLabelTextBlock.x) && (b = a.indexLabelTextBlock.x + 15)) : l.midAngle > 3 * Math.PI / 2 - u && l.midAngle < 3 * Math.PI / 2 + u && (h = (a - 1 + d.length) % d.length, h = d[h], a = d[(a + 1 + d.length) % d.length], "right" === l.hemisphere && "left" === h.hemisphere && b < h.indexLabelTextBlock.x ? b = h.indexLabelTextBlock.x + 15 : "left" === l.hemisphere &&
6954                            ("right" === a.hemisphere && b > a.indexLabelTextBlock.x) && (b = a.indexLabelTextBlock.x - 15)), l.indexLabelTextBlock.y = f, l.indexLabelTextBlock.x = b, l.indexLabelAngle = Math.atan2(l.indexLabelTextBlock.y - x.y, l.indexLabelTextBlock.x - x.x))
6955                }
6956                return k
6957            }
6958
6959            function h() {
6960                var a = t.plotArea.ctx;
6961                a.fillStyle = "grey";
6962                a.strokeStyle = "grey";
6963                a.font = "16px Arial";
6964                a.textBaseline = "middle";
6965                for (var b = a = 0, f = 0, h = !0, b = 0; 10 > b && (1 > b || 0 < f); b++) {
6966                    if (k.radius || !k.radius && "undefined" !== typeof k.innerRadius && null !== k.innerRadius && A - f <= C) h = !1;
6967                    h && (A -=
6968                        f);
6969                    f = 0;
6970                    if ("inside" !== k.indexLabelPlacement) {
6971                        q = A * s;
6972                        for (a = 0; a < r.length; a++) {
6973                            var l = d[a];
6974                            l.indexLabelTextBlock.x = x.x + q * Math.cos(l.midAngle);
6975                            l.indexLabelTextBlock.y = x.y + q * Math.sin(l.midAngle);
6976                            l.indexLabelAngle = l.midAngle;
6977                            l.radius = A;
6978                            l.percentInnerRadius = L
6979                        }
6980                        for (var u, y, a = 0; a < r.length; a++) {
6981                            var l = d[a],
6982                                B = e(a);
6983                            if (null !== B) {
6984                                u = d[a];
6985                                y = d[B];
6986                                var z = 0,
6987                                    z = c(u, y) - m;
6988                                if (0 > z) {
6989                                    for (var ba = y = 0, G = 0; G < r.length; G++) G !== a && d[G].hemisphere === l.hemisphere && (d[G].indexLabelTextBlock.y < l.indexLabelTextBlock.y ? y++ : ba++);
6990                                    y = z / (y + ba || 1) *
6991                                        ba;
6992                                    var ba = -1 * (z - y),
6993                                        H = G = 0;
6994                                    "right" === l.hemisphere ? (G = g(a, y), ba = -1 * (z - G), H = g(B, ba), +H.toFixed(v) < +ba.toFixed(v) && +G.toFixed(v) <= +y.toFixed(v) && g(a, -(ba - H))) : (G = g(B, y), ba = -1 * (z - G), H = g(a, ba), +H.toFixed(v) < +ba.toFixed(v) && +G.toFixed(v) <= +y.toFixed(v) && g(B, -(ba - H)))
6995                                }
6996                            }
6997                        }
6998                    } else
6999                        for (a = 0; a < r.length; a++) l = d[a], q = "pie" === k.type ? 0.7 * A : 0.8 * A, B = x.x + q * Math.cos(l.midAngle), y = x.y + q * Math.sin(l.midAngle), l.indexLabelTextBlock.x = B, l.indexLabelTextBlock.y = y;
7000                    for (a = 0; a < r.length; a++)
7001                        if (l = d[a], B = l.indexLabelTextBlock.measureText(),
7002                            0 !== B.height && 0 !== B.width) B = B = 0, "right" === l.hemisphere ? (B = n.x2 - (l.indexLabelTextBlock.x + l.indexLabelTextBlock.width + p), B *= -1) : B = n.x1 - (l.indexLabelTextBlock.x - l.indexLabelTextBlock.width - p), 0 < B && (!h && l.indexLabelText && (y = "right" === l.hemisphere ? n.x2 - l.indexLabelTextBlock.x : l.indexLabelTextBlock.x - n.x1, 0.3 * l.indexLabelTextBlock.maxWidth > y ? l.indexLabelText = "" : l.indexLabelTextBlock.maxWidth = 0.85 * y, 0.3 * l.indexLabelTextBlock.maxWidth < 
7002y && (l.indexLabelTextBlock.x -= "right" === l.hemisphere ? 2 : -2)), Math.abs(l.indexLabelTextBlock.y -
7003                            l.indexLabelTextBlock.height / 2 - x.y) < A || Math.abs(l.indexLabelTextBlock.y + l.indexLabelTextBlock.height / 2 - x.y) < A) && (B /= Math.abs(Math.cos(l.indexLabelAngle)), 9 < B && (B *= 0.3), B > f && (f = B)), B = B = 0, 0 < l.indexLabelAngle && l.indexLabelAngle < Math.PI ? (B = n.y2 - (l.indexLabelTextBlock.y + l.indexLabelTextBlock.height / 2 + 5), B *= -1) : B = n.y1 - (l.indexLabelTextBlock.y - l.indexLabelTextBlock.height / 2 - 5), 0 < B && (!h && l.indexLabelText && (y = 0 < l.indexLabelAngle && l.indexLabelAngle < Math.PI ? -1 : 1, 0 === g(a, B * y) && g(a, 2 * y)), Math.abs(l.indexLabelTextBlock.x -
7004                            x.x) < A && (B /= Math.abs(Math.sin(l.indexLabelAngle)), 9 < B && (B *= 0.3), B > f && (f = B)));
7005                    var K = function(a, b, c) {
7006                        for (var e = [], f = 0; e.push(d[b]), b !== c; b = (b + 1 + r.length) % r.length);
7007                        e.sort(function(a, b) {
7008                            return a.y - b.y
7009                        });
7010                        for (b = 0; b < e.length; b++)
7011                            if (c = e[b], f < 0.7 * a) f += c.indexLabelTextBlock.height, c.indexLabelTextBlock.text = "", c.indexLabelText = "", c.indexLabelTextBlock.measureText();
7012                            else break
7013                    };
7014                    (function() {
7015                        for (var a = -1, b = -1, f = 0, g = !1, h = 0; h < r.length; h++)
7016                            if (g = !1, u = d[h], u.indexLabelText) {
7017                                var k = e(h);
7018                                if (null !== k) {
7019                                    var l = d[k];
7020                                    z = 0;
7021                                    z = c(u, l);
7022                                    var n;
7023                                    if (n = 0 > z) {
7024                                        n = u.indexLabelTextBlock.x;
7025                                        var t = u.indexLabelTextBlock.y - u.indexLabelTextBlock.height / 2,
7026                                            m = u.indexLabelTextBlock.y + u.indexLabelTextBlock.height / 2,
7027                                            w = l.indexLabelTextBlock.y - l.indexLabelTextBlock.height / 2,
7028                                            q = l.indexLabelTextBlock.x + l.indexLabelTextBlock.width,
7029                                            s = l.indexLabelTextBlock.y + l.indexLabelTextBlock.height / 2;
7030                                        n = u.indexLabelTextBlock.x + u.indexLabelTextBlock.width < l.indexLabelTextBlock.x - p || n > q + p || t > s + p || m < w - p ? !1 : !0
7031                                    }
7032                                    n ? (0 > a && (a = h), k !== a && (b = k, f += -z), 0 === h % Math.max(r.length /
7033                                        10, 3) && (g = !0)) : g = !0;
7034                                    g && (0 < f && 0 <= a && 0 <= b) && (K(f, a, b), b = a = -1, f = 0)
7035                                }
7036                            }
7037                        0 < f && K(f, a, b)
7038                    })()
7039                }
7040            }
7041
7042            function l() {
7043                t.plotArea.layoutManager.reset();
7044                t.title && (t.title.dockInsidePlotArea || "center" === t.title.horizontalAlign && "center" === t.title.verticalAlign) && t.title.render();
7045                if (t.subtitles)
7046                    for (var a = 0; a < t.subtitles.length; a++) {
7047                        var b = t.subtitles[a];
7048                        (b.dockInsidePlotArea || "center" === b.horizontalAlign && "center" === b.verticalAlign) && b.render()
7049                    }
7050                t.legend && (t.legend.dockInsidePlotArea || "center" === t.legend.horizontalAlign && "center" ===
7051                t.legend.verticalAlign) && t.legend.render()
7052            }
7053            var t = this;
7054            if (!(0 >= a.dataSeriesIndexes.length)) {
7055                var k = this.data[a.dataSeriesIndexes[0]],
7056                    r = k.dataPoints,
7057                    p = 10,
7058                    n = this.plotArea,
7059                    d = k.dataPointEOs,
7060                    m = 2,
7061                    q, s = 1.3,
7062                    u = 20 / 180 * Math.PI,
7063                    v = 6,
7064                    x = {
7065                        x: (n.x2 + n.x1) / 2,
7066                        y: (n.y2 + n.y1) / 2
7067                    },
7068                    z = 0;
7069                a = !1;
7070                for (var B = 0; B < r.length; B++) z += Math.abs(r[B].y), !a && ("undefined" !== typeof r[B].indexLabel && null !== r[B].indexLabel && 0 < r[B].indexLabel.toString().length) && (a = !0), !a && ("undefined" !== typeof r[B].label && null !== r[B].label && 0 < r[B].label.toString().length) &&
7071                (a = !0);
7072                if (0 !== z) {
7073                    a = a || "undefined" !== typeof k.indexLabel && null !== k.indexLabel && 0 < k.indexLabel.toString().length;
7074                    var A = "inside" !== k.indexLabelPlacement && a ? 0.75 * Math.min(n.width, n.height) / 2 : 0.92 * Math.min(n.width, n.height) / 2;
7075                    k.radius && (A = O(k.radius, A));
7076                    var C = "undefined" !== typeof k.innerRadius && null !== k.innerRadius ? O(k.innerRadius, A) : 0.7 * A;
7077                    k.radius = A;
7078                    "doughnut" === k.type && (k.innerRadius = C);
7079                    var L = Math.min(C / A, (A - 1) / A);
7080                    this.pieDoughnutClickHandler = function(a) {
7081                        t.isAnimating || !y(a.dataSeries.explodeOnClick) &&
7082                        !a.dataSeries.explodeOnClick || (a = a.dataPoint, a.exploded = a.exploded ? !1 : !0, 1 < this.dataPoints.length && t._animator.animate(0, 500, function(a) {
7083                            b(a);
7084                            l()
7085                        }))
7086                    };
7087                    f();
7088                    h();
7089                    h();
7090                    h();
7091                    h();
7092                    this.disableToolTip = !0;
7093                    this._animator.animate(0, this.animatedRender ? this.animationDuration : 0, function(a) {
7094                        var b = t.plotArea.ctx;
7095                        b.clearRect(n.x1, n.y1, n.width, n.height);
7096                        b.fillStyle = t.backgroundColor;
7097                        b.fillRect(n.x1, n.y1, n.width, n.height);
7098                        a = d[0].startAngle + 2 * Math.PI * a;
7099                        for (b = 0; b < r.length; b++) {
7100                            var c = 0 === b ? d[b].startAngle : e,
7101                                e = c + (d[b].endAngle -
7102                                    d[b].startAngle),
7103                                f = !1;
7104                            e > a && (e = a, f = !0);
7105                            var g = r[b].color ? r[b].color : k._colorSet[b % k._colorSet.length];
7106                            e > c && ra(t.plotArea.ctx, d[b].center, d[b].radius, g, k.type, c, e, k.fillOpacity, d[b].percentInnerRadius);
7107                            if (f) break
7108                        }
7109                        l()
7110                    }, function() {
7111                        t.disableToolTip = !1;
7112                        t._animator.animate(0, t.animatedRender ? 500 : 0, function(a) {
7113                            b(a);
7114                            l()
7115                        })
7116                    })
7117                }
7118            }
7119        };
7120        var sa = function(a, f, b, c) {
7121            "undefined" === typeof b && (b = 1);
7122            0 >= Math.round(f.y4 - f.y1) || (a.save(), a.globalAlpha = b, a.beginPath(), a.moveTo(Math.round(f.x1), Math.round(f.y1)), a.lineTo(Math.round(f.x2),
7123                Math.round(f.y2)), a.lineTo(Math.round(f.x3), Math.round(f.y3)), a.lineTo(Math.round(f.x4), Math.round(f.y4)), "undefined" !== f.x5 && (a.lineTo(Math.round(f.x5), Math.round(f.y5)), a.lineTo(Math.round(f.x6), Math.round(f.y6))), a.closePath(), a.fillStyle = c ? c : f.color, a.fill(), a.globalAplha = 1, a.restore())
7124        };
7125        q.prototype.renderFunnel = function(a) {
7126            function f() {
7127                for (var a = 0, b = [], c = 0; c < x.length; c++) {
7128                    if ("undefined" === typeof x[c].y) return -1;
7129                    x[c].y = "number" === typeof x[c].y ? x[c].y : 0;
7130                    a += Math.abs(x[c].y)
7131                }
7132                if (0 === a) return -1;
7133                for (c =
7134                         b[0] = 0; c < x.length; c++) b.push(Math.abs(x[c].y) * O / a);
7135                return b
7136            }
7137
7138            function b() {
7139                var a = X,
7140                    b = V,
7141                    c = K,
7142                    d = Y,
7143                    e, f;
7144                e = Q;
7145                f = $ - N;
7146                headArea = (f - e) * (b - a + (d - c)) / 2;
7147                headArea = Math.abs(headArea);
7148                c = Y - K;
7149                e = f - e;
7150                f = c * (f - $);
7151                f = Math.abs(f);
7152                f = headArea + f;
7153                for (var d = [], g = 0, h = 0; h < x.length; h++) {
7154                    if ("undefined" === typeof x[h].y) return -1;
7155                    x[h].y = "number" === typeof x[h].y ? x[h].y : 0;
7156                    g += Math.abs(x[h].y)
7157                }
7158                if (0 === g) return -1;
7159                for (var k = d[0] = 0, l = 0, n, b = b - a, t = !1, h = 0; h < x.length; h++) a = Math.abs(x[h].y) * f / g, t ? k = 0 == Number(c.toFixed(3)) ? 0 : a / c : (sqrt = fa * fa * b * b - 4 * Math.abs(fa) *
7160                    a, 0 > sqrt ? (n = c, k = (b + n) * (e - l) / 2, a -= k, k = e - l, l += e - l, k += 0 == n ? 0 : a / 
7160n, l += a / n, t = !0) : (k = (Math.abs(fa) * b - Math.sqrt(sqrt)) / 2, n = b - 2 * k / Math.abs(fa), l += k, l > e && (l -= k, n = c, k = (b + n) * (e - l) / 2, a -= k, k = e - l, l += e - l, k += a / n, l += a / n, t = !0), b = n)), d.push(k);
7161                return d
7162            }
7163
7164            function c() {
7165                if (u && x) {
7166                    for (var a, b, c, e, f, g, h, k, l, n, t, p, r, m, w = [], q = [], A = {
7167                        percent: null,
7168                        total: null
7169                    }, B = null, z = 0; z < x.length; z++) m = M[z], m = "undefined" !== typeof m.x5 ? (m.y2 + m.y4) / 2 : (m.y2 + m.y3) / 2, m = d(m).x2 + 1, w[z] = P - m - U;
7170                    m = 0.5 * U;
7171                    for (var z = 0, za = x.length - 1; z < x.length || 0 <= za; z++, za--) {
7172                        b =
7173                            u.reversed ? x[za] : x[z];
7174                        a = b.color ? b.color : u.reversed ? u._colorSet[(x.length - 1 - z) % u._colorSet.length] : u._colorSet[z % u._colorSet.length];
7175                        c = b.indexLabelPlacement || u.indexLabelPlacement || "outside";
7176                        e = b.indexLabelBackgroundColor || u.indexLabelBackgroundColor || (v ? "transparent" : null);
7177                        f = b.indexLabelFontColor || u.indexLabelFontColor || "#979797";
7178                        g = y(b.indexLabelFontSize) ? u.indexLabelFontSize : b.indexLabelFontSize;
7179                        h = b.indexLabelFontStyle || u.indexLabelFontStyle || "normal";
7180                        k = b.indexLabelFontFamily || u.indexLabelFontFamily ||
7181                            "arial";
7182                        l = b.indexLabelFontWeight || u.indexLabelFontWeight || "normal";
7183                        a = b.indexLabelLineColor || u.options.indexLabelLineColor || a;
7184                        n = "number" === typeof b.indexLabelLineThickness ? b.indexLabelLineThickness : "number" === typeof u.indexLabelLineThickness ? u.indexLabelLineThickness : 2;
7185                        t = b.indexLabelLineDashType || u.indexLabelLineDashType || "solid";
7186                        p = "undefined" !== typeof b.indexLabelWrap ? b.indexLabelWrap : "undefined" !== typeof u.indexLabelWrap ? u.indexLabelWrap : !0;
7187                        r = u.dataPointIds[z];
7188                        s._eventManager.objectMap[r] = {
7189                            id: r,
7190                            objectType: "dataPoint",
7191                            dataPointIndex: z,
7192                            dataSeriesIndex: 0,
7193                            funnelSection: M[u.reversed ? x.length - 1 - z : z]
7194                        };
7195                        "inside" === u.indexLabelPlacement && (w[z] = z !== ga ? u.reversed ? M[z].x2 - M[z].x1 : M[z].x3 - M[z].x4 : M[z].x3 - M[z].x6, 20 > w[z] && (w[z] = z !== ga ? u.reversed ? M[z].x3 - M[z].x4 : M[z].x2 - M[z].x1 : M[z].x2 - M[z].x1, w[z] /= 2));
7196                        r = b.indexLabelMaxWidth ? b.indexLabelMaxWidth : u.options.indexLabelMaxWidth ? u.indexLabelMaxWidth : w[z];
7197                        if (r > w[z] || 0 > r) r = w[z];
7198                        q[z] = "inside" === u.indexLabelPlacement ? M[z].height : !1;
7199                        A = s.getPercentAndTotal(u, b);
7200                        if (u.indexLabelFormatter || b.indexLabelFormatter) B = {
7201                            chart: s.options,
7202                            dataSeries: u,
7203                            dataPoint: b,
7204                            total: A.total,
7205                            percent: A.percent
7206                        };
7207                        b = b.indexLabelFormatter ? b.indexLabelFormatter(B) : b.indexLabel ? s.replaceKeywordsWithValue(b.indexLabel, b, u, z) : u.indexLabelFormatter ? u.indexLabelFormatter(B) : u.indexLabel ? s.replaceKeywordsWithValue(u.indexLabel, b, u, z) : b.label ? b.label : "";
7208                        0 >= n && (n = 0);
7209                        1E3 > r && 1E3 - r < m && (r += 1E3 - r);
7210                        R.roundRect || Ca(R);
7211                        c = new la(R, {
7212                            fontSize: g,
7213                            fontFamily: k,
7214                            fontColor: f,
7215                            fontStyle: h,
7216                            fontWeight: l,
7217                            horizontalAlign: c,
7218                            backgroundColor: e,
7219                            maxWidth: r,
7220                            maxHeight: !1 === q[z] ? p ? 4.28571429 * g : 1.5 * g : q[z],
7221                            text: b,
7222                            padding: ha
7223                        });
7224                        c.measureText();
7225                        F.push({
7226                            textBlock: c,
7227                            id: u.reversed ? za : z,
7228                            isDirty: !1,
7229                            lineColor: a,
7230                            lineThickness: n,
7231                            lineDashType: t,
7232                            height: c.height < c.maxHeight ? c.height : c.maxHeight,
7233                            width: c.width < c.maxWidth ? c.width : c.maxWidth
7234                        })
7235                    }
7236                }
7237            }
7238
7239            function e() {
7240                var a, b, c, d, e, f = [];
7241                e = !1;
7242                c = 0;
7243                for (var g = P - V - U / 2, g = u.options.indexLabelMaxWidth ? u.indexLabelMaxWidth > g ? g : u.indexLabelMaxWidth : g, h = F.length - 1; 0 <= h; h--) {
7244                    dataPoint = x[F[h].id];
7245                    c = F[h];
7246                    d = c.textBlock;
7247                    b = (a = n(h) < M.length ? F[n(h)] : null) ? a.textBlock : null;
7248                    c = c.height;
7249                    a && d.y + c + ha > b.y && (e = !0);
7250                    c = dataPoint.indexLabelMaxWidth || g;
7251                    if (c > g || 0 > c) c = g;
7252                    f.push(c)
7253                }
7254                if (e)
7255                    for (h = F.length - 1; 0 <= h; h--) a = M[h], F[h].textBlock.maxWidth = f[f.length - (h + 1)], F[h].textBlock.measureText(), F[h].textBlock.x = P - g, c = F[h].textBlock.height < F[h].textBlock.maxHeight ? F[h].textBlock.height : F[h].textBlock.maxHeight, e = F[h].textBlock.width < F[h].textBlock.maxWidth ? F[h].textBlock.width : F[h].textBlock.maxWidth, F[h].height = c, F[h].width = e, c = "undefined" !==
7256                    typeof a.x5 ? (a.y2 + a.y4) / 2 : (a.y2 + a.y3) / 2, F[h].textBlock.y = c - F[h].height / 2, u.reversed ? (F[h].textBlock.y + F[h].height > T + C && (F[h].textBlock.y = T + C - F[h].height), F[h].textBlock.y < ta - C && (F[h].textBlock.y = ta - C)) : (F[h].textBlock.y < T - C && (F[h].textBlock.y = T - C), F[h].textBlock.y + F[h].height > ta + C && (F[h].textBlock.y = ta + C - F[h].height))
7257            }
7258
7259            function g() {
7260                var a, b, c, e;
7261                if ("inside" !== u.indexLabelPlacement)
7262                    for (var f = 0; f < M.length; f++) 0 == F[f].textBlock.text.length ? F[f].isDirty = !0 : (a = M[f], c = "undefined" !== typeof a.x5 ? (a.y2 + a.y4) /
7263                        2 : (a.y2 + a.y3) / 2, b = u.reversed ? "undefined" !== typeof a.x5 ? c > aa ? d(c).x2 + 1 : (a.x2 + a.x3) / 2 + 1 : (a.x2 + a.x3) / 2 + 1 : "undefined" !== typeof a.x5 ? c < aa ? d(c).x2 + 1 : (a.x4 + a.x3) / 2 + 1 : (a.x2 + a.x3) / 2 + 1, F[f].textBlock.x = b + U, F[f].textBlock.y = c - F[f].height / 2, u.reversed ? (F[f].textBlock.y + F[f].height > T + C && (F[f].textBlock.y = T + C - F[f].height), F[f].textBlock.y < ta - C && (F[f].textBlock.y = ta - C)) : (F[f].textBlock.y < T - C && (F[f].textBlock.y = T - C), F[f].textBlock.y + F[f].height > ta + C && (F[f].textBlock.y = ta + C - F[f].height)));
7264                else
7265                    for (f = 0; f < M.length; f++) 0 ==
7266                    F[f].textBlock.text.length ? F[f].isDirty = !0 : (a = M[f], b = a.height, c = F[f].height, e = F[f].width, b >= c ? (b = f != ga ? (a.x4 + a.x3) / 2 - e / 2 : (a.x5 + a.x4) / 2 - e / 2, c = f != ga ? (a.y1 + a.y3) / 2 - c / 2 : (a.y1 + a.y4) / 2 - c / 2, F[f].textBlock.x = b, F[f].textBlock.y = c) : F[f].isDirty = !0)
7267            }
7268
7269            function h() {
7270                function a(b, c) {
7271                    var d;
7272                    if (0 > b || b >= F.length) return 0;
7273                    var e, f = F[b].textBlock;
7274                    if (0 > c) {
7275                        c *= -1;
7276                        e = p(b);
7277                        d = l(e, b);
7278                        if (d >= c) return f.y -= c, c;
7279                        if (0 == b) return 0 < d && (f.y -= d), d;
7280                        d += a(e, -(c - d));
7281                        0 < d && (f.y -= d);
7282                        return d
7283                    }
7284                    e = n(b);
7285                    d = l(b, e);
7286                    if (d >= c) return f.y += c, c;
7287                    if (b == M.length -
7288                        1) return 0 < d && (f.y += d), d;
7289                    d += a(e, c - d);
7290                    0 < d && (f.y += d);
7291                    return d
7292                }
7293
7294                function b() {
7295                    var a, d, e, f, g = 0,
7296                        h;
7297                    f = ($ - Q + 2 * C) / t;
7298                    h = t;
7299                    for (var k, l = 1; l < h; l++) {
7300                        e = l * f;
7301                        for (var r = F.length - 1; 0 <= r; r--) !F[r].isDirty && (F[r].textBlock.y < e && F[r].textBlock.y + F[r].height > e) && (k = n(r), !(k >= F.length - 1) && F[r].textBlock.y + F[r].height + ha > F[k].textBlock.y && (F[r].textBlock.y = F[r].textBlock.y + F[r].height - e > e - F[r].textBlock.y ? e + 1 : e - F[r].height - 1))
7302                    }
7303                    for (k = M.length - 1; 0 < k; k--)
7304                        if (!F[k].isDirty) {
7305                            e = p(k);
7306                            if (0 > e && (e = 0, F[e].isDirty)) break;
7307                            if (F[k].textBlock.y <
7308                                F[e].textBlock.y + F[e].height) {
7309                                d = d || k;
7310                                f = k;
7311                                for (h = 0; F[f].textBlock.y < F[e].textBlock.y + F[e].height + ha;) {
7312                                    a = a || F[f].textBlock.y + F[f].height;
7313                                    h += F[f].height;
7314                                    h += ha;
7315                                    f = e;
7316                                    if (0 >= f) {
7317                                        f = 0;
7318                                        h += F[f].height;
7319                                        break
7320                                    }
7321                                    e = p(f);
7322                                    if (0 > e) {
7323                                        f = 0;
7324                                        h += F[f].height;
7325                                        break
7326                                    }
7327                                }
7328                                if (f != k) {
7329                                    g = F[f].textBlock.y;
7330                                    a -= g;
7331                                    a = h - a;
7332                                    g = c(a, d, f);
7333                                    break
7334                                }
7335                            }
7336                        }
7337                    return g
7338                }
7339
7340                function c(a, b, d) {
7341                    var e = [],
7342                        f = 0,
7343                        g = 0;
7344                    for (a = Math.abs(a); d <= b; d++) e.push(M[d]);
7345                    e.sort(function(a, b) {
7346                        return a.height - b.height
7347                    });
7348                    for (d = 0; d < e.length; d++)
7349                        if (b = e[d], f < a) g++, f += F[b.id].height + ha, F[b.id].textBlock.text =
7350                            "", F[b.id].indexLabelText = "", F[b.id].isDirty = !0, F[b.id].textBlock.measureText();
7351                        else break;
7352                    return g
7353                }
7354                for (var d, e, f, g, h, k, t = 1, r = 0; r < 2 * t; r++) {
7355                    for (var m = F.length - 1; 0 <= m && !(previousTextBlock = (previousLabel = 0 <= p(m) ? F[p(m)] : null) ? previousLabel.textBlock : null, f = F[m], g = f.textBlock, k = (h = n(m) < M.length ? F[n(m)] : null) ? h.textBlock : null, d = +f.height.toFixed(6), e = +g.y.toFixed(6), !f.isDirty && (h && e + d + ha > +k.y.toFixed(6)) && (d = g.y + d + ha - k.y, e = a(m, -d), e < d && (0 < e && (d -= e), e = a(n(m), d), e != d))); m--);
7356                    b()
7357                }
7358            }
7359
7360            function l(a, b) {
7361                return (b <
7362                    M.length ? F[b].textBlock.y : u.reversed ? T + C : ta + C) - (0 > a ? u.reversed ? ta - C : T - C : F[a].textBlock.y + F[a].height + ha)
7363            }
7364
7365            function t(a, b, c) {
7366                var d, e, f, h = [],
7367                    l = C,
7368                    n = []; - 1 !== b && (0 <= ma.indexOf(b) ? (e = ma.indexOf(b), ma.splice(e, 1)) : (ma.push(b), ma = ma.sort(function(a, b) {
7369                    return a - b
7370                })));
7371                if (0 === ma.length) h = ka;
7372                else {
7373                    e = C * (1 != ma.length || 0 != ma[0] && ma[0] != M.length - 1 ? 2 : 1) / k();
7374                    for (var t = 0; t < M.length; t++) {
7375                        if (1 == ma.length && 0 == ma[0]) {
7376                            if (0 === t) {
7377                                h.push(ka[t]);
7378                                d = l;
7379                                continue
7380                            }
7381                        } else 0 === t && (d = -1 * l);
7382                        h.push(ka[t] + d);
7383                        if (0 <= ma.indexOf(t) || t < M.length &&
7384                            0 <= ma.indexOf(t + 1)) d += e
7385                    }
7386                }
7387                f = function() {
7388                    for (var a = [], b = 0; b < M.length; b++) a.push(h[b] - M[b].y1);
7389                    return a
7390                }();
7391                var p = {
7392                    startTime: (new Date).getTime(),
7393                    duration: c || 500,
7394                    easingFunction: function(a, b, c, d) {
7395                        return H.easing.easeOutQuart(a, b, c, d)
7396                    },
7397                    changeSection: function(a) {
7398                        for (var b, c, d = 0; d < M.length; d++) b = f[d], c = M[d], newY = b * a, "undefined" === typeof n[d] && (n[d] = 0), 0 > n && (n *= -1), c.y1 += newY - n[d], c.y2 += newY - n[d], c.y3 += newY - n[d], c.y4 += newY - n[d], c.y5 && (c.y5 += newY - n[d], c.y6 += newY - n[d]), n[d] = newY
7399                    }
7400                };
7401                a._animator.animate(0, c, function(c) {
7402                    var d =
7403                        a.plotArea.ctx || a.ctx;
7404                    ja = !0;
7405                    d.clearRect(z.x1, z.y1, z.x2 - z.x1, z.y2 - z.y1);
7406                    d.fillStyle = a.backgroundColor;
7407                    d.fillRect(z.x1, z.y1, z.width, z.height);
7408                    p.changeSection(c, b);
7409                    var e = {};
7410                    e.dataSeries = u;
7411                    e.dataPoint = u.reversed ? u.dataPoints[x.length - 1 - b] : u.dataPoints[b];
7412                    e.index = u.reversed ? x.length - 1 - b : b;
7413                    a.toolTip.highlightObjects([e]);
7414                    for (e = 0; e < M.length; e++) sa(d, M[e], u.fillOpacity);
7415                    q(d);
7416                    J && ("inside" !== u.indexLabelPlacement ? r(d) : g(), m(d));
7417                    1 <= c && (ja = !1)
7418                }, null, H.easing.easeOutQuart)
7419            }
7420
7421            function k() {
7422                for (var a = 0, b = 0; b < M.length -
7423                1; b++)(0 <= ma.indexOf(b) || 0 <= ma.indexOf(b + 1)) && a++;
7424                return a
7425            }
7426
7427            function r(a) {
7428                for (var b, c, e, f, g = 0; g < M.length; g++) f = 1 === F[g].lineThickness % 2 ? 0.5 : 0, c = ((M[g].y2 + M[g].y4) / 2 << 0) + f, b = d(c).x2 - 1, e = F[g].textBlock.x, f = (F[g].textBlock.y + F[g].height / 2 << 0) + f, F[g].isDirty || 0 == F[g].lineThickness || (a.strokeStyle = F[g].lineColor, a.lineWidth = F[g].lineThickness, a.setLineDash && a.setLineDash(G(F[g].lineDashType, F[g].lineThickness)), a.beginPath(), a.moveTo(b, c), a.lineTo(e, f), a.stroke())
7429            }
7430
7431            function p(a) {
7432                for (a -= 1; - 1 <= a && -1 != a && F[a].isDirty; a--);
7433                return a
7434            }
7435
7436            function n(a) {
7437                for (a += 1; a <= M.length && a != M.length && F[a].isDirty; a++);
7438                return a
7439            }
7440
7441            function d(a) {
7442                for (var b, c = 0; c < x.length; c++)
7443                    if (M[c].y1 < a && M[c].y4 > a) {
7444                        b = M[c];
7445                        break
7446                    }
7447                return b ? (a = b.y6 ? a > b.y6 ? b.x3 + (b.x4 - b.x3) / (b.y4 - b.y3) * (a - b.y3) : b.x2 + (b.x3 - b.x2) / (b.y3 - b.y2) * (a - b.y2) : b.x2 + (b.x3 - b.x2) / (b.y3 - b.y2) * (a - b.y2), {
7448                    x1: a,
7449                    x2: a
7450                }) : -1
7451            }
7452
7453            function m(a) {
7454                for (var b = 0; b < M.length; b++) F[b].isDirty || (a && (F[b].textBlock.ctx = a), F[b].textBlock.render(!0))
7455            }
7456
7457            function q(a) {
7458                s.plotArea.layoutManager.reset();
7459                a.roundRect || Ca(a);
7460                s.title &&
7461                (s.title.dockInsidePlotArea || "center" === s.title.horizontalAlign && "center" === s.title.verticalAlign) && (s.title.ctx = a, s.title.render());
7462                if (s.subtitles)
7463                    for (var b = 0; b < s.subtitles.length; b++) {
7464                        var c = s.subtitles[b];
7465                        if (c.dockInsidePlotArea || "center" === c.horizontalAlign && "center" === c.verticalAlign) s.subtitles.ctx = a, c.render()
7466                    }
7467                s.legend && (s.legend.dockInsidePlotArea || "center" === s.legend.horizontalAlign && "center" === s.legend.verticalAlign) && (s.legend.ctx = a, s.legend.render());
7468                Z.fNg && Z.fNg(s)
7469            }
7470            var s = this;
7471            if (!(0 >=
7472                a.dataSeriesIndexes.length)) {
7473                for (var u = this.data[a.dataSeriesIndexes[0]], x = u.dataPoints, z = this.plotArea, C = 0.025 * z.width, B = 0.01 * z.width, A = 0, O = z.height - 2 * C, L = Math.min(z.width - 2 * B, 2.8 * z.height), J = !1, I = 0; I < x.length; I++)
7474                    if (!J && ("undefined" !== typeof x[I].indexLabel && null !== x[I].indexLabel && 0 < x[I].indexLabel.toString().length) && (J = !0), !J && ("undefined" !== typeof x[I].label && null !== x[I].label && 0 < x[I].label.toString().length) && (J = !0), !J && "function" === typeof u.indexLabelFormatter || "function" === typeof x[I].indexLabelFormatter) J = !0;
7475                J = J || "undefined" !== typeof u.indexLabel && null !== u.indexLabel && 0 < u.indexLabel.toString().length;
7476                "inside" !== u.indexLabelPlacement && J || (B = (z.width - 0.75 * L) / 2);
7477                var I = z.x1 + B,
7478                    P = z.x2 - B,
7479                    Q = z.y1 + C,
7480                    $ = z.y2 - C,
7481                    R = a.targetCanvasCtx || this.plotArea.ctx || this.ctx;
7482                if (0 != u.length && (u.dataPoints && u.visible) && 0 !== x.length) {
7483                    var N, E;
7484                    a = 75 * L / 100;
7485                    var U = 30 * (P - a) / 100;
7486                    "funnel" === u.type ? (N = y(u.options.neckHeight) ? 0.35 * O : u.neckHeight, E = y(u.options.neckWidth) ? 0.25 * a : u.neckWidth, "string" === typeof N && N.match(/%$/) ? (N = parseInt(N), N =
7487                        N * O / 100) : N = parseInt(N), "string" === typeof E && E.match(/%$/) ? (E = parseInt(E), E = E * a / 100) : E = parseInt(E), N > O ? N = O : 0 >= N && (N = 0), E > a ? E = a - 0.5 : 0 >= E && (E = 0)) : "pyramid" === u.type && (E = N = 0, u.reversed = u.reversed ? !1 : !0);
7488                    var B = I + a / 2,
7489                        X = I,
7490                        V = I + a,
7491                        T = u.reversed ? $ : Q,
7492                        K = B - E / 2,
7493                        Y = B + E / 2,
7494                        aa = u.reversed ? Q + N : $ - N,
7495                        ta = u.reversed ? Q : $;
7496                    a = [];
7497                    var B = [],
7498                        M = [],
7499                        L = [],
7500                        W = Q,
7501                        ga, fa = (aa - T) / (K - X),
7502                        ia = -fa,
7503                        I = "area" === (u.valueRepresents ? u.valueRepresents : "height") ? b() : f();
7504                    if (-1 !== I) {
7505                        if (u.reversed)
7506                            for (L.push(W), E = I.length - 1; 0 < E; E--) W += I[E], L.push(W);
7507                        else
7508                            for (E =
7509                                     0; E < I.length; E++) W += I[E], L.push(W);
7510                        if (u.reversed)
7511                            for (E = 0; E < I.length; E++) L[E] < aa ? (a.push(K), B.push(Y), ga = E) : (a.push((L[E] - T + fa * X) / fa), B.push((L[E] - T + ia * V) / ia));
7512                        else
7513                            for (E = 0; E < I.length; E++) L[E] < aa ? (a.push((L[E] - T + fa * X) / fa), B.push((L[E] - T + ia * V) / ia), ga = E) : (a.push(K), B.push(Y));
7514                        for (E = 0; E < I.length - 1; E++) W = u.reversed ? x[x.length - 1 - E].color ? x[x.length - 1 - E].color : u._colorSet[(x.length - 1 - E) % u._colorSet.length] : x[E].color ? x[E].color : u._colorSet[E % u._colorSet.length], E === ga ? M.push({
7515                            x1: a[E],
7516                            y1: L[E],
7517                            x2: B[E],
7518                            y2: L[E],
7519                            x3: Y,
7520                            y3: aa,
7521                            x4: B[E + 1],
7522                            y4: L[E + 1],
7523                            x5: a[E + 1],
7524                            y5: L[E + 1],
7525                            x6: K,
7526                            y6: aa,
7527                            id: E,
7528                            height: L[E + 1] - L[E],
7529                            color: W
7530                        }) : M.push({
7531                            x1: a[E],
7532                            y1: L[E],
7533                            x2: B[E],
7534                            y2: L[E],
7535                            x3: B[E + 1],
7536                            y3: L[E + 1],
7537                            x4: a[E + 1],
7538                            y4: L[E + 1],
7539                            id: E,
7540                            height: L[E + 1] - L[E],
7541                            color: W
7542                        });
7543                        var ha = 2,
7544                            F = [],
7545                            ja = !1,
7546                            ma = [],
7547                            ka = [],
7548                            I = !1;
7549                        a = a = 0;
7550                        Da(ma);
7551                        for (E = 0; E < x.length; E++) x[E].exploded && (I = !0, u.reversed ? ma.push(x.length - 1 - E) : ma.push(E));
7552                        R.clearRect(z.x1, z.y1, z.width, z.height);
7553                        R.fillStyle = s.backgroundColor;
7554                        R.fillRect(z.x1, z.y1, z.width, z.height);
7555                        if (J && u.visible && (c(), g(), e(), "inside" !== u.indexLabelPlacement)) {
7556                            h();
7557                            for (E = 0; E < x.length; E++) F[E].isDirty || (a = F[E].textBlock.x + F[E].width, a = (P - a) / 2, 0 == E && (A = a), A > a && (A = a));
7558                            for (E = 0; E < M.length; E++) M[E].x1 += A, M[E].x2 += A, M[E].x3 += A, M[E].x4 += A, M[E].x5 && (M[E].x5 += A, M[E].x6 += A), F[E].textBlock.x += A
7559                        }
7560                        for (E = 0; E < M.length; E++) A = M[E], sa(R, A, u.fillOpacity), ka.push(A.y1);
7561                        q(R);
7562                        J && u.visible && ("inside" === u.indexLabelPlacement || s.animationEnabled || r(R), s.animationEnabled || m());
7563                        if (!J)
7564                            for (E = 0; E < x.length; E++) A = u.dataPointIds[E], a = {
7565                                id: A,
7566                                objectType: "dataPoint",
7567                                dataPointIndex: E,
7568                                dataSeriesIndex: 0,
7569                                funnelSection: M[u.reversed ? x.length - 1 - E : E]
7570                            }
7570, s._eventManager.objectMap[A] = a;
7571                        !s.animationEnabled && I ? t(s, -1, 0) : s.animationEnabled && !s.animatedRender && t(s, -1, 0);
7572                        this.funnelPyramidClickHandler = function(a) {
7573                            var b = -1;
7574                            if (!ja && !s.isAnimating && (y(a.dataSeries.explodeOnClick) || a.dataSeries.explodeOnClick) && (b = u.reversed ? x.length - 1 - a.dataPointIndex : a.dataPointIndex, 0 <= b)) {
7575                                a = b;
7576                                if ("funnel" === u.type || "pyramid" === u.type) u.reversed ? x[x.length - 1 - a].exploded = x[x.length - 1 - a].exploded ? !1 : !0 : x[a].exploded = x[a].exploded ?
7577                                    !1 : !0;
7578                                t(s, b, 500)
7579                            }
7580                        };
7581                        return {
7582                            source: R,
7583                            dest: this.plotArea.ctx,
7584                            animationCallback: function(a, b) {
7585                                H.fadeInAnimation(a, b);
7586                                1 <= a && (t(s, -1, 500), q(s.plotArea.ctx || s.ctx))
7587                            },
7588                            easingFunction: H.easing.easeInQuad,
7589                            animationBase: 0
7590                        }
7591                    }
7592                }
7593            }
7594        };
7595        q.prototype.animationRequestId = null;
7596        q.prototype.requestAnimFrame = function() {
7597            return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(a) {
7598                    window.setTimeout(a, 1E3 / 60)
7599                }
7600        }();
7601        q.prototype.cancelRequestAnimFrame = window.cancelAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout;
7602        q.prototype.set = function(a, f, b) {
7603            b = "undefined" === typeof b ? !0 : b;
7604            "options" === a ? (this.options = f, b && this.render()) : q.base.set.call(this, a, f, b)
7605        };
7606        q.prototype.exportChart = function(a) {
7607            a = "undefined" === typeof a ? {} : a;
7608            var f = a.format ? a.format : "png",
7609                b = a.fileName ? a.fileName : this.exportFileName;
7610            if (a.toDataURL) return this.canvas.toDataURL("image/" + f);
7611            s(this.canvas, f, b)
7612        };
7613        q.prototype.print = function() {
7614            var a = this.exportChart({
7615                    toDataURL: !0
7616                }),
7617                f = document.createElement("iframe");
7618            f.setAttribute("class", "canvasjs-chart-print-frame");
7619            f.setAttribute("style", "position:absolute; width:100%; border: 0px; margin: 0px 0px 0px 0px; padding 0px 0px 0px 0px;");
7620            f.style.height = this.height + "px";
7621            this._canvasJSContainer.appendChild(f);
7622            var b = this,
7623                c = f.contentWindow || f.contentDocument.document || f.contentDocument;
7624            c.document.open();
7625            c.document.write('<!DOCTYPE HTML>\n<html><body style="margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;"><img src="' + a + '"/><body/></html>');
7626            c.document.close();
7627            setTimeout(function() {
7628                c.focus();
7629                c.print();
7630                setTimeout(function() {
7631                    b._canvasJSContainer.removeChild(f)
7632                }, 1E3)
7633            }, 500)
7634        };
7635        q.prototype.getPercentAndTotal = function(a, f) {
7636            var b = null,
7637                c = null,
7638                e = null;
7639            if (0 <= a.type.indexOf("stacked")) c = 0, b = f.x.getTime ? f.x.getTime() : f.x, b in a.plotUnit.yTotals && (c = a.plotUnit.yTotals[b], e = isNaN(f.y) ? 0 : 100 * (f.y / c));
7640            else if ("pie" ===
7641                a.type || "doughnut" === a.type || "funnel" === a.type || "pyramid" === a.type) {
7642                for (i = c = 0; i < a.dataPoints.length; i++) isNaN(a.dataPoints[i].y) || (c += a.dataPoints[i].y);
7643                e = isNaN(f.y) ? 0 : 100 * (f.y / c)
7644            }
7645            return {
7646                percent: e,
7647                total: c
7648            }
7649        };
7650        q.prototype.replaceKeywordsWithValue = function(a, f, b, c, e) {
7651            var g = this;
7652            e = "undefined" === typeof e ? 0 : e;
7653            if ((0 <= b.type.indexOf("stacked") || "pie" === b.type || "doughnut" === b.type || "funnel" === b.type || "pyramid" === b.type) && (0 <= a.indexOf("#percent") || 0 <= a.indexOf("#total"))) {
7654                var h = "#percent",
7655                    l = "#total",
7656                    t = this.getPercentAndTotal(b,
7657                        f),
7658                    l = isNaN(t.total) ? l : t.total,
7659                    h = isNaN(t.percent) ? h : t.percent;
7660                do {
7661                    t = "";
7662                    if (b.percentFormatString) t = b.percentFormatString;
7663                    else {
7664                        var t = "#,##0.",
7665                            k = Math.max(Math.ceil(Math.log(1 / Math.abs(h)) / Math.LN10), 2);
7666                        if (isNaN(k) || !isFinite(k)) k = 2;
7667                        for (var r = 0; r < k; r++) t += "#";
7668                        b.percentFormatString = t
7669                    }
7670                    a = a.replace("#percent", W(h, t, g._cultureInfo));
7671                    a = a.replace("#total", W(l, b.yValueFormatString ? b.yValueFormatString : "#,##0.########", g._cultureInfo))
7672                } while (0 <= a.indexOf("#percent") || 0 <= a.indexOf("#total"))
7673            }
7674            return a.replace(/\{.*?\}|"[^"]*"|'[^']*'/g,
7675                function(a) {
7676                    if ('"' === a[0] && '"' === a[a.length - 1] || "'" === a[0] && "'" === a[a.length - 1]) return a.slice(1, a.length - 1);
7677                    a = Ga(a.slice(1, a.length - 1));
7678                    a = a.replace("#index", e);
7679                    var h = null;
7680                    try {
7681                        var d = a.match(/(.*?)\s*\[\s*(.*?)\s*\]/);
7682                        d && 0 < d.length && (h = Ga(d[2]), a = Ga(d[1]))
7683                    } catch (k) {}
7684                    d = null;
7685                    if ("color" === a) return "waterfall" === b.type ? f.color ? f.color : -1 < f.y ? b.risingColor : b.fallingColor : "error" === b.type ? b.color ? b.color : b._colorSet[h % b._colorSet.length] : f.color ? f.color : b.color ? b.color : b._colorSet[c % b._colorSet.length];
7686                    if (f.hasOwnProperty(a)) d =
7687                        f;
7688                    else if (b.hasOwnProperty(a)) d = b;
7689                    else return "";
7690                    d = d[a];
7691                    null !== h && (d = d[h]);
7692                    if ("x" === a)
7693                        if ("dateTime" === b.axisX.valueType || "dateTime" === b.xValueType || f.x && f.x.getTime) {
7694                            if (g.plotInfo.plotTypes[0].plotUnits[0].axisX && !g.plotInfo.plotTypes[0].plotUnits[0].axisX.logarithmic) return Ba(d, f.xValueFormatString ? f.xValueFormatString : b.xValueFormatString ? b.xValueFormatString : b.xValueFormatString = g.axisX && g.axisX.autoValueFormatString ? g.axisX.autoValueFormatString : "DD MMM YY", g._cultureInfo)
7695                        } else return W(d, f.xValueFormatString ?
7696                            f.xValueFormatString : b.xValueFormatString ? b.xValueFormatString : b.xValueFormatString = "#,##0.########", g._cultureInfo);
7697                    else return "y" === a ? W(d, f.yValueFormatString ? f.yValueFormatString : b.yValueFormatString ? b.yValueFormatString : b.yValueFormatString = "#,##0.########", g._cultureInfo) : "z" === a ? W(d, f.zValueFormatString ? f.zValueFormatString : b.zValueFormatString ? b.zValueFormatString : b.zValueFormatString = "#,##0.########", g._cultureInfo) : d
7698                })
7699        };
7700        pa(T, X);
7701        T.prototype.render = function() {
7702            var a = this.dockInsidePlotArea ?
7703                    this.chart.plotArea : this.chart,
7704                f = a.layoutManager.getFreeSpace(),
7705                b = null,
7706                c = 0,
7707                e = 0,
7708                g = 0,
7709                h = 0,
7710                l = this.markerMargin = this.chart.options.legend && !y(this.chart.options.legend.markerMargin) ? this.chart.options.legend.markerMargin : 0.3 * this.fontSize;
7711            this.height = 0;
7712            var t = [],
7713                k = [];
7714            "top" === this.verticalAlign || "bottom" === this.verticalAlign ? (this.orientation = "horizontal", b = this.verticalAlign, g = this.maxWidth = null !== this.maxWidth ? this.maxWidth : f.width, h = this.maxHeight = null !== this.maxHeight ? this.maxHeight : 0.5 * f.height) : "center" ===
7715                this.verticalAlign && (this.orientation = "vertical", b = this.horizontalAlign, g = this.maxWidth = null !== this.maxWidth ? this.maxWidth : 0.5 * f.width, h = this.maxHeight = null !== this.maxHeight ? this.maxHeight : f.he
7715ight);
7716            for (var r = [], p = 0; p < this.dataSeries.length; p++) {
7717                var n = this.dataSeries[p];
7718                if (n.dataPoints && n.dataPoints.length)
7719                    if ("pie" !== n.type && "doughnut" !== n.type && "funnel" !== n.type && "pyramid" !== n.type) {
7720                        var d = n.legendMarkerType = n.legendMarkerType ? n.legendMarkerType : "line" !== n.type && "stepLine" !== n.type && "spline" !== n.type &&
7721                            "scatter" !== n.type && "bubble" !== n.type || !n.markerType ? "error" === n.type && n._linkedSeries ? n._linkedSeries.legendMarkerType ? n._linkedSeries.legendMarkerType : Q.getDefaultLegendMarker(n._linkedSeries.type) : Q.getDefaultLegendMarker(n.type) : n.markerType,
7722                            m = n.legendText ? n.legendText : this.itemTextFormatter ? this.itemTextFormatter({
7723                                chart: this.chart,
7724                                legend: this.options,
7725                                dataSeries: n,
7726                                dataPoint: null
7727                            }) : n.name,
7728                            q = n.legendMarkerColor = n.legendMarkerColor ? n.legendMarkerColor : n.markerColor ? n.markerColor : "error" === n.type ?
7729                                y(n.whiskerColor) ? n._colorSet[0] : n.whiskerColor : n._colorSet[0],
7730                            s = n.markerSize || "line" !== n.type && "stepLine" !== n.type && "spline" !== n.type ? 0.75 * this.lineHeight : 0,
7731                            u = n.legendMarkerBorderColor ? n.legendMarkerBorderColor : n.markerBorderColor,
7732                            v = n.legendMarkerBorderThickness ? n.legendMarkerBorderThickness : n.markerBorderThickness ? Math.max(1, Math.round(0.2 * s)) : 0;
7733                        "error" === n.type && r.push(q);
7734                        m = this.chart.replaceKeywordsWithValue(m, n.dataPoints[0], n, p);
7735                        d = {
7736                            markerType: d,
7737                            markerColor: q,
7738                            text: m,
7739                            textBlock: null,
7740                            chartType: n.type,
7741                            markerSize: s,
7742                            lineColor: n._colorSet[0],
7743                            dataSeriesIndex: n.index,
7744                            dataPointIndex: null,
7745                            markerBorderColor: u,
7746                            markerBorderThickness: v
7747                        };
7748                        t.push(d)
7749                    } else
7750                        for (var x = 0; x < n.dataPoints.length; x++) {
7751                            var z = n.dataPoints[x],
7752                                d = z.legendMarkerType ? z.legendMarkerType : n.legendMarkerType ? n.legendMarkerType : Q.getDefaultLegendMarker(n.type),
7753                                m = z.legendText ? z.legendText : n.legendText ? n.legendText : this.itemTextFormatter ? this.itemTextFormatter({
7754                                    chart: this.chart,
7755                                    legend: this.options,
7756                                    dataSeries: n,
7757                                    dataPoint: z
7758                                }) : z.name ? z.name : "DataPoint: " +
7759                                    (x + 1),
7760                                q = z.legendMarkerColor ? z.legendMarkerColor : n.legendMarkerColor ? n.legendMarkerColor : z.color ? z.color : n.color ? n.color : n._colorSet[x % n._colorSet.length],
7761                                s = 0.75 * this.lineHeight,
7762                                u = z.legendMarkerBorderColor ? z.legendMarkerBorderColor : n.legendMarkerBorderColor ? n.legendMarkerBorderColor : z.markerBorderColor ? z.markerBorderColor : n.markerBorderColor,
7763                                v = z.legendMarkerBorderThickness ? z.legendMarkerBorderThickness : n.legendMarkerBorderThickness ? n.legendMarkerBorderThickness : z.markerBorderThickness || n.markerBorderThickness ?
7764                                    Math.max(1, Math.round(0.2 * s)) : 0,
7765                                m = this.chart.replaceKeywordsWithValue(m, z, n, x),
7766                                d = {
7767                                    markerType: d,
7768                                    markerColor: q,
7769                                    text: m,
7770                                    textBlock: null,
7771                                    chartType: n.type,
7772                                    markerSize: s,
7773                                    dataSeriesIndex: p,
7774                                    dataPointIndex: x,
7775                                    markerBorderColor: u,
7776                                    markerBorderThickness: v
7777                                };
7778                            (z.showInLegend || n.showInLegend && !1 !== z.showInLegend
7778) && t.push(d)
7779                        }
7780            }!0 === this.reversed && t.reverse();
7781            if (0 < t.length) {
7782                n = null;
7783                m = x = z = v = 0;
7784                z = null !== this.itemWidth ? null !== this.itemMaxWidth ? Math.min(this.itemWidth, this.itemMaxWidth, g) : this.itemMaxWidth = Math.min(this.itemWidth,
7785                    g) : null !== this.itemMaxWidth ? Math.min(this.itemMaxWidth, g) : this.itemMaxWidth = g;
7786                s = 0 === s ? 0.75 * this.lineHeight : s;
7787                z -= s + l;
7788                for (p = 0; p < t.length; p++) {
7789                    d = t[p];
7790                    q = z;
7791                    if ("line" === d.chartType || "spline" === d.chartType || "stepLine" === d.chartType) q -= 2 * 0.1 * this.lineHeight;
7792                    if (!(0 >= h || "undefined" === typeof h || 0 >= q || "undefined" === typeof q)) {
7793                        if ("horizontal" === this.orientation) {
7794                            d.textBlock = new la(this.ctx, {
7795                                x: 0,
7796                                y: 0,
7797                                maxWidth: q,
7798                                maxHeight: this.itemWrap ? h : this.lineHeight,
7799                                angle: 0,
7800                                text: d.text,
7801                                horizontalAlign: "left",
7802                                fontSize: this.fontSize,
7803                                fontFamily: this.fontFamily,
7804                                fontWeight: this.fontWeight,
7805                                fontColor: this.fontColor,
7806                                fontStyle: this.fontStyle,
7807                                textBaseline: "middle"
7808                            });
7809                            d.textBlock.measureText();
7810                            null !== this.itemWidth && (d.textBlock.width = this.itemWidth - (s + l + ("line" === d.chartType || "spline" === d.chartType || "stepLine" === d.chartType ? 2 * 0.1 * this.lineHeight : 0)));
7811                            if (!n || n.width + Math.round(d.textBlock.width + s + l + (0 === n.width ? 0 : this.horizontalSpacing) + ("line" === d.chartType || "spline" === d.chartType || "stepLine" === d.chartType ? 2 * 0.1 * this.lineHeight : 0)) > g) n = {
7812                                items: [],
7813                                width: 0
7814                            }, k.push(n), this.height += x, x = 0;
7815                            x = Math.max(x, d.textBlock.height)
7816                        } else d.textBlock = new la(this.ctx, {
7817                            x: 0,
7818                            y: 0,
7819                            maxWidth: z,
7820                            maxHeight: !0 === this.itemWrap ? h : 1.5 * this.fontSize,
7821                            angle: 0,
7822                            text: d.text,
7823                            horizontalAlign: "left",
7824                            fontSize: this.fontSize,
7825                            fontFamily: this.fontFamily,
7826                            fontWeight: this.fontWeight,
7827                            fontColor: this.fontColor,
7828                            fontStyle: this.fontStyle,
7829                            textBaseline: "middle"
7830                        }), d.textBlock.measureText(), null !== this.itemWidth && (d.textBlock.width = this.itemWidth - (s + l + ("line" === d.chartType || "spline" === d.chartType ||
7831                            "stepLine" === d.chartType ? 2 * 0.1 * this.lineHeight : 0))), this.height < h - this.lineHeight ? (n = {
7832                            items: [],
7833                            width: 0
7834                        }, k.push(n)) : (n = k[v], v = (v + 1) % k.length), this.height += d.textBlock.height;
7835                        d.textBlock.x = n.width;
7836                        d.textBlock.y = 0;
7837                        n.width += Math.round(d.textBlock.width + s + l + (0 === n.width ? 0 : this.horizontalSpacing) + ("line" === d.chartType || "spline" === d.chartType || "stepLine" === d.chartType ? 2 * 0.1 * this.lineHeight : 0));
7838                        n.items.push(d);
7839                        this.width = Math.max(n.width, this.width);
7840                        m = d.textBlock.width + (s + l + ("line" === d.chartType || "spline" ===
7841                            d.chartType || "stepLine" === d.chartType ? 2 * 0.1 * this.lineHeight : 0))
7842                    }
7843                }
7844                this.itemWidth = m;
7845                this.height = !1 === this.itemWrap ? k.length * this.lineHeight : this.height + x;
7846                this.height = Math.min(h, this.height);
7847                this.width = Math.min(g, this.width)
7848            }
7849            "top" === this.verticalAlign ? (e = "left" === this.horizontalAlign ? f.x1 : "right" === this.horizontalAlign ? f.x2 - this.width : f.x1 + f.width / 2 - this.width / 2, c = f.y1) : "center" === this.verticalAlign ? (e = "left" === this.horizontalAlign ? f.x1 : "right" === this.horizontalAlign ? f.x2 - this.width : f.x1 + f.width / 2 - this.width /
7850                2, c = f.y1 + f.height / 2 - this.height / 2) : "bottom" === this.verticalAlign && (e = "left" === this.horizontalAlign ? f.x1 : "right" === this.horizontalAlign ? f.x2 - this.width : f.x1 + f.width / 2 - this.width / 2, c = f.y2 - this.height);
7851            this.items = t;
7852            for (p = 0; p < this.items.length; p++) d = t[p], d.id = ++this.chart._eventManager.lastObjectId, this.chart._eventManager.objectMap[d.id] = {
7853                id: d.id,
7854                objectType: "legendItem",
7855                legendItemIndex: p,
7856                dataSeriesIndex: d.dataSeriesIndex,
7857                dataPointIndex: d.dataPointIndex
7858            };
7859            (0 < this.borderThickness && this.borderColor || this.backgroundColor) &&
7860            this.ctx.roundRect(e, c, this.width, this.height, this.cornerRadius, this.borderThickness, this.backgroundColor, this.borderColor);
7861            for (p = f = 0; p < k.length; p++) {
7862                n = k[p];
7863                for (z = x = 0; z < n.items.length; z++) {
7864                    d = n.items[z];
7865                    q = d.textBlock.x + e + (0 === z ? 0.2 * s : this.horizontalSpacing);
7866                    u = c + f;
7867                    m = q;
7868                    this.chart.data[d.dataSeriesIndex].visible || (this.ctx.globalAlpha = 0.5);
7869                    this.ctx.save();
7870                    this.ctx.beginPath();
7871                    this.ctx.rect(e, c, g, Math.max(h - h % this.lineHeight, 0));
7872                    this.ctx.clip();
7873                    if ("line" === d.chartType || "stepLine" === d.chartType || "spline" ===
7874                        d.chartType) this.ctx.strokeStyle = d.lineColor, this.ctx.lineWidth = Math.ceil(this.lineHeight / 8), this.ctx.beginPath(), this.ctx.moveTo(q - 0.1 * this.lineHeight, u + this.lineHeight / 2), this.ctx.lineTo(q + 0.85 * this.lineHeight, u + this.lineHeight / 2), this.ctx.stroke(), m -= 0.1 * this.lineHeight;
7875                    if ("error" === d.chartType) {
7876                        this.ctx.strokeStyle = r[0];
7877                        v = s / 8;
7878                        this.ctx.lineWidth = v;
7879                        this.ctx.beginPath();
7880                        var v = q - 0.08 * this.lineHeight + 0.1 * this.lineHeight,
7881                            B = u + 0.15 * this.lineHeight,
7882                            A = 0.7 * this.lineHeight,
7883                            C = A + 0.02 * this.lineHeight;
7884                        this.ctx.moveTo(v,
7885                            B);
7886                        this.ctx.lineTo(v + A, B);
7887                        this.ctx.stroke();
7888                        this.ctx.beginPath();
7889                        this.ctx.moveTo(v + A / 2, B);
7890                        this.ctx.lineTo(v + A / 2, B + C);
7891                        this.ctx.stroke();
7892                        this.ctx.beginPath();
7893                        this.ctx.moveTo(v, B + C);
7894                        this.ctx.lineTo(v + A, B + C);
7895                        this.ctx.stroke();
7896                        r.shift()
7897                    }
7898                    ja.drawMarker(q + s / 2, u + this.lineHeight / 2, this.ctx, d.markerType, "error" === d.chartType || "line" === d.chartType || "spline" === d.chartType ? d.markerSize / 2 : d.markerSize, d.markerColor, d.markerBorderColor, d.markerBorderThickness);
7899                    d.textBlock.x = q + l + s;
7900                    if ("line" === d.chartType || "stepLine" ===
7901                        d.chartType || "spline" === d.chartType) d.textBlock.x += 0.1 * this.lineHeight;
7902                    d.textBlock.y = Math.round(u + this.lineHeight / 2);
7903                    d.textBlock.render(!0);
7904                    this.ctx.restore();
7905                    x = 0 < z ? Math.max(x, d.textBlock.height) : d.textBlock.height;
7906                    this.chart.data[d.dataSeriesIndex].visible || (this.ctx.globalAlpha = 1);
7907                    v = R(d.id);
7908                    this.ghostCtx.fillStyle = v;
7909                    this.ghostCtx.beginPath();
7910                    this.ghostCtx.fillRect(m, d.textBlock.y - this.lineHeight / 2, d.textBlock.x + d.textBlock.width - m, d.textBlock.height);
7911                    d.x1 = this.chart._eventManager.objectMap[d.id].x1 =
7912                        m;
7913                    d.y1 = this.chart._eventManager.objectMap[d.id].y1 = d.textBlock.y - this.lineHeight / 2;
7914                    d.x2 = this.chart._eventManager.objectMap[d.id].x2 = d.textBlock.x + d.textBlock.width;
7915                    d.y2 = this.chart._eventManager.objectMap[d.id].y2 = d.textBlock.y + d.textBlock.height - this.lineHeight / 2
7916                }
7917                f += x
7918            }
7919            0 < t.length && a.layoutManager.registerSpace(b, {
7920                width: this.width + 2 + 2,
7921                height: this.height + 5 + 5
7922            });
7923            this.bounds = {
7924                x1: e,
7925                y1: c,
7926                x2: e + this.width,
7927                y2: c + this.height
7928            }
7929        };
7930        pa(Q, X);
7931        Q.prototype.getDefaultAxisPlacement = function() {
7932            var a = this.type;
7933            if ("column" ===
7934                a || "line" === a || "stepLine" === a || "spline" === a || "area" === a || "stepArea" === a || "splineArea" === a || "stackedColumn" === a || "stackedLine" === a || "bubble" === a || "scatter" === a || "stackedArea" === a || "stackedColumn100" === a || "stackedLine100" === a || "stackedArea100" === a || "candlestick" === a || "ohlc" === a || "rangeColumn" === a || "rangeArea" === a || "rangeSplineArea" === a || "boxAndWhisker" === a || "waterfall" === a) return "normal";
7935            if ("bar" === a || "stackedBar" === a || "stackedBar100" === a || "rangeBar" === a) return "xySwapped";
7936            if ("pie" === a || "doughnut" ===
7937                a || "funnel" === a || "pyramid" === a) return "none";
7938            "error" !== a && window.console.log("Unknown Chart Type: " + a);
7939            return null
7940        };
7941        Q.getDefaultLegendMarker = function(a) {
7942            if ("column" === a || "stackedColumn" === a || "stackedLine" === a || "bar" === a || "stackedBar" === a || "stackedBar100" === a || "bubble" === a || "scatter" === a || "stackedColumn100" === a || "stackedLine100" === a || "stepArea" === a || "candlestick" === a || "ohlc" === a || "rangeColumn" === a || "rangeBar" === a || "rangeArea" === a || "rangeSplineArea" === a || "boxAndWhisker" === a || "waterfall" === a) return "square";
7943            if ("line" === a || "stepLine" === a || "spline" === a || "pie" === a || "doughnut" === a) return "circle";
7944            if ("area" === a || "splineArea" === a || "stackedArea" === a || "stackedArea100" === a || "funnel" === a || "pyramid" === a) return "triangle";
7945            if ("error" === a) return "none";
7946            window.console.log("Unknown Chart Type: " + a);
7947            return null
7948        };
7949        Q.prototype.getDataPointAtX = function(a, f) {
7950            if (!this.dataPoints || 0 === this.dataPoints.length) return null;
7951            var b = {
7952                    dataPoint: null,
7953                    distance: Infinity,
7954                    index: NaN
7955                },
7956                c = null,
7957                e = 0,
7958                g = 0,
7959                h = 1,
7960                l = Infinity,
7961                t = 0,
7962                k = 0,
7963                r = 0;
7964            "none" !== this.chart.plotInfo.axisPlacement &&
7965            (this.axisX.logarithmic ? (r = Math.log(this.dataPoints[this.dataPoints.length - 1].x / this.dataPoints[0].x), r = 1 < r ? Math.min(Math.max((this.dataPoints.length - 1) / r * Math.log(a / this.dataPoints[0].x) >> 0, 0), this.dataPoints.length) : 0) : (r = this.dataPoints[this.dataPoints.length - 1].x - this.dataPoints[0].x, r = 0 < r ? Math.min(Math.max((this.dataPoints.length - 1) / r * (a - this.dataPoints[0].x) >> 0, 0), this.dataPoints.length) : 0));
7966            for (;;) {
7967                g = 0 < h ? r + e : r - e;
7968                if (0 <= g && g < this.dataPoints.length) {
7969                    var c = this.dataPoints[g],
7970                        p = this.axisX.logarithmic ?
7971                            c.x > a ? c.x / a : a / c.x : Math.abs(c.x - a);
7972                    p < b.distance && (b.dataPoint = c, b.distance = p, b.index = g);
7973                    c = p;
7974                    c <= l ? l = c : 0 < h ? t++ : k++;
7975                    if (1E3 < t && 1E3 < k) break
7976                } else if (0 > r - e && r + e >= this.dataPoints.length) break; - 1 === h ? (e++, h = 1) : h = -1
7977            }
7978            return f || b.dataPoint.x !== a ? f && null !== b.dataPoint ? b : null : b
7979        };
7980        Q.prototype.getDataPointAtXY = function(a, f, b) {
7981            if (!this.dataPoints || 0 === this.dataPoints.length || a < this.chart.plotArea.x1 || a > this.chart.plotArea.x2 || f < this.chart.plotArea.y1 || f > this.chart.plotArea.y2) return null;
7982            b = b || !1;
7983            var c = [],
7984                e = 0,
7985                g = 0,
7986                h =
7987                    1,
7988                l = !1,
7989                t = Infinity,
7990                k = 0,
7991                r = 0,
7992                p = 0;
7993            if ("none" !== this.chart.plotInfo.axisPlacement)
7994                if (p = (this.chart.axisX[0] ? this.chart.axisX[0] : this.chart.axisX2[0]).getXValueAt({
7995                        x: a,
7996                        y: f
7997                    }), this.axisX.logarithmic) var n = Math.log(this.dataPoints[this.dataPoints.length - 1].x / this.dataPoints[0].x),
7998                    p = 1 < n ? Math.min(Math.max((this.dataPoints.length - 1) / n * Math.log(p / this.dataPoints[0].x) >> 0, 0), this.dataPoints.length) : 0;
7999                else n = this.dataPoints[this.dataPoints.length - 1].x - this.dataPoints[0].x, p 
7999= 0 < n ? Math.min(Math.max((this.dataPoints.length -
8000                    1) / n * (p - this.dataPoints[0].x) >> 0, 0), this.dataPoints.length) : 0;
8001            for (;;) {
8002                g = 0 < h ? p + e : p - e;
8003                if (0 <= g && g < this.dataPoints.length) {
8004                    var n = this.chart._eventManager.objectMap[this.dataPointIds[g]],
8005                        d = this.dataPoints[g],
8006                        m = null;
8007                    if (n) {
8008                        switch (this.type) {
8009                            case "column":
8010                            case "stackedColumn":
8011                            case "stackedColumn100":
8012                            case "bar":
8013                            case "stackedBar":
8014                            case "stackedBar100":
8015                            case "rangeColumn":
8016                            case "rangeBar":
8017                            case "waterfall":
8018                            case "error":
8019                                a >= n.x1 && (a <= n.x2 && f >= n.y1 && f <= n.y2) && (c.push({
8020                                    dataPoint: d,
8021                                    dataPointIndex: g,
8022                                    dataSeries: this,
8023                                    distance: Math.min(Math.abs(n.x1 -
8024                                        a), Math.abs(n.x2 - a), Math.abs(n.y1 - f), Math.abs(n.y2 - f))
8025                                }), l = !0);
8026                                break;
8027                            case "line":
8028                            case "stepLine":
8029                            case "spline":
8030                            case "area":
8031                            case "stepArea":
8032                            case "stackedArea":
8033                            case "stackedArea100":
8034                            case "splineArea":
8035                            case "scatter":
8036                                var q = na("markerSize", d, this) || 4,
8037                                    s = b ? 20 : q,
8038                                    m = Math.sqrt(Math.pow(n.x1 - a, 2) + Math.pow(n.y1 - f, 2));
8039                                m <= s && c.push({
8040                                    dataPoint: d,
8041                                    dataPointIndex: g,
8042                                    dataSeries: this,
8043                                    distance: m
8044                                });
8045                                n = Math.abs(n.x1 - a);
8046                                n <= t ? t = n : 0 < h ? k++ : r++;
8047                                m <= q / 2 && (l = !0);
8048                                break;
8049                            case "rangeArea":
8050                            case "rangeSplineArea":
8051                                q = na("markerSize", d, this) ||
8052                                    4;
8053                                s = b ? 20 : q;
8054                                m = Math.min(Math.sqrt(Math.pow(n.x1 - a, 2) + Math.pow(n.y1 - f, 2)), Math.sqrt(Math.pow(n.x1 - a, 2) + Math.pow(n.y2 - f, 2)));
8055                                m <= s && c.push({
8056                                    dataPoint: d,
8057                                    dataPointIndex: g,
8058                                    dataSeries: this,
8059                                    distance: m
8060                                });
8061                                n = Math.abs(n.x1 - a);
8062                                n <= t ? t = n : 0 < h ? k++ : r++;
8063                                m <= q / 2 && (l = !0);
8064                                break;
8065                            case "bubble":
8066                                q = n.size;
8067                                m = Math.sqrt(Math.pow(n.x1 - a, 2) + Math.pow(n.y1 - f, 2));
8068                                m <= q / 2 && (c.push({
8069                                    dataPoint: d,
8070                                    dataPointIndex: g,
8071                                    dataSeries: this,
8072                                    distance: m
8073                                }), l = !0);
8074                                break;
8075                            case "pie":
8076                            case "doughnut":
8077                                q = n.center;
8078                                s = "doughnut" === this.type ? n.percentInnerRadius * n.radius :
8079                                    0;
8080                                m = Math.sqrt(Math.pow(q.x - a, 2) + Math.pow(q.y - f, 2));
8081                                m < n.radius && m > s && (m = Math.atan2(f - q.y, a - q.x), 0 > m && (m += 2 * Math.PI), m = Number(((180 * (m / Math.PI) % 360 + 360) % 360).toFixed(12)), q = Number(((180 * (n.startAngle / Math.PI) % 360 + 360) % 360).toFixed(12)), s = Number(((180 * (n.endAngle / Math.PI) % 360 + 360) % 360).toFixed(12)), 0 === s && 1 < n.endAngle && (s = 360), q >= s && 0 !== d.y && (s += 360, m < q && (m += 360)), m > q && m < s && (c.push({
8082                                    dataPoint: d,
8083                                    dataPointIndex: g,
8084                                    dataSeries: this,
8085                                    distance: 0
8086                                }), l = !0));
8087                                break;
8088                            case "funnel":
8089                            case "pyramid":
8090                                m = n.funnelSection;
8091                                f > m.y1 && f < m.y4 && (m.y6 ? f > m.y6 ? (g = m.x6 + (m.x5 - m.x6) / (m.y5 - m.y6) * (f - m.y6), m = m.x3 + (m.x4 - m.x3) / (m.y4 - m.y3) * (f - m.y3)) : (g = m.x1 + (m.x6 - m.x1) / (m.y6 - m.y1) * (f - m.y1), m = m.x2 + (m.x3 - m.x2) / (m.y3 - m.y2) * (f - m.y2)) : (g = m.x1 + (m.x4 - m.x1) / (m.y4 - m.y1) * (f - m.y1), m = m.x2 + (m.x3 - m.x2) / (m.y3 - m.y2) * (f - m.y2)), a > g && a < m && (c.push({
8092                                    dataPoint: d,
8093                                    dataPointIndex: n.dataPointIndex,
8094                                    dataSeries: this,
8095                                    distance: 0
8096                                }), l = !0));
8097                                break;
8098                            case "boxAndWhisker":
8099                                if (a >= n.x1 - n.borderThickness / 2 && a <= n.x2 + n.borderThickness / 2 && f >= n.y4 - n.borderThickness / 2 && f <= n.y1 + n.borderThickness /
8100                                    2 || Math.abs(n.x2 - a + n.x1 - a) < n.borderThickness && f >= n.y1 && f <= n.y4) c.push({
8101                                    dataPoint: d,
8102                                    dataPointIndex: g,
8103                                    dataSeries: this,
8104                                    distance: Math.min(Math.abs(n.x1 - a), Math.abs(n.x2 - a), Math.abs(n.y2 - f), Math.abs(n.y3 - f))
8105                                }), l = !0;
8106                                break;
8107                            case "candlestick":
8108                                if (a >= n.x1 - n.borderThickness / 2 && a <= n.x2 + n.borderThickness / 2 && f >= n.y2 - n.borderThickness / 2 && f <= n.y3 + n.borderThickness / 2 || Math.abs(n.x2 - a + n.x1 - a) < n.borderThickness && f >= n.y1 && f <= n.y4) c.push({
8109                                    dataPoint: d,
8110                                    dataPointIndex: g,
8111                                    dataSeries: this,
8112                                    distance: Math.min(Math.abs(n.x1 - a),
8113                                        Math.abs(n.x2 - a), Math.abs(n.y2 - f), Math.abs(n.y3 - f))
8114                                }), l = !0;
8115                                break;
8116                            case "ohlc":
8117                                if (Math.abs(n.x2 - a + n.x1 - a) < n.borderThickness && f >= n.y2 && f <= n.y3 || a >= n.x1 && a <= (n.x2 + n.x1) / 2 && f >= n.y1 - n.borderThickness / 2 && f <= n.y1 + n.borderThickness / 2 || a >= (n.x1 + n.x2) / 2 && a <= n.x2 && f >= n.y4 - n.borderThickness / 2 && f <= n.y4 + n.borderThickness / 2) c.push({
8118                                    dataPoint: d,
8119                                    dataPointIndex: g,
8120                                    dataSeries: this,
8121                                    distance: Math.min(Math.abs(n.x1 - a), Math.abs(n.x2 - a), Math.abs(n.y2 - f), Math.abs(n.y3 - f))
8122                                }), l = !0
8123                        }
8124                        if (l || 1E3 < k && 1E3 < r) break
8125                    }
8126                } else if (0 > p - e && p + e >=
8127                    this.dataPoints.length) break; - 1 === h ? (e++, h = 1) : h = -1
8128            }
8129            a = null;
8130            for (f = 0; f < c.length; f++) a ? c[f].distance <= a.distance && (a = c[f]) : a = c[f];
8131            return a
8132        };
8133        Q.prototype.getMarkerProperties = function(a, f, b, c) {
8134            var e = this.dataPoints;
8135            return {
8136                x: f,
8137                y: b,
8138                ctx: c,
8139                type: e[a].markerType ? e[a].markerType : this.markerType,
8140                size: e[a].markerSize ? e[a].markerSize : this.markerSize,
8141                color: e[a].markerColor ? e[a].markerColor : this.markerColor ? this.markerColor : e[a].color ? e[a].color : this.color ? this.color : this._colorSet[a % this._colorSet.length],
8142                borderColor: e[a].markerBorderColor ?
8143                    e[a].markerBorderColor : this.markerBorderColor ? this.markerBorderColor : null,
8144                borderThickness: e[a].markerBorderThickness ? e[a].markerBorderThickness : this.markerBorderThickness ? this.markerBorderThickness : null
8145            }
8146        };
8147        pa(C, X);
8148        C.prototype.createExtraLabelsForLog = function(a) {
8149            a = (a || 0) + 1;
8150            if (!(5 < a)) {
8151                var f = this.logLabelValues[0] || this.intervalStartPosition;
8152                if (Math.log(this.range) / Math.log(f / this.viewportMinimum) < this.noTicks - 1) {
8153                    for (var b = C.getNiceNumber((f - this.viewportMinimum) / Math.min(Math.max(2, this.noTicks - this.logLabelValues.length),
8154                            3), !0), c = Math.ceil(this.viewportMinimum / b) * b; c < f; c += b) c < this.viewportMinimum || this.logLabelValues.push(c);
8155                    this.logLabelValues.sort(Pa);
8156                    this.createExtraLabelsForLog(a)
8157                }
8158            }
8159        };
8160        C.prototype.createLabels = function() {
8161            var a, f, b = 0,
8162                c = 0,
8163                e, g = 0,
8164                h = 0,
8165                c = 0,
8166                c = this.interval,
8167                l = 0,
8168                t, k = 0.6 * this.chart.height,
8169                m;
8170            a = !1;
8171            var p = this.scaleBreaks ? this.scaleBreaks._appliedBreaks : [],
8172                n = p.length ? y(this.scaleBreaks.firstBreakIndex) ? 0 : this.scaleBreaks.firstBreakIndex : 0;
8173            if ("axisX" !== this.type || "dateTime" !== this.valueType || this.logarithmic) {
8174                e =
8175                    this.viewportMaximum;
8176                if (this.labels) {
8177                    a = Math.ceil(c);
8178                    for (var c = Math.ceil(this.intervalStartPosition), d = !1, b = c; b < this.viewportMaximum; b += a)
8179                        if (this.labels[b]) d = !0;
8180                        else {
8181                            d = !1;
8182                            break
8183                        }
8184                    d && (this.interval = a, this.intervalStartPosition = c)
8185                }
8186                if (this.logarithmic && !this.equidistantInterval)
8187                    for (this.logLabelValues || (this.logLabelValues = [], this.createExtraLabelsForLog()), c = 0, d = n; c < this.logLabelValues.length; c++)
8188                        if (b = this.logLabelValues[c], b < this.viewportMinimum) c++;
8189                        else {
8190                            for (; d < p.length && b > p[d].endValue; d++);
8191                            a = d < p.length &&
8192                                b >= p[d].startValue && b <= p[d].endValue;
8193                            m = b;
8194                            a || (a = this.labelFormatter ? this.labelFormatter({
8195                                chart: this.chart,
8196                                axis: this.options,
8197                                value: m,
8198                                label: this.labels[m] ? this.labels[m] : null
8199                            }) : "axisX" === this.type && this.labels[m] ? this.labels[m] : W(m, this.valueFormatString, this.chart._cultureInfo), a = new la(this.ctx, {
8200                                x: 0,
8201                                y: 0,
8202                                maxWidth: g,
8203                                maxHeight: h,
8204                                angle: this.labelAngle,
8205                                text: this.prefix + a + this.suffix,
8206                                backgroundColor: this.labelBackgroun
8206dColor,
8207                                borderColor: this.labelBorderColor,
8208                                borderThickness: this.labelBorderThickness,
8209                                cornerRadius: this.labelCornerRadius,
8210                                horizontalAlign: "left",
8211                                fontSize: this.labelFontSize,
8212                                fontFamily: this.labelFontFamily,
8213                                fontWeight: this.labelFontWeight,
8214                                fontColor: this.labelFontColor,
8215                                fontStyle: this.labelFontStyle,
8216                                textBaseline: "middle",
8217                                borderThickness: 0
8218                            }), this._labels.push({
8219                                position: m,
8220                                textBlock: a,
8221                                effectiveHeight: null
8222                            }))
8223                        }
8224                d = n;
8225                for (b = this.intervalStartPosition; b <= e; b = parseFloat((this.logarithmic && this.equidistantInterval ? b * Math.pow(this.logarithmBase, this.interval) : b + this.interval).toFixed(12))) {
8226                    for (; d < p.length && b > p[d].endValue; d++);
8227                    a = d < p.length &&
8228                        b >= p[d].startValue && b <= p[d].endValue;
8229                    m = b;
8230                    a || (a = this.labelFormatter ? this.labelFormatter({
8231                        chart: this.chart,
8232                        axis: this.options,
8233                        value: m,
8234                        label: this.labels[m] ? this.labels[m] : null
8235                    }) : "axisX" === this.type && this.labels[m] ? this.labels[m] : W(m, this.valueFormatString, this.chart._cultureInfo), a = new la(this.ctx, {
8236                        x: 0,
8237                        y: 0,
8238                        maxWidth: g,
8239                        maxHeight: h,
8240                        angle: this.labelAngle,
8241                        text: this.prefix + a + this.suffix,
8242                        horizontalAlign: "left",
8243                        backgroundColor: this.labelBackgroundColor,
8244                        borderColor: this.labelBorderColor,
8245                        borderThickness: this.labelBorderThickness,
8246                        cornerRadius: this.labelCornerRadius,
8247                        fontSize: this.labelFontSize,
8248                        fontFamily: this.labelFontFamily,
8249                        fontWeight: this.labelFontWeight,
8250                        fontColor: this.labelFontColor,
8251                        fontStyle: this.labelFontStyle,
8252                        textBaseline: "middle"
8253                    }), this._labels.push({
8254                        position: m,
8255                        textBlock: a,
8256                        effectiveHeight: null
8257                    }))
8258                }
8259            } else
8260                for (this.intervalStartPosition = this.getLabelStartPoint(new Date(this.viewportMinimum), this.intervalType, this.interval), e = Ta(new Date(this.viewportMaximum), this.interval, this.intervalType), d = n, b = this.intervalStartPosition; b <
8261                e; Ta(b, c, this.intervalType)) {
8262                    for (a = b.getTime(); d < p.length && a > p[d].endValue; d++);
8263                    m = a;
8264                    a = d < p.length && a >= p[d].startValue && a <= p[d].endValue;
8265                    a || (a = this.labelFormatter ? this.labelFormatter({
8266                        chart: this.chart,
8267                        axis: this.options,
8268                        value: new Date(m),
8269                        label: this.labels[m] ? this.labels[m] : null
8270                    }) : "axisX" === this.type && this.labels[m] ? this.labels[m] : Ba(m, this.valueFormatString, this.chart._cultureInfo), a = new la(this.ctx, {
8271                        x: 0,
8272                        y: 0,
8273                        maxWidth: g,
8274                        backgroundColor: this.labelBackgroundColor,
8275                        borderColor: this.labelBorderColor,
8276                        borderThickness: this.labelBorderThickness,
8277                        cornerRadius: this.labelCornerRadius,
8278                        maxHeight: h,
8279                        angle: this.labelAngle,
8280                        text: this.prefix + a + this.suffix,
8281                        horizontalAlign: "left",
8282                        fontSize: this.labelFontSize,
8283                        fontFamily: this.labelFontFamily,
8284                        fontWeight: this.labelFontWeight,
8285                        fontColor: this.labelFontColor,
8286                        fontStyle: this.labelFontStyle,
8287                        textBaseline: "middle"
8288                    }), this._labels.push({
8289                        position: m,
8290                        textBlock: a,
8291                        effectiveHeight: null,
8292                        breaksLabelType: void 0
8293                    }))
8294                }
8295            if ("bottom" === this._position || "top" === this._position) l = this.logarithmic && !this.equidistantInterval && 2 <= this._labels.length ?
8296                this.lineCoordinates.width * Math.log(Math.min(this._labels[this._labels.length - 1].position / this._labels[this._labels.length - 2].position, this._labels[1].position / this._labels[0].position)) / Math.log(this.range) : this.lineCoordinates.width / (this.logarithmic && this.equidistantInterval ? Math.log(this.range) / Math.log(this.logarithmBase) : Math.abs(this.range)) * U[this.intervalType + "Duration"] * this.interval, g = "undefined" === typeof this.options.labelMaxWidth ? 0.5 * this.chart.width >> 0 : this.options.labelMaxWidth, this.chart.panEnabled ||
8297            (h = "undefined" === typeof this.options.labelWrap || this.labelWrap ? 0.8 * this.chart.height >> 0 : 1.5 * this.labelFontSize);
8298            else if ("left" === this._position || "right" === this._position) l = this.logarithmic && !this.equidistantInterval && 2 <= this._labels.length ? this.lineCoordinates.height * Math.log(Math.min(this._labels[this._labels.length - 1].position / this._labels[this._labels.length - 2].position, this._labels[1].position / this._labels[0].position)) / Math.log(this.range) : this.lineCoordinates.height / (this.logarithmic && this.equidistantInterval ?
8299                    Math.log(this.range) / Math.log(this.logarithmBase) : Math.abs(this.range)) * U[this.intervalType + "Duration"] * this.interval, this.chart.panEnabled || (g = "undefined" === typeof this.options.labelMaxWidth ? 0.3 * this.chart.width >> 0 : this.options.labelMaxWidth), h = "undefined" === typeof this.options.labelWrap || this.labelWrap ? 0.3 * this.chart.height >> 0 : 1.5 * this.labelFontSize;
8300            for (c = 0; c < this._labels.length; c++) {
8301                a = this._labels[c].textBlock;
8302                a.maxWidth = g;
8303                a.maxHeight = h;
8304                var q = a.measureText();
8305                t = q.height
8306            }
8307            e = [];
8308            n = p = 0;
8309            if (this.labelAutoFit ||
8310                this.options.labelAutoFit)
8311                if (y(this.labelAngle) || (this.labelAngle = (this.labelAngle % 360 + 360) % 360, 90 < this.labelAngle && 270 > this.labelAngle ? this.labelAngle -= 180 : 270 <= this.labelAngle && 360 >= this.labelAngle && (this.labelAngle -= 360)), "bottom" === this._position || "top" === this._position)
8312                    if (g = 0.9 * l >> 0, n = 0, !this.chart.panEnabled && 1 <= this._labels.length) {
8313                        this.sessionVariables.labelFontSize = this.labelFontSize;
8314                        this.sessionVariables.labelMaxWidth = g;
8315                        this.sessionVariables.labelMaxHeight = h;
8316                        this.sessionVariables.labelAngle =
8317                            this.labelAngle;
8318                        this.sessionVariables.labelWrap = this.labelWrap;
8319                        for (b = 0; b < this._labels.length; b++)
8320                            if (!this._labels[b].breaksLabelType) {
8321                                a = this._labels[b].textBlock;
8322                                for (var s, d = a.text.split(" "), c = 0; c < d.length; c++) m = d[c], this.ctx.font = a.fontStyle + " " + a.fontWeight + " " + a.fontSize + "px " + a.fontFamily, m = this.ctx.measureText(m), m.width > n && (s = b, n = m.width)
8323                            }
8324                        b = 0;
8325                        for (b = this.intervalStartPosition < this.viewportMinimum ? 1 : 0; b < this._labels.length; b++)
8326                            if (!this._labels[b].breaksLabelType) {
8327                                a = this._labels[b].textBlock;
8328                                q = a.measureText();
8329                                for (d = b + 1; d < this._labels.length; d++)
8330                                    if (!this._labels[d].breaksLabelType) {
8331                                        f = this._labels[d].textBlock;
8332                                        f = f.measureText();
8333                                        break
8334                                    }
8335                                e.push(a.height);
8336                                this.sessionVariables.labelMaxHeight = Math.max.apply(Math, e);
8337                                Math.cos(Math.PI / 180 * Math.abs(this.labelAngle));
8338                                Math.sin(Math.PI / 180 * Math.abs(this.labelAngle));
8339                                c = g * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + (h - a.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle));
8340                                if (y(this.options.labelAngle) && isNaN(this.options.labelAngle) && 0 !== this.options.labelAngle)
8341                                    if (this.sessionVariables.labelMaxHeight =
8342                                            0 === this.labelAngle ? h : Math.min((c - g * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), c
8342), m = (k - (t + a.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(-25))) / Math.sin(Math.PI / 180 * Math.abs(-25)), !y(this.options.labelWrap)) this.labelWrap ? y(this.options.labelMaxWidth) ? (this.sessionVariables.labelMaxWidth = Math.min(Math.max(g, n), m), this.sessionVariables.labelWrap = this.labelWrap, q.width + f.width >> 0 > 2 * g && (this.sessionVariables.labelAngle = -25)) : (this.sessionVariables.labelWrap =
8343                                        this.labelWrap, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth, this.sessionVariables.labelAngle = this.sessionVariables.labelMaxWidth > g ? -25 : this.sessionVariables.labelAngle) : y(this.options.labelMaxWidth) ? (this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxHeight = h, this.sessionVariables.labelMaxWidth = g, q.width + f.width >> 0 > 2 * g && (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = m)) : (this.sessionVariables.labelAngle = this.sessionVariables.labelMaxWidth >
8344                                    g ? -25 : this.sessionVariables.labelAngle, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth, this.sessionVariables.labelMaxHeight = h, this.sessionVariables.labelWrap = this.labelWrap);
8345                                    else {
8346                                        if (y(this.options.labelWrap))
8347                                            if (!y(this.options.labelMaxWidth)) this.options.labelMaxWidth < g ? (this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth, this.sessionVariables.labelMaxHeight = c) : (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth, this.sessionVariables.labelMaxHeight =
8348                                                h);
8349                                            else if (!y(f))
8350                                                if (c = q.width + f.width >> 0, d = this.labelFontSize, n < g) c - 2 * g > p && (p = c - 2 * g, c >= 2 * g && c < 2.2 * g ? (this.sessionVariables.labelMaxWidth = g, y(this.options.labelFontSize) && 12 < d && (d = Math.floor(12 / 13 * d), a.measureText()), this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? d : this.options.labelFontSize, this.sessionVariables.labelAngle = this.labelAngle) : c >= 2.2 * g && c < 2.8 * g ? (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = m, this.sessionVariables.labelFontSize = d) : c >= 2.8 *
8351                                                g && c < 3.2 * g ? (this.sessionVariables.labelMaxWidth = Math.max(g, n), this.sessionVariables.labelWrap = !0, y(this.options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? d : this.options.labelFontSize, this.sessionVariables.labelAngle = this.labelAngle) : c >= 3.2 * g && c < 3.6 * g ? (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelWrap = !0, this.sessionVariables.labelMaxWidth = m, this.sessionVariables.labelFontSize =
8352                                                    this.labelFontSize) : c > 3.6 * g && c < 5 * g ? (y(this.options.labelFontSize) && 12 < d && (d = Math.floor(12 / 13 * d), a.measureText()), this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? d : this.options.labelFontSize, this.sessionVariables.labelWrap = !0, this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = m) : c > 5 * g && (this.sessionVariables.labelWrap = !0, this.sessionVariables.labelMaxWidth = g, this.sessionVariables.labelFontSize = d, this.sessionVariables.labelMaxHeight = h, this.sessionVariables.labelAngle =
8353                                                        this.labelAngle));
8354                                                else if (s === b && (0 === s && n + this._labels[s + 1].textBlock.measureText().width - 2 * g > p || s === this._labels.length - 1 && n + this._labels[s - 1].textBlock.measureText().width - 2 * g > p || 0 < s && s < this._labels.length - 1 && n + this._labels[s + 1].textBlock.measureText().width - 2 * g > p && n + this._labels[s - 1].textBlock.measureText().width - 2 * g > p)) p = 0 === s ? n + this._labels[s + 1].textBlock.measureText().width - 2 * g : n + this._labels[s - 1].textBlock.measureText().width - 2 * g, this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ?
8355                                                    d : this.options.labelFontSize, this.sessionVariables.labelWrap = !0, this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = m;
8356                                                else if (0 === p)
8357                                                    for (this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? d : this.options.labelFontSize, this.sessionVariables.labelWrap = !0, c = 0; c < this._labels.length; c++) a = this._labels[c].textBlock, a.maxWidth = this.sessionVariables.labelMaxWidth = Math.min(Math.max(g, n), m), q = a.measureText(), c < this._labels.length - 1 && (d = c + 1, f = this._labels[d].textBlock, f.maxWidth =
8358                                                        this.sessionVariables.labelMaxWidth = Math.min(Math.max(g, n), m), f = f.measureText(), q.width + f.width >> 0 > 2 * g && (this.sessionVariables.labelAngle = -25))
8359                                    }
8360                                else(this.sessionVariables.labelAngle = this.labelAngle, this.sessionVariables.labelMaxHeight = 0 === this.labelAngle ? h : Math.min((c - g * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), c
8360), m = 0 != this.labelAngle ? (k - (t + a.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) :
8361                                    g, this.sessionVariables.labelMaxHeight = h = this.labelWrap ? (k - m * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)) : 1.5 * this.labelFontSize, y(this.options.labelWrap)) ? y(this.options.labelWrap) && (this.labelWrap && !y(this.options.labelMaxWidth) ? (this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : m, this.sessionVariables.labelMaxHeight = h) : (this.sessionVariables.labelAngle = this.labelAngle,
8362                                        this.sessionVariables.labelMaxWidth = m, this.sessionVariables.labelMaxHeight = c < 0.9 * l ? 0.9 * l : c, this.sessionVariables.labelWrap = this.labelWrap)) : (this.options.labelWrap ? (this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : m) : (y(this.options.labelMaxWidth), this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : m, this.sessionVariables.labelWrap = this.labelWrap), this.sessionVariables.labelMaxHeight =
8363                                    h)
8364                            }
8365                        for (c = 0; c < this._labels.length; c++) a = this._labels[c].textBlock, a.maxWidth = this.labelMaxWidth = this.sessionVariables.labelMaxWidth, a.fontSize = this.sessionVariables.labelFontSize, a.angle = this.labelAngle = this.sessionVariables.labelAngle, a.wrap = this.labelWrap = this.sessionVariables.labelWrap, a.maxHeight = this.sessionVariables.labelMaxHeight, a.measureText()
8366                    } else
8367                        for (b = 0; b < this._labels.length; b++) a = this._labels[b].textBlock, a.maxWidth = this.labelMaxWidth = y(this.options.labelMaxWidth) ? this.sessionVariables.labelMaxWidth :
8368                            this.options.labelMaxWidth, a.fontSize = this.labelFontSize = y(this.options.labelFontSize) ? this.sessionVariables.labelFontSize : this.options.labelFontSize, a.angle = this.labelAngle = y(this.options.labelAngle) ? this.sessionVariables.labelAngle : this.labelAngle, a.wrap = this.labelWrap = y(this.options.labelWrap) ? this.sessionVariables.labelWrap : this.options.labelWrap, a.maxHeight = this.sessionVariables.labelMaxHeight, a.measureText();
8369                else if ("left" === this._position || "right" === this._position)
8370                    if (g = y(this.options.labelMaxWidth) ?
8371                            0.3 * this.chart.width >> 0 : this.options.labelMaxWidth, h = "undefined" === typeof this.options.labelWrap || this.labelWrap ? 0.3 * this.chart.height >> 0 : 1.5 * this.labelFontSize, !this.chart.panEnabled && 1 <= this._labels.length) {
8372                        this.sessionVariables.labelFontSize = this.labelFontSize;
8373                        this.sessionVariables.labelMaxWidth = g;
8374                        this.sessionVariables.labelMaxHeight = h;
8375                        this.sessionVariables.labelAngle = y(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle;
8376                        this.sessionVariables.labelWrap = this.labelWrap;
8377                        for (b = 0; b <
8378                        this._labels.length; b++)
8379                            if (!this._labels[b].breaksLabelType) {
8380                                a = this._labels[b].textBlock;
8381                                q = a.measureText();
8382                                for (d = b + 1; d < this._labels.length; d++)
8383                                    if (!this._labels[d].breaksLabelType) {
8384                                        f = this._labels[d].textBlock;
8385                                        f = f.measureText();
8386                                        break
8387                                    }
8388                                e.push(a.height);
8389                                this.sessionVariables.labelMaxHeight = Math.max.apply(Math, e);
8390                                c = g * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + (h - a.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle));
8391                                Math.cos(Math.PI / 180 * Math.abs(this.labelAngle));
8392                                Math.sin(Math.PI / 180 * Math.abs(this.labelAngle));
8393                                y(this.options.labelAngle) && isNaN(this.options.labelAngle) && 0 !== this.options.labelAngle ? y(this.options.labelWrap) ? y(this.options.labelWrap) && (y(this.options.labelMaxWidth) ? y(f) || (l = q.height + f.height >> 0, l - 2 * h > n && (n = l - 2 * h, l >= 2 * h && l < 2.4 * h ? (y(this.options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelMaxHeight = h, this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? this.labelFontSize : this.options.labelFontSize) :
8394                                            l >= 2.4 * h && l < 2.8 * h ? (this.sessionVariables.labelMaxHeight = c, this.sessionVariables.labelFontSize = this.labelFontSize, this.sessionVariables.labelWrap = !0) : l >= 2.8 * h && l < 3.2 * h ? (this.sessionVariables.labelMaxHeight = h, this.sessionVariables.labelWrap = !0, y(this.options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? this.labelFontSize : this.options.labelFontSize, this.sessionVariables.labelAngle =
8395                                                y(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle) : l >= 3.2 * h && l < 3.6 * h ? (this.sessionVariables.labelMaxHeight = c, this.sessionVariables.labelWrap = !0, this.sessionVariables.labelFontSize = this.labelFontSize) : l > 3.6 * h && l < 10 * h ? (y(this.options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? this.labelFontSize : this.options.labelFontSize, this.sessionVariables.labelMaxWidth =
8396                                                g, this.sessionVariables.labelMaxHeight = h, this.sessionVariables.labelAngle = y(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle) : l > 10 * h && l < 50 * h && (y(this.options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? this.labelFontSize : this.options.labelFontSize, this.sessionVariables.labelMaxHeight = h, this.sessionVariables.labelMaxWidth = g, this.sessionVariables.labelAngle =
8397                                                    y(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle))) : (this.sessionVariables.labelMaxHeight = h, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : this.sessionVariables.labelMaxWidth)) : (this.sessionVariables.labelMaxWidth = this.labelWrap ? this.options.labelMaxWidth ? this.options.labelMaxWidth : this.sessionVariables.labelMaxWidth : this.labelMaxWidth ? this.options.labelMaxWidth ? this.options.labelMaxWidth : this.sessionVariables.labelMaxWidth : g, this.sessionVariables.labelMaxHeight =
8398                                    h) : (this.sessionVariables.labelAngle = this.labelAngle, this.sessionVariables.labelMaxWidth = 0 === this.labelAngle ? g : Math.min((c - h * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)), h), y(this.options.labelWrap)) ? y(this.options.labelWrap) && (this.labelWrap && !y(this.options.labelMaxWidth) ? (this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth > this.options.labelMaxWidth : this.sessionVariables.labelMaxWidth, this.sessionVariables.labelWrap =
8399                                        this.labelWrap, this.sessionVariables.labelMaxHeight = c) : (this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : g, this.sessionVariables.labelMaxHeight = 0 === this.labelAngle ? h : c, y(this.options.labelMaxWidth) && (this.sessionVariables.labelAngle = this.labelAngle))) : this.options.labelWrap ? (this.sessionVariables.labelMaxHeight = 0 === this.labelAngle ? h : c, this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxWidth = g) : (this.sessionVariables.labelMaxHeight =
8400                                    h, y(this.options.labelMaxWidth), this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : this.sessionVariables.labelMaxWidth, this.sessionVariables.labelWrap = this.labelWrap)
8401                            }
8402                        for (c = 0; c < this._labels.length; c++) a = this._labels[c].textBlock, a.maxWidth = this.labelMaxWidth = this.sessionVariables.labelMaxWidth, a.fontSize = this.labelFontSize = this.sessionVariables.labelFontSize, a.angle = this.labelAngle = this.sessionVariables.labelAngle, a.wrap = this.labelWrap = this.sessionVariables.labelWrap,
8403                            a.maxHeight = this.sessionVariables.labelMaxHeight, a.measureText()
8404                    } else
8405                        for (b = 0; b < this._labels.length; b++) a = this._labels[b].textBlock, a.maxWidth = this.labelMaxWidth = y(this.options.labelMaxWidth) ? this.sessionVariables.labelMaxWidth : this.options.labelMaxWidth, a.fontSize = this.labelFontSize = y(this.options.labelFontSize) ? this.sessionVariables.labelFontSize : this.options.labelFontSize, a.angle = this.labelAngle = y(this.options.labelAngle) ? this.sessionVariables.labelAngle : this.labelAngle, a.wrap = this.labelWrap = y(this.options.labelWrap) ?
8406                            this.sessionVariables.labelWrap : this.options.labelWrap, a.maxHeight = this.sessionVariables.labelMaxHeight, a.measureText();
8407            for (b = 0; b < this.stripLines.length; b++) {
8408                var g = this.stripLines[b],
8409                    x;
8410                if ("outside" === g.labelPlacement) {
8411                    h = this.sessionVariables.labelMaxWidth;
8412                    if ("bottom" === this._position || "top" === this._position) x = y(g.o
8412ptions.labelWrap) ? this.sessionVariables.labelMaxHeight : g.labelWrap ? 0.8 * this.chart.height >> 0 : 1.5 * this.labelFontSize;
8413                    if ("left" === this._position || "right" === this._position) x = y(g.options.labelWrap) ?
8414                        this.sessionVariables.labelMaxHeight : g.labelWrap ? 0.8 * this.chart.width >> 0 : 1.5 * this.labelFontSize;
8415                    y(g.labelBackgroundColor) && (g.labelBackgroundColor = "#EEEEEE")
8416                } else h = "bottom" === this._position || "top" === this._position ? 0.9 * this.chart.width >> 0 : 0.9 * this.chart.height >> 0, x = y(g.options.labelWrap) || g.labelWrap ? "bottom" === this._position || "top" === this._position ? 0.8 * this.chart.width >> 0 : 0.8 * this.chart.height >> 0 : 1.5 * this.labelFontSize, y(g.labelBackgroundColor) && (y(g.startValue) && 0 !== g.startValue ? g.labelBackgroundColor =
8417                    v ? "transparent" : null : g.labelBackgroundColor = "#EEEEEE");
8418                a = new la(this.ctx, {
8419                    x: 0,
8420                    y: 0,
8421                    backgroundColor: g.labelBackgroundColor,
8422                    borderColor: g.labelBorderColor,
8423                    borderThickness: g.labelBorderThickness,
8424                    cornerRadius: g.labelCornerRadius,
8425                    maxWidth: g.options.labelMaxWidth ? g.options.labelMaxWidth : h,
8426                    maxHeight: x,
8427                    angle: this.labelAngle,
8428                    text: g.labelFormatter ? g.labelFormatter({
8429                        chart: this.chart,
8430                        axis: this,
8431                        stripLine: g
8432                    }) : g.label,
8433                    horizontalAlign: "left",
8434                    fontSize: "outside" === g.labelPlacement ? g.options.labelFontSize ? g.labelFontSize :
8435                        this.labelFontSize : g.labelFontSize,
8436                    fontFamily: "outside" === g.labelPlacement ? g.options.labelFontFamily ? g.labelFontFamily : this.labelFontFamily : g.labelFontFamily,
8437                    fontWeight: "outside" === g.labelPlacement ? g.options.labelFontWeight ? g.labelFontWeight : this.labelFontWeight : g.labelFontWeight,
8438                    fontColor: g.labelFontColor || g.color,
8439                    fontStyle: "outside" === g.labelPlacement ? g.options.labelFontStyle ? g.labelFontStyle : this.fontWeight : g.labelFontStyle,
8440                    textBaseline: "middle"
8441                });
8442                this._stripLineLabels.push({
8443                    position: g.value,
8444                    textBlock: a,
8445                    effectiveHeight: null,
8446                    stripLine: g
8447                })
8448            }
8449        };
8450        C.prototype.createLabelsAndCalculateWidth = function() {
8451            var a = 0,
8452                f = 0;
8453            this._labels = [];
8454            this._stripLineLabels = [];
8455            if ("left" === this._position || "right" === this._position) {
8456                this.createLabels();
8457                for (f = 0; f < this._labels.length; f++) {
8458                    var b = this._labels[f].textBlock,
8459                        c = b.measureText(),
8460                        e = 0,
8461                        e = 0 === this.labelAngle ? c.width : c.width * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)) + (c.height - b.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle));
8462                    a < e && (a = e);
8463                    this._labels[f].effectiveWidth =
8464                        e
8465                }
8466                for (f = 0; f < this._stripLineLabels.length; f++) "outside" === this._stripLineLabels[f].stripLine.labelPlacement && (this._stripLineLabels[f].stripLine.value > this.viewportMinimum && this._stripLineLabels[f].stripLine.value < this.viewportMaximum) && (b = this._stripLineLabels[f].textBlock, c = b.measureText(), e = 0 === this.labelAngle ? c.width : c.width * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)) + (c.height - b.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), a < e && (a = e), this._stripLineLabels[f].effectiveWidth =
8467                    e)
8468            }
8469            f = this.title ? this._titleTextBlock.measureText().height + 2 : 0;
8470            return b = "inside" === this.labelPlacement ? b = f + 5 : f + a + this.tickLength + 5
8471        };
8472        C.prototype.createLabelsAndCalculateHeight = function() {
8473            var a = 0;
8474            this._labels = [];
8475            this._stripLineLabels = [];
8476            var f, b = 0;
8477            this.createLabels();
8478            if ("bottom" === this._position || "top" === this._position) {
8479                for (b = 0; b < this._labels.length; b++) {
8480                    f = this._labels[b].textBlock;
8481                    var c = f.measureText(),
8482                        e = 0,
8483                        e = 0 === this.labelAngle ? c.height : c.width * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + (c.height -
8484                            f.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle));
8485                    a < e && (a = e);
8486                    this._labels[b].effectiveHeight = e
8487                }
8488                for (b = 0; b < this._stripLineLabels.length; b++) "outside" === this._stripLineLabels[b].stripLine.labelPlacement && (f = this._stripLineLabels[b].textBlock, c = f.measureText(), e = 0 === this.labelAngle ? c.height : c.width * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + (c.height - f.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)), a < e && (a = e), this._stripLineLabels[b].effectiveHeight = e)
8489            }
8490            f = this.title ? this._titleTextBlock.measureText().height +
8491                2 : 0;
8492            return b = "inside" === this.labelPlacement ? b = f + 5 : f + a + this.tickLength + 5
8493        };
8494        C.setLayoutAndRender = function(a, f, b, c, e, g) {
8495            var h, l, t, k, m = a[0] ? a[0].chart : f[0].chart,
8496                p = m.ctx,
8497                n = m._axes;
8498            if (a && 0 < a.length)
8499                for (var d = 0; d < a.length; d++) a[d] && a[d].calculateAxisParameters();
8500            if (f && 0 < f.length)
8501                for (d = 0; d < f.length; d++) f[d].calculateAxisParameters();
8502            if (b && 0 < b.length)
8503                for (d = 0; d < b.length; d++) b[d].calculateAxisParameters();
8504            if (c && 0 < c.length)
8505                for (d = 0; d < c.length; d++) c[d].calculateAxisParameters();
8506            for (d = 0; d < n.length; d++)
8507                if (n[d] &&
8508                    n[d].scaleBreaks && n[d].scaleBreaks._appliedBreaks.length)
8509                    for (var q = n[d].scaleBreaks._appliedBreaks, s = 0; s < q.length && !(q[s].startValue > n[d].viewportMaximum); s++) q[s].endValue < n[d].viewportMinimum || (y(n[d].scaleBreaks.firstBreakIndex) && (n[d].scaleBreaks.firstBreakIndex = s), q[s].startValue >= n[d].viewPortMinimum && (n[d].scaleBreaks.lastBreakIndex = s));
8510            for (var x = s = 0, u = 0, z = 0, C = 0, G = 0, B = 0, A, H, L = l = 0, J, I, N, q = J = I = N = !1, d = 0; d < n.length; d++) n[d] && n[d].title && (n[d]._titleTextBlock = new la(n[d].ctx, {
8511                text: n[d].title,
8512                horizontalAlign: "center",
8513                fontSize: n[d].titleFontSize,
8514                fontFamily: n[d].titleFontFamily,
8515                fontWeight: n[d].titleFontWeight,
8516                fontColor: n[d].titleFontColor,
8517                fontStyle: n[d].titleFontStyle,
8518                borderColor: n[d].titleBorderColor,
8519                borderThickness: n[d].titleBorderThickness,
8520                backgroundColor: n[d].titleBackgroundColor,
8521                cornerRadius: n[d].titleCornerRadius,
8522                textBaseline: "top"
8523            }));
8524            for (d = 0; d < n.length; d++)
8525                if (n[d].title) switch (n[d]._position) {
8526                    case "left":
8527                        n[d]._titleTextBlock.maxWidth = n[d].titleMaxWidth || g.height;
8528                        n[d]._titleTextBlock.maxHeight = n[d].titleWrap ?
8529                            0.8 * g.width : 1.5 * n[d].titleFontSize;
8530                        n[d]._titleTextBlock.angle = -90;
8531                        break;
8532                    case "right":
8533                        n[d]._titleTextBlock.maxWidth = n[d].titleMaxWidth || g.height;
8534                        n[d]._titleTextBlock.maxHeight = n[d].titleWrap ? 0.8 * g.width : 1.5 * n[d].titleFontSize;
8535                        n[d]._titleTextBlock.angle = 90;
8536                        break;
8537                    default:
8538                        n[d]._titleTextBlock.maxWidth = n[d].titleMaxWidth || g.width, n[d]._titleTextBlock.maxHeight = n[d].titleWrap ? 0.8 * g.height : 1.5 * n[d].titleFontSize, n[d]._titleTextBlock.angle = 0
8539                }
8540            if ("normal" === e) {
8541                for (var z = [], C = [], G = [], B = [], O = [], P = [], R = [], Q = []; 4 >
8542                s;) {
8543                    var E = 0,
8544                        T = 0,
8545                        U = 0,
8546                        X = 0,
8547                        V = e = 0,
8548                        K = 0,
8549                        Z = 0,
8550                        Y = 0,
8551                        W = 0,
8552                        M = 0,
8553                        aa = 0;
8554                    if (b && 0 < b.length)
8555                        for (G = [], d = M = 0; d < b.length; d++) G.push(Math.ceil(b[d] ? b[d].createLabelsAndCalculateWidth() : 0)), M += G[d], K += b[d] ? b[d].margin : 0;
8556                    else G.push(Math.ceil(b[0] ? b[0].createLabelsAndCalculateWidth() : 0));
8557                    R.push(G);
8558                    if (c && 0 < c.length)
8559                        for (B = [], d = aa = 0; d < c.length; d++) B.push(Math.ceil(c[d] ? c[d].createLabelsAndCalculateWidth() : 0)), aa += B[d], Z += c[d] ? c[d].margin : 0;
8560                    else B.push(Math.ceil(c[0] ? c[0].createLabelsAndCalculateWidth() : 0));
8561                    Q.push(B);
8562                    h = Math.round(g.x1 +
8563                        M + K);
8564                    t = Math.round(g.x2 - aa - Z > m.width - 10 ? m.width - 10 : g.x2 - aa - Z);
8565                    if (a && 0 < a.length)
8566                        for (z = [], d = Y = 0; d < a.length; d++) a[d] && (a[d].lineCoordinates = {}), a[d].lineCoordinates.width = Math.abs(t - h), a[d].title && (a[d]._titleTextBlock.maxWidth = 0 < a[d].titleMaxWidth && a[d].titleMaxWidth < a[d].lineCoordinates.width ? a[d].titleMaxWidth : a[d].lineCoordinates.width), z.push(Math.ceil(a[d] ? a[d].createLabelsAndCalculateHeight() : 0)), Y += z[d], e += a[d] ? a[d].margin : 0;
8567                    else z.push(Math.ceil(a[0] ? a[0].createLabelsAndCalculateHeight() : 0));
8568                    O.push(z);
8569                    if (f && 0 < f.length)
8570                        for (C = [], d = W = 0; d < f.length; d++) f[d] && (f[d].lineCoordinates = {}), f[d].lineCoordinates.width = Math.abs(t - h), f[d].title && (f[d]._titleTextBlock.maxWidth = 0 < f[d].titleMaxWidth && f[d].titleMaxWidth < f[d].lineCoordinates.width ? f[d].titleMaxWidth : f[d].lineCoordinates.width), C.push(Math.ceil(f[d] ? f[d].createLabelsAndCalculateHeight() : 0)), W += C[d], V += f[d] ? f[d].margin : 0;
8571                    else C.push(Math.ceil(f[0] ? f[0].createLabelsAndCalculateHeight() : 0));
8572                    P.push(C);
8573                    if (a && 0 < a.length)
8574                        for (d = 0; d < a.length; d++) a[d] &&
8575                        (a[d].lineCoordinates.x1 = h, t = Math.round(g.x2 - aa - Z > m.width - 10 ? m.width - 10 : g.x2 - aa - Z), a[d]._labels && 1 < a[d]._labels.length && (l = k = 0, k = a[d]._labels[1], l = "dateTime" === a[d].valueType ? a[d]._labels[a[d]._labels.length - 2] : a[d]._labels[a[d]._labels.length - 1], x = k.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(k.textBlock.angle)) + (k.textBlock.height - l.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(k.textBlock.angle)), u = l.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(l.textBlock.angle)) + (l.textBlock.height -
8576                            l.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(l.textBlock.angle))), a[d] && (a[d].labelAutoFit && !y(A) && !y(H)) && (l = 0, 0 < a[d].labelAngle ? H + u > t && (l += 0 < a[d].labelAngle ? H + u - t - aa : 0) : 0 > a[d].labelAngle ? A - x < h && A - x < a[d].viewportMinimum && (L = h - (K + a[d].tickLength + G + A - x + a[d].labelFontSize / 2)) : 0 === a[d].labelAngle && (H + u > t && (l = H + u / 2 - t - aa), A - x < h && A - x < a[d].viewportMinimum && (L = h - K - a[d].tickLength - G - A + x / 2)), a[d].viewportMaximum === a[d].maximum && a[d].viewportMinimum === a[d].minimum && 0 < a[d].labelAngle && 0 < l ? t -= l : a[d].viewportMaximum ===
8577                        a[d].maximum && a[d].viewportMinimum === a[d].minimum && 0 > a[d].labelAngle && 0 < L ? h += L : a[d].viewportMaximum === a[d].maximum && a[d].viewportMinimum === a[d].minimum && 0 === a[d].labelAngle && (0 < L && (h += L), 0 < l && (t -= l))), m.panEnabled ? Y = m.sessionVariables.axisX.height : m.sessionVariables.axisX.height = Y, l = Math.round(g.y2 - Y - e + E), k = Math.round(g.y2), a[d].lineCoordinates.x2 = t, a[d].lineCoordinates.width = t - h, a[d].lineCoordinates.y1 = l, a[d].lineCoordinates.y2 = l, a[d].bounds = {
8578                            x1: h,
8579                            y1: l,
8580                            x2: t,
8581                            y2: k - (Y + e - z[d] - E),
8582                            width: t - h,
8583                            height: k - l
8584                        }),
8585                            E += z[d] + a[d].margin;
8586                    if (f && 0 < f.length)
8587                        for (d = 0; d < f.length; d++) f[d].lineCoordinates.x1 = Math.round(g.x1 + M + K), f[d].lineCoordinates.x2 = Math.round(g.x2 - aa - Z > m.width - 10 ? m.width - 10 : g.x2 - aa - Z), f[d].lineCoordinates.width = Math.abs(t - h), f[d]._labels && 1 < f[d]._labels.length && (k = f[d]._labels[1], l = "dateTime" === f[d].valueType ? f[d]._labels[f[d]._labels.length - 2] : f[d]._labels[f[d]._labels.length - 1], x = k.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(k.textBlock.angle)) + (k.textBlock.height - l.textBlock.fontSize / 2) * Math.sin(Math.PI /
8588                                180 * Math.abs(k.textBlock.angle)), u = l.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(l.textBlock.angle)) + (l.textBlock.height - l.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(l.textBlock.angle))), m.panEnabled ? W = m.
8588sessionVariables.axisX2.height : m.sessionVariables.axisX2.height = W, l = Math.round(g.y1), k = Math.round(g.y2 + f[d].margin), f[d].lineCoordinates.y1 = l + W + V - T, f[d].lineCoordinates.y2 = l, f[d].bounds = {
8589                            x1: h,
8590                            y1: l + (W + V - C[d] - T),
8591                            x2: t,
8592                            y2: k,
8593                            width: t - h,
8594                            height: k - l
8595                        }, T += C[d] + f[d].margin;
8596                    if (b && 0 < b.length)
8597                        for (d = 0; d <
8598                        b.length; d++) K = 10, b[d] && (h = Math.round(a[0] ? a[0].lineCoordinates.x1 : f[0].lineCoordinates.x1), K = b[d]._labels && 0 < b[d]._labels.length ? b[d]._labels[b[d]._labels.length - 1].textBlock.height / 2 : 10, l = Math.round(g.y1 + W + V < Math.max(K, 10) ? Math.max(K, 10) : g.y1 + W + V), t = Math.round(a[0] ? a[0].lineCoordinates.x1 : f[0].lineCoordinates.x1), K = 0 < a.length ? 0 : b[d]._labels && 0 < b[d]._labels.length ? b[d]._labels[0].textBlock.height / 2 : 10, k = Math.round(g.y2 - Y - e - K), b[d].lineCoordinates = {
8599                            x1: t - U,
8600                            y1: l,
8601                            x2: t - U,
8602                            y2: k,
8603                            height: Math.abs(k - l)
8604                        }, b[d].bounds = {
8605                            x1: h - (G[d] + U),
8606                            y1: l,
8607                            x2: t,
8608                            y2: k,
8609                            width: t - h,
8610                            height: k - l
8611                        }, b[d].title && (b[d]._titleTextBlock.maxWidth = 0 < b[d].titleMaxWidth && b[d].titleMaxWidth < b[d].lineCoordinates.height ? b[d].titleMaxWidth : b[d].lineCoordinates.height), U += G[d] + b[d].margin);
8612                    if (c && 0 < c.length)
8613                        for (d = 0; d < c.length; d++) c[d] && (h = Math.round(a[0] ? a[0].lineCoordinates.x2 : f[0].lineCoordinates.x2), t = Math.round(h), K = c[d]._labels && 0 < c[d]._labels.length ? c[d]._labels[c[d]._labels.length - 1].textBlock.height / 2 : 0, l = Math.round(g.y1 + W + V < Math.max(K, 10) ? Math.max(K,
8614                            10) : g.y1 + W + V), K = 0 < a.length ? 0 : c[d]._labels && 0 < c[d]._labels.length ? c[d]._labels[0].textBlock.height / 2 : 0, k = Math.round(g.y2 - (Y + e + K)), c[d].lineCoordinates = {
8615                            x1: h + X,
8616                            y1: l,
8617                            x2: h + X,
8618                            y2: k,
8619                            height: Math.abs(k - l)
8620                        }, c[d].bounds = {
8621                            x1: h,
8622                            y1: l,
8623                            x2: t + (B[d] + X),
8624                            y2: k,
8625                            width: t - h,
8626                            height: k - l
8627                        }, c[d].title && (c[d]._titleTextBlock.maxWidth = 0 < c[d].titleMaxWidth && c[d].titleMaxWidth < c[d].lineCoordinates.height ? c[d].titleMaxWidth : c[d].lineCoordinates.height), X += B[d] + c[d].margin);
8628                    if (a && 0 < a.length)
8629                        for (d = 0; d < a.length; d++) a[d] && (a[d].calculateValueToPixelConversionParameters(),
8630                            a[d].calculateBreaksSizeInValues(), a[d]._labels && 1 < a[d]._labels.length && (A = (a[d].logarithmic ? Math.log(a[d]._labels[1].position / a[d].viewportMinimum) / a[d].conversionParameters.lnLogarithmBase : a[d]._labels[1].position - a[d].viewportMinimum) * Math.abs(a[d].conversionParameters.pixelPerUnit) + a[d].lineCoordinates.x1, h = a[d]._labels[a[d]._labels.length - ("dateTime" === a[d].valueType ? 2 : 1)].position, h = a[d].getApparentDifference(a[d].viewportMinimum, h), H = a[d].logarithmic ? (1 < h ? Math.log(h) / a[d].conversionParameters.lnLogarithmBase *
8631                                Math.abs(a[d].conversionParameters.pixelPerUnit) : 0) + a[d].lineCoordinates.x1 : (0 < h ? h * Math.abs(a[d].conversionParameters.pixelPerUnit) : 0) + a[d].lineCoordinates.x1));
8632                    if (f && 0 < f.length)
8633                        for (d = 0; d < f.length;
8633 d++) f[d].calculateValueToPixelConversionParameters(), f[d].calculateBreaksSizeInValues(), f[d]._labels && 1 < f[d]._labels.length && (A = (f[d].logarithmic ? Math.log(f[d]._labels[1].position / f[d].viewportMinimum) / f[d].conversionParameters.lnLogarithmBase : f[d]._labels[1].position - f[d].viewportMinimum) * Math.abs(f[d].conversionParameters.pixelPerUnit) +
8634                            f[d].lineCoordinates.x1, h = f[d]._labels[f[d]._labels.length - ("dateTime" === f[d].valueType ? 2 : 1)].position, h = f[d].getApparentDifference(f[d].viewportMinimum, h), H = f[d].logarithmic ? (1 < h ? Math.log(h) / f[d].conversionParameters.lnLogarithmBase * Math.abs(f[d].conversionParameters.pixelPerUnit) : 0) + f[d].lineCoordinates.x1 : (0 < h ? h * Math.abs(f[d].conversionParameters.pixelPerUnit) : 0) + f[d].lineCoordinates.x1);
8635                    for (d = 0; d < n.length; d++) "axisY" === n[d].type && (n[d].calculateValueToPixelConversionParameters(), n[d].calculateBreaksSizeInValues());
8636                    if (0 < s) {
8637                        if (a && 0 < a.length)
8638                            for (d = 0; d < a.length; d++) q = O[s - 1][d] === O[s][d] ? !0 : !1;
8639                        else q = !0;
8640                        if (f && 0 < f.length)
8641                            for (d = 0; d < f.length; d++) J = P[s - 1][d] === P[s][d] ? !0 : !1;
8642                        else J = !0;
8643                        if (b && 0 < b.length)
8644                            for (d = 0; d < b.length; d++) I = R[s - 1][d] === R[s][d] ? !0 : !1;
8645                        else I = !0;
8646                        if (c && 0 < c.length)
8647                            for (d = 0; d < c.length; d++) N = Q[s - 1][d] === Q[s][d] ? !0 : !1;
8648                        else N = !0
8649                    }
8650                    if (q && J && I && N) break;
8651                    s++
8652                }
8653                p.save();
8654                p.beginPath();
8655                a[0] && p.rect(5, a[0].bounds.y1, a[0].chart.width - 10, a[0].bounds.height);
8656                f[0] && p.rect(5, f[f.length - 1].bounds.y1, f[0].chart.width - 10, f[0].bounds.height);
8657                p.clip();
8658                if (a && 0 < a.length)
8659                    for (d = 0; d < a.length; d++) a[d].calculateStripLinesThicknessInValues(), a[d].calculateBreaksInPixels(), a[d].renderLabelsTicksAndTitle();
8660                if (f && 0 < f.length)
8661                    for (d = 0; d < f.length; d++) f[d].calculateStripLinesThicknessInValues(), f[d].calculateBreaksInPixels(), f[d].renderLabelsTicksAndTitle();
8662                p.restore();
8663                if (b && 0 < b.length)
8664                    for (d = 0; d < b.length; d++) b[d].calculateStripLinesThicknessInValues(), b[d].calculateBreaksInPixels(), b[d].renderLabelsTicksAndTitle();
8665                if (c && 0 < c.length)
8666                    for (d = 0; d < c.length; d++) c[d].calculateStripLinesThicknessInValues(),
8667                        c[d].calculateBreaksInPixels(), c[d].renderLabelsTicksAndTitle()
8668            } else {
8669                A = [];
8670                L = [];
8671                x = [];
8672                H = [];
8673                u = [];
8674                O = [];
8675                P = [];
8676                for (R = []; 4 > s;) {
8677                    W = Y = M = X = Z = K = V = e = U = Q = T = E = 0;
8678                    if (a && 0 < a.length)
8679                        for (x = [], d = Y = 0; d < a.length; d++) x.push(Math.ceil(a[d] ? a[d].createLabelsAndCalculateWidth() : 0)), Y += x[d], e += a[d] ? a[d].margin : 0;
8680                    else x.push(Math.ceil(a[0] ? a[0].createLabelsAndCalculateWidth() : 0));
8681                    P.push(x);
8682                    if (f && 0 < f.length)
8683                        for (H = [], d = W = 0; d < f.length; d++) H.push(Math.ceil(f[d] ? f[d].createLabelsAndCalculateWidth() : 0)), W += H[d], V += f[d] ? f[d].margin :
8684                            0;
8685                    else H.push(Math.ceil(f[0] ? f[0].createLabelsAndCalculateWidth() : 0));
8686                    R.push(H);
8687                    if (b && 0 < b.length)
8688                        for (d = 0; d < b.length; d++) b[d].lineCoordinates = {}, h = Math.round(g.x1 + Y + e), t = Math.round(g.x2 - W - V > m.width - 10 ? m.width - 10 : g.x2 - W - V), b[d].labelAutoFit && !y(z) && (0 < !a.length && (h = 0 > b[d].labelAngle ? Math.max(h, z) : 0 === b[d].labelAngle ? Math.max(h, z / 2) : h), 0 < !f.length && (t = 0 < b[d].labelAngle ? t - C / 2 : 0 === b[d].labelAngle ? t - C / 2 : t)), b[d].lineCoordinates.x1 = h, b[d].lineCoordinates.x2 = t, b[d].lineCoordinates.width = Math.abs(t - h), b[d].title &&
8689                        (b[d]._titleTextBlock.maxWidth = 0 < b[d].titleMaxWidth && b[d].titleMaxWidth < b[d].lineCoordinates.width ? b[d].titleMaxWidth : b[d].lineCoordinates.width);
8690                    if (c && 0 < c.length)
8691                        for (d = 0; d < c.length; d++) c[d].lineCoordinates = {}, h = Math.round(g.x1 + Y + e), t = Math.round(g.x2 - W - V > c[d].chart.width - 10 ? c[d].chart.width - 10 : g.x2 - W - V), c[d] && c[d].labelAutoFit && !y(G) && (0 < !a.length && (h = 0 < c[d].labelAngle ? Math.max(h, G) : 0 === c[d].labelAngle ? Math.max(h, G / 2) : h), 0 < !f.length && (t -= B / 2)), c[d].lineCoordinates.x1 = h, c[d].lineCoordinates.x2 = t, c[d].lineCoordinates.width =
8692                            Math.abs(t - h), c[d].title && (c[d]._titleTextBlock.maxWidth = 0 < c[d].titleMaxWidth && c[d].titleMaxWidth < c[d].lineCoordinates.width ? c[d].titleMaxWidth : c[d].lineCoordinates.width);
8693                    if (b && 0 < b.length)
8694                        for (A = [], d = X = 0; d < b.length; d++) A.push(Math.ceil(b[d] ? b[d].createLabelsAndCalculateHeight() : 0)), X += A[d] + b[d].margin, K += b[d].margin;
8695                    else A.push(Math.ceil(b[0] ? b[0].createLabelsAndCalculateHeight() : 0));
8696                    u.push(A);
8697                    if (c && 0 < c.length)
8698                        for (L = [], d = M = 0; d < c.length; d++) L.push(Math.ceil(c[d] ? c[d].createLabelsAndCalculateHeight() :
8699                            0)), M += L[d], Z += c[d].margin;
8700                    else L.push(Math.ceil(c[0] ? c[0].createLabelsAndCalculateHeight() : 0));
8701                    O.push(L);
8702                    if (b && 0 < b.length)
8703                        for (d = 0; d < b.length; d++) 0 < b[d]._labels.length && (k = b[d]._labels[0], l = b[d]._labels[b[d]._labels.length - 1], z = k.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(k.textBlock.angle)) + (k.textBlock.height - l.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(k.textBlock.angle)), C = l.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(l.textBlock.angle)) + (l.textBlock.height - l.textBlock.fontSize /
8704                            2) * Math.sin(Math.PI / 180 * Math.abs(l.textBlock.angle)));
8705                    if (c && 0 < c.length)
8706                        for (d = 0; d < c.length; d++) c[d] && 0 < c[d]._labels.length && (k = c[d]._labels[0], l = c[d]._labels[c[d]._labels.length - 1], G = k.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(k.textBlock.angle)) + (k.textBlock.height - l.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(k.textBlock.angle)), B = l.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(l.textBlock.angle)) + (l.textBlock.height - l.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(l.textBlock.angle)));
8707                    if (m.panEnabled)
8708                        for (d = 0; d < b.length; d++) A[d] = m.sessionVariables.axisY.height;
8709                    else
8710                        for (d = 0; d < b.length; d++) m.sessionVariables.axisY.height = A[d];
8711                    if (b && 0 < b.length)
8712                        for (d = b.length - 1; 0 <= d; d--) l = Math.round(g.y2), k = Math.round(g.y2 > b[d].chart.height - 10 ? b[d].chart.height - 10 : g.y2), b[d].lineCoordinates.y1 = l - (A[d] + b[d].margin + E), b[d].lineCoordinates.y2 = l - (A[d] + b[d].margin + E), b[d].bounds = {
8713                            x1: h,
8714                            y1: l - (A[d] + E + b[d].margin),
8715                            x2: t,
8716                            y2: k - (E + b[d].margin),
8717                            width: t - h,
8718                            height: A[d]
8719                        }, b[d].title && (b[d]._titleTextBlock.maxWidth = 0 <
8720                        b[d].titleMaxWidth && b[d].titleMaxWidth < b[d].lineCoordinates.width ? b[d].titleMaxWidth : b[d].lineCoordinates.width), E += A[d] + b[d].margin;
8721                    if (c && 0 < c.length)
8722                        for (d = c.length - 1; 0 <= d; d--) c[d] && (l = Math.round(g.y1), k = Math.round(g.y1 + (L[d] + c[d].margin + T)), c[d].lineCoordinates.y1 = k, c[d].lineCoordinates.y2 = k, c[d].bounds = {
8723                            x1: h,
8724                            y1: l + (c[d].margin + T),
8725                            x2: t,
8726                            y2: k,
8727                            width: t - h,
8728                            height: M
8729                        }, c[d].title && (c[d]._titleTextBlock.maxWidth = 0 < c[d].titleMaxWidth && c[d].titleMaxWidth < c[d].lineCoordinates.width ? c[d].titleMaxWidth : c[d].lineCoordinates.width),
8730                            T += L[d] + c[d].margin);
8731                    if (a && 0 < a.length)
8732                        for (d = 0; d < a.length; d++) {
8733                            K = a[d]._labels && 0 < a[d]._labels.length ? a[d]._labels[0].textBlock.fontSize / 2 : 0;
8734                            h = Math.round(g.x1 + e);
8735                            l = c && 0 < c.length ? Math.round(c[0] ? c[0].lineCoordinates.y2 : g.y1 < Math.max(K, 10) ? Math.max(K, 10) : g.y1) : g.y1 < Math.max(K, 10) ? Math.max(K, 10) : g.y1;
8736                            t = Math.round(g.x1 + Y + e);
8737                            k = b && 0 < b.length ? Math.round(b[0] ? b[0].lineCoordinates.y1 : g.y2 - X > m.height - Math.max(K, 10) ? m.height - Math.max(K, 10) : g.y2 - X) : g.y2 > m.height - Math.max(K, 10) ? m.height - Math.max(K, 10) : g.y2;
8738                            if (b &&
8739                                0 < b.length)
8740                                for (K = 0; K < b.length; K++) b[K] && b[K].labelAutoFit && (t = 0 > b[K].labelAngle ? Math.max(t, z) : 0 === b[K].labelAngle ? Math.max(t, z / 2) : t, h = 0 > b[K].labelAngle || 0 === b[K].labelAngle ? t - Y : h);
8741                            if (c && 0 < c.length)
8742                                for (K = 0; K < c.length; K++) c[K] && c[K].labelAutoFit && (t = c[K].lineCoordinates.x1, h = t - Y);
8743                            a[d].lineCoordinates = {
8744                                x1: t - Q,
8745                                y1: l,
8746                                x2: t - Q,
8747                                y2: k,
8748                                height: Math.abs(k - l)
8749                            };
8750                            a[d].bounds = {
8751                                x1: t - (x[d] + Q),
8752                                y1: l,
8753                                x2: t,
8754                                y2: k,
8755                                width: t - h,
8756                                height: k - l
8757                            };
8758                            a[d].title && (a[d]._titleTextBlock.maxWidth = 0 < a[d].titleMaxWidth && a[d].titleMaxWidth < a[d].lineCoordinates.height ?
8759                                a[d].titleMaxWidth : a[d].lineCoordinates.height);
8760                            a[d].calculateValueToPixelConversionParameters();
8761                            a[d].calculateBreaksSizeInValues();
8762                            Q += x[d] + a[d].margin
8763                        }
8764                    if (f && 0 < f.length)
8765                        for (d = 0; d < f.length; d++) {
8766                            K = f[d]._labels && 0 < f[d]._labels.length ? f[d]._labels[0].textBlock.fontSize / 2 : 0;
8767                            h = Math.round(g.x1 - e);
8768                            l = c && 0 < c.length ? Math.round(c[0] ? c[0].lineCoordinates.y2 : g.y1 < Math.max(K, 10) ? Math.max(K, 10) : g.y1) : g.y1 < Math.max(K, 10) ? Math.max(K, 10) : g.y1;
8769                            t = Math.round(g.x2 - W - V);
8770                            k = b && 0 < b.length ? Math.round(b[0] ? b[0].lineCoordinates.y1 :
8771                                g.y2 - X > m.height - Math.max(K, 10) ? m.height - Math.max(K, 10) : g.y2 - X) : g.y2 > m.height - Math.max(K, 10) ? m.height - Math.max(K, 10) : g.y2;
8772                            if (b && 0 < b.length)
8773                                for (K = 0; K < b.length; K++) b[K] && b[K].labelAutoFit && (t = 0 > b[K].labelAngle ? Math.max(t, z) : 0 === b[K].labelAngle ? Math.max(t, z / 2) : t, h = 0 > b[K].labelAngle || 0 === b[K].labelAngle ? t - W : h);
8774                            if (c && 0 < c.length)
8775                                for (K = 0; K < c.length; K++) c[K] && c[K].labelAutoFit && (t = c[K].lineCoordinates.x2, h = t - W);
8776                            f[d].lineCoordinates = {
8777                                x1: t + U,
8778                                y1: l,
8779                                x2: t + U,
8780                                y2: k,
8781                                height: Math.abs(k - l)
8782                            };
8783                            f[d].bounds = {
8784                                x1: h,
8785                                y1: l,
8786                                x2: t +
8787                                H[d] + U,
8788                                y2: k,
8789                                width: t - h,
8790                                height: k - l
8791                            };
8792                            f[d].title && (f[d]._titleTextBlock.maxWidth = 0 < f[d].titleMaxWidth && f[d].titleMaxWidth < f[d].lineCoordinates.height ? f[d].titleMaxWidth : f[d].lineCoordinates.height);
8793                            f[d].calculateValueToPixelConversionParameters();
8794                            f[d].calculateBreaksSizeInValues();
8795                            U += H[d] + f[d].margin
8796                        }
8797                    for (d = 0; d < n.length; d++) "axisY" === n[d].type && (n[d].calculateValueToPixelConversionParameters(), n[d].calculateBreaksSizeInValues());
8798                    if (0 < s) {
8799                        if (a && 0 < a.length)
8800                            for (d = 0; d < a.length; d++) q = P[s - 1][d] === P[s][d] ? !0 :
8801                                !1;
8802                        else q = !0;
8803                        if (f && 0 < f.length)
8804                            for (d = 0; d < f.length; d++) J = R[s - 1][d] === R[s][d] ? !0 : !1;
8805                        else J = !0;
8806                        if (b && 0 < b.length)
8807                            for (d = 0; d < b.length; d++) I = u[s - 1][d] === u[s][d] ? !0 : !1;
8808                        else I = !0;
8809                        if (c && 0 < c.length)
8810                            for (d = 0; d < c.length; d++) N = O[s - 1][d] === O[s][d] ? !0 : !1;
8811                        else N = !0
8812                    }
8813                    if (q && J && I && N) break;
8814                    s++
8815                }
8816                if (b && 0 < b.length)
8817                    for (d = 0; d < b.length; d++) b[d].calculateStripLinesThicknessInValues(), b[d].calculateBreaksInPixels(), b[d].renderLabelsTicksAndTitle();
8818                if (c && 0 < c.length)
8819                    for (d = 0; d < c.length; d++) c[d].calculateStripLinesThicknessInValues(),
8820                        c[d].calculateBreaksInPixels(), c[d].renderLabelsTicksAndTitle();
8821                if (a && 0 < a.length)
8822                    for (d = 0; d < a.length; d++) a[d].calculateStripLinesThicknessInValues(), a[d].calculateBreaksInPixels(), a[d].renderLabelsTicksAndTitle();
8823                if (f && 0 < f.length)
8824                    for (d = 0; d < f.length; d++) f[d].calculateStripLinesThicknessInValues(), f[d].calculateBreaksInPixels(), f[d].renderLabelsTicksAndTitle()
8825            }
8826            m.preparePlotArea();
8827            g = m.plotArea;
8828            p.save();
8829            p.beginPath();
8830            p.rect(g.x1, g.y1, Math.abs(g.x2 - g.x1), Math.abs(g.y2 - g.y1));
8831            p.clip();
8832            if (a && 0 < a.length)
8833                for (d =
8834                         0; d < n.length; d++) n[d].renderStripLinesOfThicknessType("value");
8835            if (f && 0 < f.length)
8836                for (d = 0; d < f.length; d++) f[d].renderStripLinesOfThicknessType("value");
8837            if (b && 0 < b.length)
8838                for (d = 0; d < b.length; d++) b[d].renderStripLinesOfThicknessType("value");
8839            if (c && 0 < c.length)
8840                for (d = 0; d < c.length; d++) c[d].renderStripLinesOfThicknessType("value");
8841            if (a && 0 < a.length)
8842                for (d = 0; d < a.length; d++) a[d].renderInterlacedColors();
8843            if (f && 0 < f.length)
8844                for (d = 0; d < f.length; d++) f[d].renderInterlacedColors();
8845            if (b && 0 < b.length)
8846                for (d = 0; d < b.length; d++) b[d].renderInterlacedColors();
8847            if (c && 0 < c.length)
8848                for (d = 0; d < c.length; d++) c[d].renderInterlacedColors();
8849            p.restore();
8850            if (a && 0 < a.length)
8851                for (d = 0; d < a.length; d++) a[d].renderGrid(), v && (a[d].createMask(), a[d].renderBreaksBackground());
8852            if (f && 0 < f.length)
8853                for (d = 0; d < f.length; d++) f[d].renderGrid(), v && (f[d].createMask(), f[d].renderBreaksBackground());
8854            if (b && 0 < b.length)
8855                for (d = 0; d < b.length; d++) b[d].renderGrid(), v && (b[d].createMask(), b[d].renderBreaksBackground());
8856            if (c && 0 < c.length)
8857                for (d = 0; d < c.length; d++) c[d].renderGrid(), v && (c[d].createMask(), c[d].renderBreaksBackground());
8858            if (a && 0 < a.length)
8859                for (d = 0; d < a.length; d++) a[d].renderAxisLine();
8860            if (f && 0 < f.length)
8861                for (d = 0; d < f.length; d++) f[d].renderAxisLine();
8862            if (b && 0 < b.length)
8863                for (d = 0; d < b.length; d++) b[d].renderAxisLine();
8864            if (c && 0 < c.length)
8865                for (d = 0; d < c.length; d++) c[d].renderAxisLine();
8866            if (a && 0 < a.length)
8867                for (d = 0; d < a.length; d++) a[d].renderStripLinesOfThicknessType("pixel");
8868            if (f && 0 < f.length)
8869                for (d = 0; d < f.length; d++) f[d].renderStripLinesOfThicknessType("pixel");
8870            if (b && 0 < b.length)
8871                for (d = 0; d < b.length; d++) b[d].renderStripLinesOfThicknessType("pixel");
8872            if (c && 0 < c.length)
8873                for (d = 0; d < c.length; d++) c[d].renderStripLinesOfThicknessType("pixel")
8874        };
8875        C.prototype.calculateStripLinesThicknessInValues = function() {
8876            for (var a = 0; a < this.stripLines.length; a++)
8877                if (null !== this.stripLines[a].startValue && null !== this.stripLines[a].endValue) {
8878                    var f = Math.min(this.stripLines[a].startValue, this.stripLines[a].endValue),
8879                        b = Math.max(this.stripLines[a].startValue, this.stripLines[a].endValue),
8880                        f = this.getApparentDifference(f, b);
8881                    this.stripLines[a].value = this.logarithmic ? this.stripLines[a].value *
8882                        Math.sqrt(Math.log(this.stripLines[a].endValue / this.stripLines[a].startValue) / Math.log(f)) : this.stripLines[a].value + (Math.abs(this.stripLines[a].endValue - this.stripLines[a].startValue) - f) / 2;
8883                    this.stripLines[a].thickness = f;
8884                    this.stripLines[a]._thicknessType = "value"
8885                }
8886        };
8887        C.prototype.calculateBreaksSizeInValues = function() {
8888            for (var a = "left" === this._position || "right" === this._position ? this.lineCoordinates.height || this.chart.height : this.lineCoordinates.width || this.chart.width, f = this.scaleBreaks ? this.scaleBreaks._appliedBreaks : [], b = this.conversionParameters.pixelPerUnit || a / (this.logarithmic ? this.conversionParameters.maximum / this.conversionParameters.minimum : this.conversionParameters.maximum - this.conversionParameters.minimum), c = this.scaleBreaks && !y(this.scaleBreaks.options.spacing), e, g = 0; g < f.length; g++) e = c || !y(f[g].options.spacing), f[g].spacing = O(f[g].spacing, a, 8, e ? 0.1 * a : 8, e ? 0 : 3) << 0, f[g].size = 0 > f[g].spacing ? 0 : Math.abs(f[g].spacing / b), this.logarithmic && (f[g].size = Math.pow(this.logarithmBase, f[g].size))
8889        };
8890        C.prototype.calculateBreaksInPixels =
8891            function() {
8892                if (!(this.scaleBreaks && 0 >= this.scaleBreaks._appliedBreaks.length)) {
8893                    var a = this.scaleBreaks ? this.scaleBreaks._appliedBreaks : [];
8894                    a.length && (this.scaleBreaks.firstBreakIndex = this.scaleBreaks.lastBreakIndex = null);
8895                    for (var f = 0; f < a.length && !(a[f].startValue > this.conversionParameters.maximum); f++) a[f].endValue < this.conversionParameters.minimum || (y(this.scaleBreaks.firstBreakIndex) && (this.scaleBreaks.firstBreakIndex = f), a[f].startValue >= this.conversionParameters.minimum && (a[f].startPixel = this.convertValueToPixel(a[f].startValue),
8896                        this.scaleBreaks.lastBreakIndex = f), a[f].endValue <= this.conversionParameters.maximum && (a[f].endPixel = this.convertValueToPixel(a[f].endValue)))
8897                }
8898            };
8899        C.prototype.renderLabelsTicksAndTitle = function() {
8900            var a = this,
8901                f = !1,
8902                b = 0,
8903                c = 0,
8904                e = 1,
8905                g = 0;
8906            0 !== this.labelAngle && 360 !== this.labelAngle && (e = 1.2);
8907            if ("undefined" === typeof this.options.interval) {
8908                if ("bottom" === this._position || "top" === this._position)
8909                    if (this.logarithmic && !this.equidistantInterval && this.labelAutoFit) {
8910                        for (var b = [], e = 0 !== this.labelAngle && 360 !== this.labelAngle ?
8911                            1 : 1.2, h, l = this.viewportMaximum, m = this.lineCoordinates.width / Math.log(this.range), k = this._labels.length - 1; 0 <= k; k--) {
8912                            p = this._labels[k];
8913                            if (p.position < this.viewportMinimum) break;
8914                            p.position > this.viewportMaximum || !(k === this._labels.length - 1 || h < Math.log(l / p.position) * m / e) || (b.push(p), l = p.position, h = p.textBlock.width * Math.abs(Math.cos(Math.PI / 180 * this.labelAngle)) + p.textBlock.height * Math.abs(Math.sin(Math.PI / 180 * this.labelAngle)))
8915                        }
8916                        this._labels = b
8917                    } else {
8918                        for (k = 0; k < this._labels.length; k++) p = this._labels[k], p.position <
8919                        this.viewportMinimum || (h = p.textBlock.width * Math.abs(Math.cos(Math.PI / 180 * this.labelAngle)) + p.textBlock.height * Math.abs(Math.sin(Math.PI / 180 * this.labelAngle)), b += h);
8920                        b > this.lineCoordinates.width * e && this.labelAutoFit && (f = !0)
8921                    }
8922                if ("left" === this._position || "right" === this._position)
8923                    if (this.logarithmic && !this.equidistantInterval && this.labelAutoFit) {
8924                        for (var b = [], r, l = this.viewportMaximum, m = this.lineCoordinates.height / Math.log(this.range), k = this._labels.length - 1; 0 <= k; k--) {
8925                            p = this._labels[k];
8926                            if (p.position < this.viewportMinimum) break;
8927                            p.position > this.viewportMaximum || !(k === this._labels.length - 1 || r < Math.log(l / p.position) * m) || (b.push(p), l = p.position, r = p.textBlock.height * Math.abs(Math.cos(Math.PI / 180 * this.labelAngle)) + p.textBlock.width * Math.abs(Math.sin(Math.PI / 180 * this.labelAngle)))
8928                        }
8929                        this._labels = b
8930                    } else {
8931                        for (k = 0; k < this._labels.length; k++) p = this._labels[k], p.position < this.viewportMinimum || (r = p.textBlock.height * Math.abs(Math.cos(Math.PI / 180 * this.labelAngle)) + p.textBlock.width * Math.abs(Math.sin(Math.PI / 180 * this.labelAngle)), c += r);
8932                        c > this.lineCoordinates.height *
8933                        e && this.labelAutoFit && (f = !0)
8934                    }
8935            }
8936            this.logarithmic && (!this.equidistantInterval && this.labelAutoFit) && this._labels.sort(function(a, b) {
8937                return a.position - b.position
8938            });
8939            var k = 0,
8940                p, n;
8941            if ("bottom" === this._position) {
8942                for (k = 0; k < this._labels.length; k++) p = this._labels[k], p.position < this.viewportMinimum || (p.position > this.viewportMaximum || f && 0 !== g++ % 2 && this.labelAutoFit) || (n = this.getPixelCoordinatesOnAxis(p.position), this.tickThickness && "inside" != this.labelPlacement && (this.ctx.lineWidth = this.tickThickness, this.ctx.strokeStyle =
8943                    this.tickColor, c = 1 === this.ctx.lineWidth % 2 ? (n.x << 0) + 0.5 : n.x << 0, this.ctx.beginPath(), this.ctx.moveTo(c, n.y << 0), this.ctx.lineTo(c, n.y + this.tickLength << 0), this.ctx.stroke()), 0 === p.textBlock.angle ? (n.x -= p.textBlock.width / 2, n.y = "inside" === this.labelPlacement ? n.y - (this.tickLength + p.textBlock.fontSize / 2) : n.y + this.tickLength + p.textBlock.fontSize / 2) : (n.x = "inside" === this.labelPlacement ? 0 > this.labelAngle ? n.x : n.x - p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : n.x - (0 > this.labelAngle ? p.textBlock.width *
8944                        Math.cos(Math.PI / 180 * this.labelAngle) : 0), n.y = "inside" === this.labelPlacement ? 0 > this.labelAngle ? n.y - this.tickLength - 5 : n.y - this.tickLength - Math.abs(p.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) + 5) : n.y + this.tickLength + Math.abs(0 > this.labelAngle ? p.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) - 5 : 5)), p.textBlock.x = n.x, p.textBlock.y = n.y);
8945                "inside" === this.labelPlacement && this.chart.addEventListener("dataAnimationIterationEnd", function() {
8946                    for (k = 0; k < a._labels.length; k++)
8947                        if (p = a._labels[k], !(p.position <
8948                            a.viewportMinimum || p.position > a.viewportMaximum || f && 0 !== g++ % 2 && a.labelAutoFit) && (n = a.getPixelCoordinatesOnAxis(p.position), a.tickThickness)) {
8949                            a.ctx.lineWidth = a.tickThickness;
8950                            a.ctx.strokeStyle = a.tickColor;
8951                            var b = 1 === a.ctx.lineWidth % 2 ? (n.x << 0) + 0.5 : n.x << 0;
8952                            a.ctx.save();
8953                            a.ctx.beginPath();
8954                            a.ctx.moveTo(b, n.y << 0);
8955                            a.ctx.lineTo(b, n.y - a.tickLength << 0);
8956                            a.ctx.stroke();
8957                            a.ctx.restore()
8958                        }
8959                }, this);
8960                this.title && (this._titleTextBlock.measureText(), this._titleTextBlock.x = this.lineCoordinates.x1 + this.lineCoordinates.width /
8961                    2 - this._titleTextBlock.width / 2, this._titleTextBlock.y = this.bounds.y2 - this._titleTextBlock.height - 3, this.titleMaxWidth = this._titleTextBlock.maxWidth, this._titleTextBlock.render(!0))
8962            } else if ("top" === this._position) {
8963                for (k = 0; k < this._labels.length; k++) p = this._labels[k], p.position < this.viewportMinimum || (p.position > this.viewportMaximum || f && 0 !== g++ % 2 && this.labelAutoFit) || (n = this.getPixelCoordinatesOnAxis(p.position), this.tickThickness && "inside" != this.labelPlacement && (this.ctx.lineWidth = this.tickThickness,
8964                    this.ctx.strokeStyle = this.tickColor, c = 1 === this.ctx.lineWidth % 2 ? (n.x << 0) + 0.5 : n.x << 0, this.ctx.beginPath(), this.ctx.moveTo(c, n.y << 0), this.ctx.lineTo(c, n.y - this.tickLength << 0), this.ctx.stroke()), 0 === p.textBlock.angle ? (n.x -= p.textBlock.width / 2, n.y = "inside" === this.labelPlacement ? n.y + this.labelFontSize / 2 + this.tickLength + 5 : n.y - (this.tickLength + p.textBlock.height - p.textBlock.fontSize / 2)) : (n.x = "inside" === this.labelPlacement ? 0 < this.labelAngle ? n.x : n.x - p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : n.x +
8965                    (p.textBlock.height - this.tickLength - this.labelFontSize) * Math.sin(Math.PI / 180 * this.labelAngle) - (0 < this.labelAngle ? p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : 0), n.y = "inside" === this.labelPlacement ? 0 < this.labelAngle ? n.y + this.tickLength + 5 : n.y - p.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) + this.tickLength + 5 : n.y - (this.tickLength + ((p.textBlock.height - p.textBlock.fontSize / 2) * Math.cos(Math.PI / 180 * this.labelAngle) + (0 < this.labelAngle ? p.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) :
8966                        0)))), p.textBlock.x = n.x, p.textBlock.y = n.y);
8967                "inside" === this.labelPlacement && this.chart.addEventListener("dataAnimationIterationEnd", function() {
8968                    for (k = 0; k < a._labels.length; k++)
8969                        if (p = a._labels[k], !(p.position < a.viewportMinimum || p.position > a.viewportMaximum || f && 0 !== g++ % 2 && a.labelAutoFit) && (n = a.getPixelCoordinatesOnAxis(p.position), a.tickThickness)) {
8970                            a.ctx.lineWidth = a.tickThickness;
8971                            a.ctx.strokeStyle = a.tickColor;
8972                            var b = 1 === this.ctx.lineWidth % 2 ? (n.x << 0) + 0.5 : n.x << 0;
8973                            a.ctx.save();
8974                            a.ctx.beginPath();
8975                            a.ctx.moveTo(b,
8976                                n.y << 0);
8977                            a.ctx.lineTo(b, n.y + a.tickLength << 0);
8978                            a.ctx.stroke();
8979                            a.ctx.restore()
8980                        }
8981                }, this);
8982                this.title && (this._titleTextBlock.measureText(), this._titleTextBlock.x = this.lineCoordinates.x1 + this.lineCoordinates.width / 2 - this._titleTextBlock.width / 2, this._titleTextBlock.y = this.bounds.y1 + 1, this.titleMaxWidth = this._titleTextBlock.maxWidth, this._titleTextBlock.render(!0))
8983            } else if ("left" === this._position) {
8984                for (k = 0; k < this._labels.length; k++) p = this._labels[k], p.position < this.viewportMinimum || (p.position > this.viewportMaximum ||
8985                f && 0 !== g++ % 2 && this.labelAutoFit) || (n = this.getPixelCoordinatesOnAxis(p.position), this.tickThickness && "inside" != this.labelPlacement && (this.ctx.lineWidth = this.tickThickness, this.ctx.strokeStyle = this.tickColor, c = 1 === this.ctx.lineWidth % 2 ? (n.y << 0) + 0.5 : n.y << 0, this.ctx.beginPath(), this.ctx.moveTo(n.x << 0, c), this.ctx.lineTo(n.x - this.tickLength << 0, c), this.ctx.stroke()), 0 === this.labelAngle ? (p.textBlock.y = n.y, p.textBlock.x = "inside" === this.labelPlacement ? n.x + this.tickLength + 5 : n.x - p.textBlock.width * Math.cos(Math.PI /
8986                        180 * this.labelAngle) - this.tickLength - 5) : (p.textBlock.y = "inside" === this.labelPlacement ? n.y : n.y - p.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle), p.textBlock.x = "inside" === this.labelPlacement ? n.x + this.tickLength + 5 : 0 < this.labelAngle ? n.x - p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - this.tickLength - 5 : n.x - p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) + (p.textBlock.height - p.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI / 180 * this.labelAngle) - this.tickLength));
8987                "inside" === this.labelPlacement &&
8988                this.chart.addEventListener("dataAnimationIterationEnd", function() {
8989                        for (k = 0; k < a._labels.length; k++)
8990                            if (p = a._labels[k], !(p.position < a.viewportMinimum || p.position > a.viewportMaximum || f && 0 !== g++ % 2 && a.labelAutoFit) && (n = a.getPixelCoordinatesOnAxis(p.position), a.tickThickness)) {
8991                                a.ctx.lineWidth = a.tickThickness;
8992                                a.ctx.strokeStyle = a.tickColor;
8993                                var b = 1 === a.ctx.lineWidth % 2 ? (n.y << 0) + 0.5 : n.y << 0;
8994                                a.ctx.save();
8995                                a.ctx.beginPath();
8996                                a.ctx.moveTo(n.x << 0, b);
8997                                a.ctx.lineTo(n.x + a.tickLength << 0, b);
8998                                a.ctx.stroke();
8999                                a.ctx.restore()
9000                            }
9001                    },
9002                    this);
9003                this.title && (this._titleTextBlock.measureText(), this._titleTextBlock.x = this.bounds.x1 + 1, this._titleTextBlock.y = this.lineCoordinates.height / 2 + this._titleTextBlock.width / 2 + this.lineCoordinates.y1, this.titleMaxWidth = this._titleTextBlock.maxWidth, this._titleTextBlock.render(!0))
9004            } else if ("right" === this._position) {
9005                for (k = 0; k < this._labels.length; k++) p = this._labels[k], p.position < this.viewportMinimum || (p.position > this.viewportMaximum || f && 0 !== g++ % 2 && this.labelAutoFit) || (n = this.getPixelCoordinatesOnAxis(p.position),
9006                this.tickThickness && "inside" != this.labelPlacement && (this.ctx.lineWidth = this.tickThickness, this.ctx.strokeStyle = this.tickColor, c = 1 === this.ctx.lineWidth % 2 ? (n.y << 0) + 0.5 : n.y << 0, this.ctx.beginPath(), this.ctx.moveTo(n.x << 0, c), this.ctx.lineTo(n.x + this.tickLength << 0, c), this.ctx.stroke()), 0 === this.labelAngle ? (p.textBlock.y = n.y, p.textBlock.x = "inside" === this.labelPlacement ? n.x - p.textBlock.width - this.tickLength - 5 : n.x + this.tickLength + 5) : (p.textBlock.y = "inside" === this.labelPlacement ? n.y - p.textBlock.width * Math.sin(Math.PI /
9007                        180 * this.labelAngle) : 0 > this.labelAngle ? n.y : n.y - (p.textBlock.height - p.textBlock.fontSize / 2 - 5) * Math.cos(Math.PI / 180 * this.labelAngle), p.textBlock.x = "inside" === this.labelPlacement ? n.x - p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - this.tickLength - 5 : 0 < this.labelAngle ? n.x + (p.textBlock.height - p.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI / 180 * this.labelAngle) + this.tickLength : n.x + this.tickLength + 5));
9008                "inside" === this.labelPlacement && this.chart.addEventListener("dataAnimationIterationEnd", function() {
9009                    for (k =
9010                             0; k < a._labels.length; k++)
9011                        if (p = a._labels[k], !(p.position < a.viewportMinimum || p.position > a.viewportMaximum || f && 0 !== g++ % 2 && a.labelAutoFit) && (n = a.getPixelCoordinatesOnAxis(p.position), a.tickThickness)) {
9012                            a.ctx.lineWidth = a.tickThickness;
9013                            a.ctx.strokeStyle = a.tickColor;
9014                            var b = 1 === a.ctx.lineWidth % 2 ? (n.y << 0) + 0.5 : n.y << 0;
9015                            a.ctx.save();
9016                            a.ctx.beginPath();
9017                            a.ctx.moveTo(n.x << 0, b);
9018                            a.ctx.lineTo(n.x - a.tickLength << 0, b);
9019                            a.ctx.stroke();
9020                            a.ctx.restore()
9021                        }
9022                }, this);
9023                this.title && (this._titleTextBlock.measureText(), this._titleTextBlock.x =
9024                    this.bounds.x2 - 1, this._titleTextBlock.y = this.lineCoordinates.height / 2 - this._titleTextBlock.width / 2 + this.lineCoordinates.y1, this.titleMaxWidth = this._titleTextBlock.maxWidth, this._titleTextBlock.render(!0))
9025            }
9026            g = 0;
9027            if ("inside" === this.labelPlacement) this.chart.addEventListener("dataAnimationIterationEnd", function() {
9028                for (k = 0; k < a._labels.length; k++) p = a._labels[k], p.position < a.viewportMinimum || (p.position > a.viewportMaximum || f && 0 !== g++ % 2 && a.labelAutoFit && p.skipFlag) || (a.ctx.save(), a.ctx.beginPath(), p.textBlock.render(!0),
9029                    a.ctx.restore())
9030            }, p.textBlock);
9031            else
9032                for (k = 0; k < this._labels.length; k++) p = this._labels[k], p.position < this.viewportMinimum || (p.position > this.viewportMaximum || f && 0 !== g++ % 2 && this.labelAutoFit && p.skipFlag) || p.textBlock.render(!0)
9033        };
9034        C.prototype.renderInterlacedColors = function() {
9035            var a = this.chart.plotArea.ctx,
9036                f, b, c = this.chart.plotArea,
9037                e = 0;
9038            f = !0;
9039            if (("bottom" === this._position || "top" === this._position) && this.interlacedColor)
9040                for (a.fillStyle = this.interlacedColor, e = 0; e < this._labels.length; e++) f ? (f = this.getPixelCoordinatesOnAxis(this._labels[e].position),
9041                    b = e + 1 > this._labels.length - 1 ? this.getPixelCoordinatesOnAxis(this.viewportMaximum) : this.getPixelCoordinatesOnAxis(this._labels[e + 1].position), a.fillRect(Math.min(b.x, f.x), c.y1, Math.abs(b.x - f.x), Math.abs(c.y1 - c.y2)), f = !1) : f = !0;
9042            else if (("left" === this._position || "right" === this._position) && this.interlacedColor)
9043                for (a.fillStyle = this.interlacedColor, e = 0; e < this._labels.length; e++) f ? (b = this.getPixelCoordinatesOnAxis(this._labels[e].position), f = e + 1 > this._labels.length - 1 ? this.getPixelCoordinatesOnAxis(this.viewportMaximum) :
9044                    this.getPixelCoordinatesOnAxis(this._labels[e + 1].position), a.fillRect(c.x1, Math.min(b.y, f.y), Math.abs(c.x1 - c.x2), Math.abs(f.y - b.y)), f = !1) : f = !0;
9045            a.beginPath()
9046        };
9047        C.prototype.renderStripLinesOfThicknessType = function(a) {
9048            if (this.stripLines && 0 < this.stripLines.length && a) {
9049                for (var f = this, b, c = 0, e = 0, g = !1, h = !1, l = [], m = [], h = !1, c = 0; c < this.stripLines.length; c++) {
9050                    var k = this.stripLines[c];
9051                    k._thicknessType === a && ("pixel" === a && (k.value < this.viewportMinimum || k.value > this.viewportMaximum || y(k.value) || isNaN(this.range)) ||
9052                    l.push(k))
9053                }
9054                for (c = 0; c < this._stripLineLabels.length; c++)
9055                    if (k = this.stripLines[c], b = this._stripLineLabels[c], !(b.position < this.viewportMinimum || b.position > this.viewportMaximum || isNaN(this.range))) {
9056                        a = this.getPixelCoordinatesOnAxis(b.position);
9057                        if ("outside" === b.stripLine.labelPlacement)
9058                            if (k && (this.ctx.strokeStyle = k.color, "pixel" === k._thicknessType && (this.ctx.lineWidth = k.thickness)), "bottom" === this._position) {
9059                                var r = 1 === this.ctx.lineWidth % 2 ? (a.x << 0) + 0.5 : a.x << 0;
9060                                this.ctx.beginPath();
9061                                this.ctx.moveTo(r, a.y << 0);
9062                                this.ctx.lineTo(r, a.y + this.tickLength << 0);
9063                                this.ctx.stroke();
9064                                0 === this.labelAngle ? (a.x -= b.textBlock.width / 2, a.y += this.tickLength + b.textBlock.fontSize / 2) : (a.x -= 0 > this.labelAngle ? b.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : 0, a.y += this.tickLength + Math.abs(0 > this.labelAngle ? b.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) - 5 : 5))
9065                            } else "top" === this._position ? (r = 1 === this.ctx.lineWidth % 2 ? (a.x << 0) + 0.5 : a.x << 0, this.ctx.beginPath(), this.ctx.moveTo(r, a.y << 0), this.ctx.lineTo(r, a.y - this.tickLength <<
9066                                0), this.ctx.stroke(), 0 === this.labelAngle ? (a.x -= b.textBlock.width / 2, a.y -= this.tickLength + b.textBlock.height) : (a.x += (b.textBlock.height - this.tickLength - this.labelFontSize / 2) * Math.sin(Math.PI / 180 * this.labelAngle) - (0 < this.labelAngle ? b.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : 0), a.y -= this.tickLength + (b.textBlock.height * Math.cos(Math.PI / 180 * this.labelAngle) + (0 < this.labelAngle ? b.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) : 0)))) : "left" === this._position ? (r = 1 === this.ctx.lineWidth % 2 ? (a.y <<
9067                                0) + 0.5 : a.y << 0, this.ctx.beginPath(), this.ctx.moveTo(a.x << 0, r), this.ctx.lineTo(a.x - this.tickLength << 0, r), this.ctx.stroke(), 0 === this.labelAngle ? a.x = a.x - b.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - this.tickLength - 5 : (a.y -= b.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle), a.x = 0 < this.labelAngle ? a.x - b.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - this.tickLength - 5 : a.x - b.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) + (b.textBlock.height - b.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI /
9068                                    180 * this.labelAngle) - this.tickLength)) : "right" === this._position && (r = 1 === this.ctx.lineWidth % 2 ? (a.y << 0) + 0.5 : a.y << 0, this.ctx.beginPath(), this.ctx.moveTo(a.x << 0, r), this.ctx.lineTo(a.x + this.tickLength << 0, r), this.ctx.stroke(), 0 === this.labelAngle ? a.x = a.x + this.tickLength + 5 : (a.y = 0 > this.labelAngle ? a.y : a.y - (b.textBlock.height - b.textBlock.fontSize / 2 - 5) * Math.cos(Math.PI / 180 * this.labelAngle), a.x = 0 < this.labelAngle ? a.x + (b.textBlock.height - b.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI / 180 * this.labelAngle) + this.tickLength :
9069                                    a.x + this.tickLength + 5));
9070                        else b.textBlock.angle = -90, "bottom" === this._position ? (b.textBlock.maxWidth = this.options.stripLines[c].labelMaxWidth ? this.options.stripLines[c].labelMaxWidth : this.chart.plotArea.height - 3, b.textBlock.measureText(), a.x - b.textBlock.height > this.chart.plotArea.x1 ? y(k.startValue) ? a.x -= b.textBlock.height - b.textBlock.fontSize / 2 : a.x -= b.textBlock.height / 2 - b.textBlock.fontSize / 2 + 3 : (b.textBlock.angle = 90, y(k.startValue) ? a.x += b.textBlock.height - b.textBlock.fontSize / 2 : a.x += b.textBlock.height /
9071                            2 - b.textBlock.fontSize / 2 + 3), a.y = -90 === b.textBlock.angle ? "near" === b.stripLine.labelAlign ? this.chart.plotArea.y2 - 3 : "center" === b.stripLine.labelAlign ? (this.chart.plotArea.y2 + this.chart.plotArea.y1 + b.textBlock.width) / 2 : this.chart.plotArea.y1 + b.textBlock.width + 3 : "near" === b.stripLine.labelAlign ? this.chart.plotArea.y2 - b.textBlock.width - 3 : "center" === b.stripLine.labelAlign ? (this.chart.plotArea.y2 + this.chart.plotArea.y1 - b.textBlock.width) / 2 : this.chart.plotArea.y1 + 3) : "top" === this._position ? (b.textBlock.maxWidth =
9072                            this.options.stripLines[c].labelMaxWidth ? this.options.stripLines[c].labelMaxWidth : this.chart.plotArea.height - 3, b.textBlock.measureText(), a.x - b.textBlock.height > this.chart.plotArea.x1 ? y(k.startValue) ? a.x -= b.textBlock.height - b.textBlock.fontSize / 2 : a.x -= b.textBlock.height / 2 - b.textBlock.fontSize / 2 + 3 : (b.textBlock.angle = 90, y(k.startValue) ? a.x += b.textBlock.height - b.textBlock.fontSize / 2 : a.x += b.textBlock.height / 2 - b.textBlock.fontSize / 2 + 3), a.y = -90 === b.textBlock.angle ? "near" === b.stripLine.labelAlign ? this.chart.plotArea.y1 +
9073                            b.textBlock.width + 3 : "center" === b.stripLine.labelAlign ? (this.chart.plotArea.y2 + this.chart.plotArea.y1 + b.textBlock.width) / 2 : this.chart.plotArea.y2 - 3 : "near" === b.stripLine.labelAlign ? this.chart.plotArea.y1 + 3 : "center" === b.stripLine.labelAlign ? (this.chart.plotArea.y2 + this.chart.plotArea.y1 - b.textBlock.width) / 2 : this.chart.plotArea.y2 - b.textBlock.width - 3) : "left" === this._position ? (b.textBlock.maxWidth = this.options.stripLines[c].labelMaxWidth ? this.options.stripLines[c].labelMaxWidth : this.chart.plotArea.width -
9074                            3, b.textBlock.angle = 0, b.textBlock.measureText(), a.y - b.textBlock.height > this.chart.plotArea.y1 ? y(k.startValue) ? a.y -= b.textBlock.height - b.textBlock.fontSize / 2 : a.y -= b.textBlock.height / 2 - b.textBlock.fontSize + 3 : a.y - b.textBlock.height < this.chart.plotArea.y2 ? a.y += b.textBlock.fontSize / 2 + 3 : y(k.startValue) ? a.y -= b.textBlock.height - b.textBlock.fontSize / 2 : a.y -= b.textBlock.height / 2 - b.textBlock.fontSize + 3, a.x = "near" === b.stripLine.labelAlign ? this.chart.plotArea.x1 + 3 : "center" === b.stripLine.labelAlign ? (this.chart.plotArea.x2 +
9075                            this.chart.plotArea.x1) / 2 - b.textBlock.width / 2 : this.chart.plotArea.x2 - b.textBlock.width - 3) : "right" === this._position && (b.textBlock.maxWidth = this.options.stripLines[c].labelMaxWidth ? this.options.stripLines[c].labelMaxWidth : this.chart.plotArea.width - 3, b.textBlock.angle = 0, b.textBlock.measureText(), a.y - +b.textBlock.height > this.chart.plotArea.y1 ? y(k.startValue) ? a.y -= b.textBlock.height - b.textBlock.fontSize / 2 : a.y -= b.textBlock.height / 2 - b.textBlock.fontSize / 2 - 3 : a.y - b.textBlock.height < this.chart.plotArea.y2 ?
9076                                a.y += b.textBlock.fontSize / 2 + 3 : y(k.startValue) ? a.y -= b.textBlock.height - b.textBlock.fontSize / 2 : a.y -= b.textBlock.height / 2 - b.textBlock.fontSize / 2 + 3, a.x = "near" === b.stripLine.labelAlign ? this.chart.plotArea.x2 - b.textBlock.width - 3 : "center" === b.stripLine.labelAlign ? (this.chart.plotArea.x2 + this.chart.plotArea.x1) / 2 - b.textBlock.width / 2 : this.chart.plotArea.x1 + 3);
9077                        b.textBlock.x = a.x;
9078                        b.textBlock.y = a.y;
9079                        m.push(b)
9080                    }
9081                if (!h) {
9082                    h = !1;
9083                    this.ctx.save();
9084                    this.ctx.beginPath();
9085                    this.ctx.rect(this.chart.plotArea.x1, this.chart.plotArea.y1,
9086                        this.chart.plotArea.width, this.chart.plotArea.height);
9087                    this.ctx.clip();
9088                    for (c = 0; c < l.length; c++) k = l[c], k.showOnTop ? g || (g = !0, this.chart.addEventListener("dataAnimationIterationEnd", function() {
9089                            this.ctx.save();
9090                            this.ctx.beginPath();
9091                            this.ctx.rect(this.chart.plotArea.x1, this.chart.plotArea.y1, this.chart.plotArea.width, this.chart.plotArea.height);
9092                            this.ctx.clip();
9093                            for (e = 0; e < l.length; e++) k = l[e], k.showOnTop && k.render();
9094                            this.ctx.restore()
9095                        }, k)) : k.render();
9096                    for (c = 0; c < m.length; c++) b = m[c], b.stripLine.showOnTop ? h || (h = !0, this.chart.addEventListener("dataAnimationIterationEnd", function() {
9097                            for (e = 0; e < m.length; e++) b = m[e], "inside" === b.stripLine.labelPlacement && b.stripLine.showOnTop && (f.ctx.save(), f.ctx.beginPath(), f.ctx.rect(f.chart.plotArea.x1, f.chart.plotArea.y1, f.chart.plotArea.width, f.chart.plotArea.height), f.ctx.clip(), b.textBlock.render(!0), f.ctx.restore())
9098                        }, b.textBlock)) : "inside" === b.stripLine.labelPlacement && b.textBlock.render(!0);
9099                    this.ctx.restore();
9100                    h = !0
9101                }
9102                if (h)
9103                    for (h = !1, c = 0; c < m.length; c++) b = m[c], b.stripLine.showOnTop ?
9104                        h || (h = !0, this.chart.addEventListener("dataAnimationIterationEnd", function() {
9105                            for (e = 0; e < m.length; e++) b = m[e], "outside" === b.stripLine.labelPlacement && b.stripLine.showOnTop && b.textBlock.render(!0)
9106                        }, b.textBlock)) : "outside" === b.stripLine.labelPlacement && b.textBlock.render(!0)
9107            }
9108        };
9109        C.prototype.renderBreaksBackground = function() {
9110            this.chart._breaksCanvas && (this.scaleBreaks && 0 < this.scaleBreaks._appliedBreaks.length && this.maskCanvas) && (this.chart._breaksCanvasCtx.save(), this.chart._breaksCanvasCtx.beginPath(), this.chart._breaksCanvasCtx.rect(this.chart.plotArea.x1,
9111                this.chart.plotArea.y1, this.chart.plotArea.width, this.chart.plotArea.height), this.chart._breaksCanvasCtx.clip(), this.chart._breaksCanvasCtx.drawImage(this.maskCanvas, 0, 0, this.chart.width, this.chart.height), this.chart._breaksCanvasCtx.restore())
9112        };
9113        C.prototype.createMask = function() {
9114            if (this.scaleBreaks && 0 < this.scaleBreaks._appliedBreaks.length) {
9115                var a = this.scaleBreaks._appliedBreaks;
9116                v ? (this.maskCanvas = ua(this.chart.width, this.chart.height), this.maskCtx = this.maskCanvas.getContext("2d")) : (this.maskCanvas =
9117                    this.chart.plotArea.canvas, this.maskCtx = this.chart.plotArea.ctx);
9118                this.maskCtx.save();
9119                this.maskCtx.beginPath();
9120                this.maskCtx.rect(this.chart.plotArea.x1, this.chart.plotArea.y1, this.chart.plotArea.width, this.chart.plotArea.height);
9121                this.maskCtx.clip();
9122                for (var f = 0; f < a.length; f++) a[f].endValue < this.viewportMinimum || (a[f].startValue > this.viewportMaximum || isNaN(this.range)) || a[f].render(this.maskCtx);
9123                this.maskCtx.restore()
9124            }
9125        };
9126        C.prototype.renderCrosshair = function(a, f) {
9127            this.crosshair.render(a, f)
9128        };
9129        C.prototype.renderGrid =
9130            function() {
9131                if (this.gridThickness && 0 < this.gridThickness) {
9132                    var a = this.chart.ctx;
9133                    a.save();
9134                    var f, b = this.chart.plotArea;
9135                    a.lineWidth = this.gridThickness;
9136                    a.strokeStyle = this.gridColor;
9137                    a.setLineDash && a.setLineDash(G(this.gridDashType, this.gridThickness));
9138                    if ("bottom" === this._position || "top" === this._position)
9139                        for (c = 0; c < this._labels.length; c++) this._labels[c].position < this.viewportMinimum || (this._labels[c].position > this.viewportMaximum || this._labels[c].breaksLabelType) || (a.beginPath(), f = this.getPixelCoordinatesOnAxis(this._labels[c].position),
9140                            f = 1 === a.lineWidth % 2 ? (f.x << 0) + 0.5 : f.x << 0, a.moveTo(f, b.y1 << 0), a.lineTo(f, b.y2 << 0), a.stroke());
9141                    else if ("left" === this._position || "right" === this._position)
9142                        for (var c = 0; c < this._labels.length; c++) this._labels[c].position < this.viewportMinimum || (this._labels[c].position > this.viewportMaximum || this._labels[c].breaksLabelType) || (a.beginPath(), f = this.getPixelCoordinatesOnAxis(this._labels[c].position), f = 1 === a.lineWidth % 2 ? (f.y << 0) + 0.5 : f.y << 0, a.moveTo(b.x1 << 0, f), a.lineTo(b.x2 << 0, f), a.stroke());
9143                    a.restore()
9144                }
9145            };
9146        C.prototype.renderAxisLine =
9147            function() {
9148                var a = this.chart.ctx,
9149                    f = v ? this.chart._preRenderCtx : a,
9150                    b = Math.ceil(this.tickThickness / (this.reversed ? -2 : 2)),
9151                    c = Math.ceil(this.tickThickness / (this.reversed ? 2 : -2)),
9152                    e, g;
9153                f.save();
9154                if ("bottom" === this._position || "top" === this._position) {
9155                    if (this.lineThickness) {
9156                        this.reversed ? (e = this.lineCoordinates.x2, g = this.lineCoordinates.x1) : (e = this.lineCoordinates.x1, g = this.lineCoordinates.x2);
9157                        f.lineWidth = this.lineThickness;
9158                        f.strokeStyle = this.lineColor ? this.lineColor : "black";
9159                        f.setLineDash && f.setLineDash(G(this.lineDashType,
9160                            this.lineThickness));
9161                        var h = 1 === this.lineThickness % 2 ? (this.lineCoordinates.y1 << 0) + 0.5 : this.lineCoordinates.y1 << 0;
9162                        f.beginPath();
9163                        if (this.scaleBreaks && !y(this.scaleBreaks.firstBreakIndex))
9164                            if (y(this.scaleBreaks.lastBreakIndex)) e = this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel + c;
9165                            else
9166                                for (var l = this.scaleBreaks.firstBreakIndex; l <= this.scaleBreaks.lastBreakIndex; l++) f.moveTo(e, h), f.lineTo(this.scaleBreaks._appliedBreaks[l].startPixel + b, h), e = this.scaleBreaks._appliedBreaks[l].endPixel +
9167                                    c;
9168                        e && (f.moveTo(e, h), f.lineTo(g, h));
9169                        f.stroke()
9170                    }
9171                } else if (("left" === this._position || "right" === this._position) && this.lineThickness) {
9172                    this.reversed ? (e = this.lineCoordinates.y1, g = this.lineCoordinates.y2) : (e = this.lineCoordinates.y2, g = this.lineCoordinates.y1);
9173                    f.lineWidth = this.lineThickness;
9174                    f.strokeStyle = this.lineColor;
9175                    f.setLineDash && f.setLineDash(G(this.lineDashType, this.lineThickness));
9176                    h = 1 === this.lineThickness % 2 ? (this.lineCoordinates.x1 << 0) + 0.5 : this.lineCoordinates.x1 << 0;
9177                    f.beginPath();
9178                    if (this.scaleBreaks &&
9179                        !y(this.scaleBreaks.firstBreakIndex))
9180                        if (y(this.scaleBreaks.lastBreakIndex)) e = this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel + b;
9181                        else
9182                            for (l = this.scaleBreaks.firstBreakIndex; l <= this.scaleBreaks.lastBreakIndex; l++) f.moveTo(h, e), f.lineTo(h, this.scaleBreaks._appliedBreaks[l].startPixel + c), e = this.scaleBreaks._appliedBreaks[l].endPixel + b;
9183                    e && (f.moveTo(h, e), f.lineTo(h, g));
9184                    f.stroke()
9185                }
9186                v && (a.drawImage(this.chart._preRenderCanvas, 0, 0, this.chart.width, this.chart.height), this.chart._breaksCanvasCtx &&
9187                this.chart._breaksCanvasCtx.drawImage(this.chart._preRenderCanvas, 0, 0, this.chart.width, this.chart.height), f.clearRect(0, 0, this.chart.width, this.chart.height));
9188                f.restore()
9189            };
9190        C.prototype.getPixelCoordinatesOnAxis = function(a) {
9191            var f = {};
9192            if ("bottom" === this._position || "top" === this._position) f.x = this.convertValueToPixel(a), f.y = this.lineCoordinates.y1;
9193            if ("left" === this._position || "right" === this._position) f.y = this.convertValueToPixel(a), f.x = this.lineCoordinates.x2;
9194            return f
9195        };
9196        C.prototype.convertPixelToValue = function(a) {
9197            if ("undefined" ===
9198                typeof a) return null;
9199            var f = 0,
9200                b = 0,
9201                c, f = !0,
9202                e = this.scaleBreaks ? this.scaleBreaks._appliedBreaks : [],
9203                b = "number" === typeof a ? a : "left" === this._position || "right" === this._position ? a.y : a.x;
9204            if (this.logarithmic) {
9205                a = c = Math.pow(this.logarithmBase, (b - this.conversionParameters.reference) / this.conversionParameters.pixelPerUnit);
9206                if (b <= this.conversionParameters.reference === ("left" === this._position || "right" === this._position) !== this.reversed)
9207                    for (b = 0; b < e.length; b++) {
9208                        if (!(e[b].endValue < this.conversionParameters.minimum))
9209                            if (f)
9210                                if (e[b].startValue <
9211                                    this.conversionParameters.minimum) {
9212                                    if (1 < e[b].size && this.conversionParameters.minimum * Math.pow(e[b].endValue / e[b].startValue, Math.log(c) / Math.log(e[b].size)) < e[b].endValue) {
9213                                        a = Math.pow(e[b].endValue / e[b].startValue, Math.log(c) / Math.log(e[b].size));
9214                                        break
9215                                    } else a *= e[b].endValue / this.conversionParameters.minimum / Math.pow(e[b].size, Math.log(e[b].endValue / this.conversionParameters.minimum) / Math.log(e[b].endValue / e[b].startValue)), c /= Math.pow(e[b].size, Math.log(e[b].endValue / this.conversionParameters.minimum) /
9216                                        Math.log(e[b].endValue / e[b].startValue));
9217                                    f = !1
9218                                } else if (c > e[b].startValue / this.conversionParameters.minimum) {
9219                                    c /= e[b].startValue / this.conversionParameters.minimum;
9220                                    if (c < e[b].size) {
9221                                        a *= Math.pow(e[b].endValue / e[b].startValue, 1 === e[b].size ? 1 : Math.log(c) / Math.log(e[b].size)) / c;
9222                                        break
9223                                    } else a *= e[b].endValue / e[b].startValue / e[b].size;
9224                                    c /= e[b].size;
9225                                    f = !1
9226                                } else break;
9227                            else if (c > e[b].startValue / e[b - 1].endValue) {
9228                                c /= e[b].startValue / e[b - 1].endValue;
9229                                if (c < e[b].size) {
9230                                    a *= Math.pow(e[b].endValue / e[b].startValue, 1 === e[b].size ?
9231                                            1 : Math.log(c) / Math.log(e[b].size)) / c;
9232                                    break
9233                                } else a *= e[b].endValue / e[b].startValue / e[b].size;
9234                                c /= e[b].size
9235                            } else break
9236                    } else
9237                    for (b = e.length - 1; 0 <= b; b--)
9238                        if (!(e[b].startValue > this.conversionParameters.minimum))
9239                            if (f)
9240                                if (e[b].endValue > this.conversionParameters.minimum) {
9241                                    if (1 < e[b].size && this.conversionParameters.minimum * Math.pow(e[b].endValue / e[b].startValue, Math.log(c) / Math.log(e[b].size)) > e[b].startValue) {
9242                                        a = Math.pow(e[b].endValue / e[b].startValue, Math.log(c) / Math.log(e[b].size));
9243                                        break
9244                                    } else a *= e[b].startValue /
9245                                        this.conversionParameters.minimum * Math.pow(e[b].size, Math.log(e[b].startValue / this.conversionParameters.minimum) / Math.log(e[b].endValue / e[b].startValue)) * c, c *= Math.pow(e[b].size, Math.log(this.conversionParameters.minimum / e[b].startValue) / Math.log(e[b].endValue / e[b].startValue));
9246                                    f = !1
9247                                } else if (c < e[b].endValue / this.conversionParameters.minimum) {
9248                                    c /= e[b].endValue / this.conversionParameters.minimum;
9249                                    if (c > 1 / e[b].size) {
9250                                        a *= Math.pow(e[b].endValue / e[b].startValue, 1 >= e[b].size ? 1 : Math.log(c) / Math.log(e[b].size)) *
9251                                            c;
9252                                        break
9253                                    } else a /= e[b].endValue / e[b].startValue / e[b].size;
9254                                    c *= e[b].size;
9255                                    f = !1
9256                                } else break;
9257                            else if (c < e[b].endValue / e[b + 1].startValue) {
9258                                c /= e[b].endValue / e[b + 1].startValue;
9259                                if (c > 1 / e[b].size) {
9260                                    a *= Math.pow(e[b].endValue / e[b].startValue, 1 >= e[b].size ? 1 : Math.log(c) / Math.log(e[b].size)) * c;
9261                                    break
9262                                } else a /= e[b].endValue / e[b].startValue / e[b].size;
9263                                c *= e[b].size
9264                            } else break;
9265                f = a * this.viewportMinimum
9266            } else {
9267                a = c = (b - this.conversionParameters.reference) / this.conversionParameters.pixelPerUnit;
9268                if (b <= this.conversionParameters.reference ===
9269                    ("left" === this._position || "right" === this._position) !== this.reversed)
9270                    for (b = 0; b < e.length; b++) {
9271                        if (!(e[b].endValue < this.conversionParameters.minimum))
9272                            if (f)
9273                                if (e[b].startValue < this.conversionParameters.minimum) {
9274                                    if (e[b].size && this.conversionParameters.minimum + c * (e[b].endValue - e[b].startValue) / e[b].size < e[b].endValue) {
9275                                        a = 0 >= e[b].size ? 0 : c * (e[b].endValue - e[b].startValue) / e[b].size;
9276                                        break
9277                                    } else a += e[b].endValue - this.conversionParameters.minimum - e[b].size * (e[b].endValue - this.conversionParameters.minimum) / (e[b].endValue -
9278                                        e[b].startValue), c -= e[b].size * (e[b].endValue - this.conversionParameters.minimum) / (e[b].endValue - e[b].startValue);
9279                                    f = !1
9280                                } else if (c > e[b].startValue - this.conversionParameters.minimum) {
9281                                    c -= e[b].startValue - this.conversionParameters.minimum;
9282                                    if (c < e[b].size) {
9283                                        a += (e[b].endValue - e[b].startValue) * (0 === e[b].size ? 1 : c / e[b].size) - c;
9284                                        break
9285                                    } else a += e[b].endValue - e[b].startValue - e[b].size;
9286                                    c -= e[b].size;
9287                                    f = !1
9288                                } else break;
9289                            else if (c > e[b].startValue - e[b - 1].endValue) {
9290                                c -= e[b].startValue - e[b - 1].endValue;
9291                                if (c < e[b].size) {
9292                                    a += (e[b].endValue -
9293                                        e[b].startValue) * (0 === e[b].size ? 1 : c / e[b].size) - c;
9294                                    break
9295                                } else a += e[b].endValue - e[b].startValue - e[b].size;
9296                                c -= e[b].size
9297                            } else break
9298                    } else
9299                    for (b = e.length - 1; 0 <= b; b--)
9300                        if (!(e[b].startValue > this.conversionParameters.minimum))
9301                            if (f)
9302                                if (e[b].endValue > this.conversionParameters.minimum)
9303                                    if (e[b].size && this.conversionParameters.minimum + c * (e[b].endValue - e[b].startValue) / e[b].size > e[b].startValue) {
9304                                        a = 0 >= e[b].size ? 0 : c * (e[b].endValue - e[b].startValue) / e[b].size;
9305                                        break
9306                                    } else a += e[b].startValue - this.conversionParameters.minimum +
9307                                        e[b].size * (this.conversionParameters.minimum - e[b].startValue) / (e[b].endValue - e[b].startValue), c += e[b].size * (this.conversionParameters.minimum - e[b].startValue) / (e[b].endValue - e[b].startValue), f = !1;
9308                                else if (c < e[b].endValue - this.conversionParameters.minimum) {
9309                                    c -= e[b].endValue - this.conversionParameters.minimum;
9310                                    if (c > -1 * e[b].size) {
9311                                        a += (e[b].endValue - e[b].startValue) * (0 === e[b].size ? 1 : c / e[b].size) + c;
9312                                        break
9313                                    } else a -= e[b].endValue - e[b].startValue - e[b].size;
9314                                    c += e[b].size;
9315                                    f = !1
9316                                } else break;
9317                            else if (c < e[b].endValue - e[b +
9318                                1].startValue) {
9319                                c -= e[b].endValue - e[b + 1].startValue;
9320                                if (c > -1 * e[b].size) {
9321                                    a += (e[b].endValue - e[b].startValue) * (0 === e[b].size ? 1 : c / e[b].size) + c;
9322                                    break
9323                                } else a -= e[b].endValue - e[b].startValue - e[b].size;
9324                                c += e[b].size
9325                            } else break;
9326                f = this.conversionParameters.minimum + a
9327            }
9328            return f
9329        };
9330        C.prototype.convertValueToPixel = function(a) {
9331            a = this.getApparentDifference(this.conversionParameters.minimum, a, a);
9332            return this.logarithmic ? this.conversionParameters.reference + this.conversionParameters.pixelPerUnit * Math.log(a / this.conversionParameters.minimum) /
9333                this.conversionParameters.lnLogarithmBase + 0.5 << 0 : this.conversionParameters.reference + this.conversionParameters.pixelPerUnit * (a - this.conversionParameters.minimum) + 0.5 << 0
9334        };
9335        C.prototype.getApparentDifference = function(a, f, b, c) {
9336            var e = this.scaleBreaks ? this.scaleBreaks._appliedBreaks : [];
9337            if (this.logarithmic) {
9338                b = y(b) ? f / a : b;
9339                for (var g = 0; g < e.length && !(f < e[g].startValue); g++) a > e[g].endValue || (a <= e[g].startValue && f >= e[g].endValue ? b = b / e[g].endValue * e[g].startValue * e[g].size : a >= e[g].startValue && f >= e[g].endValue ? b =
9340                    b / e[g].endValue * a * Math.pow(e[g].size, Math.log(e[g].endValue / a) / Math.log(e[g].endValue / e[g].startValue)) : a <= e[g].startValue && f <= e[g].endValue ? b = b / f * e[g].startValue * Math.pow(e[g].size, Math.log(f / e[g].startValue) / Math.log(e[g].endValue / e[g].startValue)) : !c && (a > e[g].startValue && f < e[g].endValue) && (b = a * Math.pow(e[g].size, Math.log(f / a) / Math.log(e[g].endValue / e[g].startValue))))
9341            } else
9342                for (b = y(b) ? Math.abs(f - a) : b, g = 0; g < e.length && !(f < e[g].startValue); g++) a > e[g].endValue || (a <= e[g].startValue && f >= e[g].endValue ?
9343                    b = b - e[g].endValue + e[g].startValue + e[g].size : a > e[g].startValue && f >= e[g].endValue ? b = b - e[g].endValue + a + e[g].size * (e[g].endValue - a) / (e[g].endValue - e[g].startValue) : a <= e[g].startValue && f < e[g].endValue ? b = b - f + e[g].startValue + e[g].size * (f - e[g].startValue) / (e[g].endValue - e[g].startValue) : !c && (a > e[g].startValue && f < e[g].endValue) && (b = a + e[g].size * (f - a) / (e[g].endValue - e[g].startValue)));
9344            return b
9345        };
9346        C.prototype.setViewPortRange = function(a, f) {
9347            this.sessionVariables.newViewportMinimum = this.viewportMinimum = Math.min(a,
9348                f);
9349            this.sessionVariables.newViewportMaximum = this.viewportMaximum = Math.max(a, f)
9350        };
9351        C.prototype.getXValueAt = function(a) {
9352            if (!a) return null;
9353            var f = null;
9354            "left" === this._position ? f = this.convertPixelToValue(a.y) : "bottom" === this._position && (f = this.convertPixelToValue(a.x));
9355            return f
9356        };
9357        C.prototype.calculateValueToPixelConversionParameters = function(a) {
9358            a = this.scaleBreaks ? this.scaleBreaks._appliedBreaks : [];
9359            var f = {
9360                    pixelPerUnit: null,
9361                    minimum: null,
9362                    reference: null
9363                },
9364                b = this.lineCoordinates.width,
9365                c = this.lineCoordinates.height,
9366                b = "bottom" === this._position || "top" === this._position ? b : c,
9367                c = Math.abs(this.range);
9368            if (this.logarithmic)
9369                for (var e = 0; e < a.length && !(this.viewportMaximum < a[e].startValue); e++) this.viewportMinimum > a[e].endValue || (this.viewportMinimum >= a[e].startValue && this.viewportMaximum <= a[e].endValue ? b = 0 : this.viewportMinimum <= a[e].startValue && this.viewportMaximum >= a[e].endValue ? (c = c / a[e].endValue * a[e].startValue, b = 0 < a[e].spacing.toString().indexOf("%") ? b * (1 - parseFloat(a[e].spacing) / 100) : b - Math.min(a[e].spacing, 0.1 * b)) :
9370                    this.viewportMinimum > a[e].startValue && this.viewportMaximum >= a[e].endValue ? (c = c / a[e].endValue * this.viewportMinimum, b = 0 < a[e].spacing.toString().indexOf("%") ? b * (1 - parseFloat(a[e].spacing) / 100 * Math.log(a[e].endValue / this.viewportMinimum) / Math.log(a[e].endValue / a[e].startValue)) : b - Math.min(a[e].spacing, 0.1 * b) * Math.log(a[e].endValue / this.viewportMinimum) / Math.log(a[e].endValue / a[e].startValue)) : this.viewportMinimum <= a[e].startValue && this.viewportMaximum < a[e].endValue && (c = c / this.viewportMaximum * a[e].startValue,
9371                            b = 0 < a[e].spacing.toString().indexOf("%") ? b * (1 - parseFloat(a[e].spacing) / 100 * Math.log(this.viewportMaximum / a[e].startValue) / Math.log(a[e].endValue / a[e].startValue)) : b - Math.min(a[e].spacing, 0.1 * b) * Math.log(this.viewportMaximum / a[e].startValue) / Math.log(a[e].endValue / a[e].startValue)));
9372            else
9373                for (e = 0; e < a.length && !(this.viewportMaximum < a[e].startValue); e++) this.viewportMinimum > a[e].endValue || (this.viewportMinimum >= a[e].startValue && this.viewportMaximum <= a[e].endValue ? b = 0 : this.viewportMinimum <= a[e].startValue &&
9374                this.viewportMaximum >= a[e].endValue ? (c = c - a[e].endValue + a[e].startValue, b = 0 < a[e].spacing.toString().indexOf("%") ? b * (1 - parseFloat(a[e].spacing) / 100) : b - Math.min(a[e].spacing, 0.1 * b)) : this.viewportMinimum > a[e].startValue && this.viewportMaximum >= a[e].endValue ? (c = c - a[e].endValue + this.viewportMinimum, b = 0 < a[e].spacing.toString().indexOf("%") ? b * (1 - parseFloat(a[e].spacing) / 100 * (a[e].endValue - this.viewportMinimum) / (a[e].endValue - a[e].startValue)) : b - Math.min(a[e].spacing, 0.1 * b) * (a[e].endValue - this.viewportMinimum) /
9375                    (a[e].endValue - a[e].startValue)) : this.viewportMinimum <= a[e].startValue && this.viewportMaximum < a[e].endValue && (c = c - this.viewportMaximum + a[e].startValue, b = 0 < a[e].spacing.toString().indexOf("%") ? b * (1 - parseFloat(a[e].spacing) / 100 * (this.viewportMaximum - a[e].startValue) / (a[e].endValue - a[e].startValue)) : b - Math.min(a[e].spacing, 0.1 * b) * (this.viewportMaximum - a[e].startValue) / (a[e].endValue - a[e].startValue)));
9376            f.minimum = this.viewportMinimum;
9377            f.maximum = this.viewportMaximum;
9378            f.range = c;
9379            if ("bottom" === this._position ||
9380                "top" === this._position) this.logarithmic ? (f.lnLogarithmBase = Math.log(this.logarithmBase), f.pixelPerUnit = (this.reversed ? -1 : 1) * b * f.lnLogarithmBase / Math.log(Math.abs(c))) : f.pixelPerUnit = (this.reversed ? -1 : 1) * b / Math.abs(c), f.reference = this.reversed ? this.lineCoordinates.x2 : this.lineCoordinates.x1;
9381            if ("left" === this._position || "right" === this._position) this.logarithmic ? (f.lnLogarithmBase = Math.log(this.logarithmBase), f.pixelPerUnit = (this.reversed ? 1 : -1) * b * f.lnLogarithmBase / Math.log(Math.abs(c))) : f.pixelPerUnit =
9382                (this.reversed ? 1 : -1) * b / Math.abs(c), f.reference = this.reversed ? this.lineCoordinates.y1 : this.lineCoordinates.y2;
9383            this.conversionParameters = f
9384        };
9385        C.prototype.calculateAxisParameters = function() {
9386            if (this.logarithmic) this.calculateLogarithmicAxisParameters();
9387            else {
9388                var a = this.chart.layoutManager.getFreeSpace(),
9389                    f = !1,
9390                    b = !1;
9391                "bottom" === this._position || "top" === this._position ? (this.maxWidth = a.width, this.maxHeight = a.height) : (this.maxWidth = a.height, this.maxHeight = a.width);
9392                var a = "axisX" === this.type ? "xySwapped" === this.chart.plotInfo.axisPlacement ?
9393                        62 : 70 : "xySwapped" === this.chart.plotInfo.axisPlacement ? 50 : 40,
9394                    c = 4;
9395                "axisX" === this.type && (c = 600 > this.maxWidth ? 8 : 6);
9396                var a = Math.max(c, Math.floor(this.maxWidth / a)),
9397                    e, g, h, c = 0;
9398                !y(this.options.viewportMinimum) && (!y(this.options.viewportMaximum) && this.options.viewportMinimum >= this.options.viewportMaximum) && (this.viewportMinimum = this.viewportMaximum = null);
9399                if (y(this.options.viewportMinimum) && !y(this.sessionVariables.newViewportMinimum) && !isNaN(this.sessionVariables.newViewportMinimum)) this.viewportMinimum = this.sessionVariables.newViewportMinimum;
9400                else if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) this.viewportMinimum = this.minimum;
9401                if (y(this.options.viewportMaximum) && !y(this.sessionVariables.newViewportMaximum) && !isNaN(this.sessionVariables.newViewportMaximum)) this.viewportMaximum = this.sessionVariables.newViewportMaximum;
9402                else if (null === this.viewportMaximum || isNaN(this.viewportMaximum)) this.viewportMaximum = this.maximum;
9403                if (this.scaleBreaks)
9404                    for (c = 0; c < this.scaleBreaks._appliedBreaks.length; c++)
9405                        if ((!y(this.sessionVariables.newViewportMinimum) &&
9406                            this.sessionVariables.newViewportMinimum >= this.scaleBreaks._appliedBreaks[c].startValue || !y(this.options.minimum) && this.options.minimum >= this.scaleBreaks._appliedBreaks[c].startValue || !y(this.options.viewportMinimum) && this.viewportMinimum >= this.scaleBreaks._appliedBreaks[c].startValue) && (!y(this.sessionVariables.newViewportMaximum) && this.sessionVariables.newViewportMaximum <= this.scaleBreaks._appliedBreaks[c].endValue || !y(this.options.maximum) && this.options.maximum <= this.scaleBreaks._appliedBreaks[c].endValue ||
9407                            !y(this.options.viewportMaximum) && this.viewportMaximum <= this.scaleBreaks._appliedBreaks[c].endValue)) {
9408                            this.scaleBreaks._appliedBreaks.splice(c, 1);
9409                            break
9410                        }
9411                if ("axisX" === this.type) {
9412                    if (this.dataSeries && 0 < this.dataSeries.length)
9413                        for (e = 0; e < this.dataSeries.length; e++) "dateTime" === this.dataSeries[e].xValueType && (b = !0);
9414                    e = null !== this.viewportMinimum ? this.viewportMinimum : this.dataInfo.viewPortMin;
9415                    g = null !== this.viewportMaximum ? this.viewportMaximum : this.dataInfo.viewPortMax;
9416                    0 === g - e && (c = "undefined" === typeof this.options.interval ?
9417                        0.4 : this.options.interval, g += c, e -= c);
9418                    Infinity !== this.dataInfo.minDiff ? h = this.dataInfo.minDiff : 1 < g - e ? h = 0.5 * Math.abs(g - e) : (h = 1, b && (f = !0))
9419                } else "axisY" === this.type && (e = null !== this.viewportMinimum ? this.viewportMinimum : this.dataInfo.viewPortMin, g = null !== this.viewportMaximum ? this.viewportMaximum : this.dataInfo.viewPortMax, isFinite(e) || isFinite(g) ? isFinite(e) ? isFinite(g) || (g = e) : e = g : (g = "undefined" === typeof this.options.interval ? -Infinity : this.options.interval, e = "undefined" !== typeof this.options.interval || isFinite(this.dataInfo.minDiff) ?
9420                    0 : Infinity), 0 === e && 0 === g ? (g += 9, e = 0) : 0 === g - e ? (c = Math.min(Math.abs(0.01 * Math.abs(g)), 5), g += c, e -= c) : e > g ? (c = Math.min(0.01 * Math.abs(this.getApparentDifference(g, e, null, !0)), 5), 0 <= g ? e = g - c : g = isFinite(e) ? e + c : 0) : (c = Math.min(0.01 * Math.abs(this.getApparentDifference(e, g, null, !0)), 0.05), 0 !== g && (g += c), 0 !== e && (e -= c)), h = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : 1 < g - e ? 0.5 * Math.abs(g - e) : 1, this.includeZero && (null === this.viewportMinimum || isNaN(this.viewportMinimum)) && 0 < e && (e = 0), this.includeZero && (null ===
9421                this.viewportMaximum || isNaN(this.viewportMaximum)) && 0 > g && (g = 0));
9422                c = this.getApparentDifference(isNaN(this.viewportMinimum) || null === this.viewportMinimum ? e : this.viewportMinimum, isNaN(this.viewportMaximum) || null === this.viewportMaximum ? g : this.viewportMaximum, null, !0);
9423                if ("axisX" === this.type && b) {
9424                    this.intervalType || (c / 1 <= a ? (this.interval = 1, this.intervalType = "millisecond") : c / 2 <= a ? (this.interval = 2, this.intervalType = "millisecond") : c / 5 <= a ? (this.interval = 5, this.intervalType = "millisecond") : c / 10 <= a ? (this.interval =
9425                        10, this.intervalType = "millisecond") : c / 20 <= a ? (this.interval = 20, this.intervalType = "millisecond") : c / 50 <= a ? (this.interval = 50, this.intervalType = "millisecond") : c / 100 <= a ? (this.interval = 100, this.intervalType = "millisecond") : c / 200 <= a ? (this.interval = 200, this.intervalType = "millisecond") : c / 250 <= a ? (this.interval = 250, this.intervalType = "millisecond") : c / 300 <= a ? (this.interval = 300, this.intervalType = "millisecond") : c / 400 <= a ? (this.interval = 400, this.intervalType = "millisecond") : c / 500 <= a ? (this.interval = 500, this.intervalType =
9426                        "millisecond") : c / (1 * U.secondDuration) <= a ? (this.interval = 1, this.intervalType = "second") : c / (2 * U.secondDuration) <= a ? (this.interval = 2, this.intervalType = "second") : c / (5 * U.secondDuration) <= a ? (this.interval = 5, this.intervalType = "second") : c / (10 * U.secondDuration) <= a ? (this.interval = 10, this.intervalType = "second") : c / (15 * U.secondDuration) <= a ? (this.interval = 15, this.intervalType = "second") : c / (20 * U.secondDuration) <= a ? (this.interval = 20, this.intervalType = "second") : c / (30 * U.secondDuration) <= a ? (this.interval = 30, this.intervalType =
9427                        "second") : c / (1 * U.minuteDuration) <= a ? (this.interval = 1, this.intervalType = "minute") : c / (2 * U.minuteDuration) <= a ? (this.interval = 2, this.intervalType = "minute") : c / (5 * U.minuteDuration) <= a ? (this.interval = 5, this.intervalType = "minute") : c / (10 * U.minuteDuration) <= a ? (this.interval = 10, this.intervalType = "minute") : c / (15 * U.minuteDuration) <= a ? (this.interval = 15, this.intervalType = "minute") : c / (20 * U.minuteDuration) <= a ? (this.interval = 20, this.intervalType = "minute") : c / (30 * U.minuteDuration) <= a ? (this.interval = 30, this.intervalType =
9428                        "minute") : c / (1 * U.hourDuration) <= a ? (this.interval = 1, this.intervalType = "hour") : c / (2 * U.hourDuration) <= a ? (this.interval = 2, this.intervalType = "hour") : c / (3 * U.hourDuration) <= a ? (this.interval = 3, this.intervalType = "hour") : c / (6 * U.hourDuration) <= a ? (this.interval = 6, this.intervalType = "hour") : c / (1 * U.dayDuration) <= a ? (this.interval = 1, this.intervalType = "day") : c / (2 * U.dayDuration) <= a ? (this.interval = 2, this.intervalType = "day") : c / (4 * U.dayDuration) <= a ? (this.interval = 4, this.intervalType = "day") : c / (1 * U.weekDuration) <= a ? (this.interval =
9429                        1, this.intervalType = "week") : c / (2 * U.weekDuration) <= a ? (this.interval = 2, this.intervalType = "week") : c / (3 * U.weekDuration) <= a ? (this.interval = 3, this.intervalType = "week") : c / (1 * U.monthDuration) <= a ? (this.interval = 1, this.intervalType = "month") : c / (2 * U.monthDuration) <= a ? (this.interval = 2, this.intervalType = "month") : c / (3 * U.monthDuration) <= a ? (this.interval = 3, this.intervalType = "month") : c / (6 * U.monthDuration) <= a ? (this.interval = 6, this.intervalType = "month") : (this.interval = c / (1 * U.yearDuration) <= a ? 1 : c / (2 * U.yearDuration) <=
9430                    a ? 2 : c / (4 * U.yearDuration) <= a ? 4 : Math.floor(C.getNiceNumber(c / (a - 1), !0) / U.yearDuration), this.intervalType = "year"));
9431                    if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) this.viewportMinimum = e - h / 2;
9432                    if (null === this.viewportMaximum || isNaN(this.viewportMaximum)) this.viewportMaximum = g + h / 2;
9433                    f ? this.autoValueFormatString = "MMM DD YYYY HH:mm" : "year" === this.intervalType ? this.autoValueFormatString = "YYYY" : "month" === this.intervalType ? this.autoValueFormatString = "MMM YYYY" : "week" === this.intervalType ? this.autoValueFormatString =
9434                        "MMM DD YYYY" : "day" === this.intervalType ? this.autoValueFormatString = "MMM DD YYYY" : "hour" === this.intervalType ? this.autoValueFormatString = "hh:mm TT" : "minute" === this.intervalType ? this.autoValueFormatString = "hh:mm TT" : "second" === this.intervalType ? this.autoValueFormatString = "hh:mm:ss TT" : "millisecond" === this.intervalType && (this.autoValueFormatString = "fff'ms'");
9435                    this.valueFormatString || (this.valueFormatString = this.autoValueFormatString)
9436                } else {
9437                    this.intervalType = "number";
9438                    c = C.getNiceNumber(c, !1);
9439                    this.interval =
9440                        this.options && 0 < this.options.interval ? this.options.interval : C.getNiceNumber(c / (a - 1), !0);
9441                    if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) this.viewportMinimum = "axisX" === this.type ? e - h / 2 : Math.floor(e / this.interval) * this.interval;
9442                    if (null === this.viewportMaximum || isNaN(this.viewportMaximum)) this.viewportMaximum = "axisX" === this.type ? g + h / 2 : Math.ceil(g / this.interval) * this.interval;
9443                    0 === this.viewportMaximum && 0 === this.viewportMinimum && (0 === this.options.viewportMinimum ? this.viewportMaximum += 10 : 0 === this.options.viewportMaximum &&
9444                        (this.viewportMinimum -= 10), this.options && "undefined" === typeof this.options.interval && (this.interval = C.getNiceNumber((this.viewportMaximum - this.viewportMinimum) / (a - 1), !0)))
9445                }
9446                if (null === this.minimum || null === this.maximum)
9447                    if ("axisX" === this.type ? (e = null !== this.minimum ? this.minimum : this.dataInfo.min, g = null !== this.maximum ? this.maximum : this.dataInfo.max, 0 === g - e && (c = "undefined" === typeof this.options.interval ? 0.4 : this.options.interval, g += c, e -= c), h = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : 1 < g - e ?
9448                            0.5 * Math.abs(g - e) : 1) : "axisY" === this.type && (e = null !== this.minimum ? this.minimum : this.dataInfo.min, g = null !== this.maximum ? this.maximum : this.dataInfo.max, isFinite(e) || isFinite(g) ? 0 === e && 0 === g ? (g += 9, e = 0) : 0 === g - e ? (c = Math.min(Math.abs(0.01 * Math.abs(g)), 5), g += c, e -= c) : e > g ? (c = Math.min(0.01 * Math.abs(this.getApparentDifference(g, e, null, !0)), 5), 0 <= g ? e = g - c : g = isFinite(e) ? e + c : 0) : (c = Math.min(0.01 * Math.abs(this.getApparentDifference(e, g, null, !0)), 0.05), 0 !== g && (g += c), 0 !== e && (e -= c)) : (g = "undefined" === typeof this.options.interval ?
9449                                -Infinity : this.options.interval, e = "undefined" !== typeof this.options.interval || isFinite(this.dataInfo.minDiff) ? 0 : Infinity), h = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : 1 < g - e ? 0.5 * Math.abs(g - e) : 1, this.includeZero && (null === this.minimum || isNaN(this.minimum)) && 0 < e && (e = 0), this.includeZero && (null === this.maximum || isNaN(this.maximum)) && 0 > g && (g = 0)), Math.abs(this.getApparentDifference(e, g, null, !0)), "axisX" === this.type && b) {
9450                        this.valueType = "dateTime";
9451                        if (null === this.minimum || isNaN(this.minimum)) this.minimum =
9452                            e - h / 2;
9453                        if (null === this.maximum || isNaN(this.maximum)) this.maximum = g + h / 2
9454                    } else this.intervalType = this.valueType = "number", null === this.minimum && (this.minimum = "axisX" === this.type ? e - h / 2 : Math.floor(e / this.interval) * this.interval, this.minimum = Math.min(this.minimum, null === this.sessionVariables.viewportMinimum || isNaN(this.sessionVariables.viewportMinimum) ? Infinity : this.sessionVariables.viewportMinimum)), null === this.maximum && (this.maximum = "axisX" === this.type ? g + h / 2 : Math.
9454ceil(g / this.interval) * this.interval, this.maximum =
9455                        Math.max(this.maximum, null === this.sessionVariables.viewportMaximum || isNaN(this.sessionVariables.viewportMaximum) ? -Infinity : this.sessionVariables.viewportMaximum)), 0 === this.maximum && 0 === this.minimum && (0 === this.options.minimum ? this.maximum += 10 : 0 === this.options.maximum && (this.minimum -= 10));
9456                y(this.sessionVariables.newViewportMinimum) && (this.viewportMinimum = Math.max(this.viewportMinimum, this.minimum));
9457                y(this.sessionVariables.newViewportMaximum) && (this.viewportMaximum = Math.min(this.viewportMaximum, this.maximum));
9458                this.range = this.viewportMaximum - this.viewportMinimum;
9459                this.intervalStartPosition = "axisX" === this.type && b ? this.getLabelStartPoint(new Date(this.viewportMinimum), this.intervalType, this.interval) : Math.floor((this.viewportMinimum + 0.2 * this.interval) / this.interval) * this.interval;
9460                this.valueFormatString || (this.valueFormatString = C.generateValueFormatString(this.range, 2))
9461            }
9462        };
9463        C.prototype.calculateLogarithmicAxisParameters = function() {
9464            var a = this.chart.layoutManager.getFreeSpace(),
9465                f = Math.log(this.logarithmBase),
9466                b;
9467            "bottom" === this._position || "top" === this._position ? (this.maxWidth = a.width, this.maxHeight = a.height) : (this.maxWidth = a.height, this.maxHeight = a.width);
9468            var a = "axisX" === this.type ? 500 > this.maxWidth ? 7 : Math.max(7, Math.floor(this.maxWidth / 100)) : Math.max(Math.floor(this.maxWidth / 50), 3),
9469                c, e, g, h;
9470            h = 1;
9471            if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) this.viewportMinimum = this.minimum;
9472            if (null === this.viewportMaximum || isNaN(this.viewportMaximum)) this.viewportMaximum = this.maximum;
9473            if (this.scaleBreaks)
9474                for (h =
9475                         0; h < this.scaleBreaks._appliedBreaks.length; h++)
9476                    if ((!y(this.sessionVariables.newViewportMinimum) && this.sessionVariables.newViewportMinimum >= this.scaleBreaks._appliedBreaks[h].startValue || !y(this.options.minimum) && this.options.minimum >= this.scaleBreaks._appliedBreaks[h].startValue || !y(this.options.viewportMinimum) && this.viewportMinimum >= this.scaleBreaks._appliedBreaks[h].startValue) && (!y(this.sessionVariables.newViewportMaximum) && this.sessionVariables.newViewportMaximum <= this.scaleBreaks._appliedBreaks[h].endValue ||
9477                        !y(this.options.maximum) && this.options.maximum <= this.scaleBreaks._appliedBreaks[h].endValue || !y(this.options.viewportMaximum) && this.viewportMaximum <= this.scaleBreaks._appliedBreaks[h].endValue)) {
9478                        this.scaleBreaks._appliedBreaks.splice(h, 1);
9479                        break
9480                    }
9481            "axisX" === this.type ? (c = null !== this.viewportMinimum ? this.viewportMinimum : this.dataInfo.viewPortMin, e = null !== this.viewportMaximum ? this.viewportMaximum : this.dataInfo.viewPortMax, 1 === e / c && (h = Math.pow(this.logarithmBase, "undefined" === typeof this.options.interval ?
9482                0.4 : this.options.interval), e *= h, c /= h), g = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : e / c > this.logarithmBase ? e / c * Math.pow(this.logarithmBase, 0.5) : this.logarithmBase) : "axisY" === this.type && (c = null !== this.viewportMinimum ? this.viewportMinimum : this.dataInfo.viewPortMin, e = null !== this.viewportMaximum ? this.viewportMaximum : this.dataInfo.viewPortMax, 0 >= c && !isFinite(e) ? (e = "undefined" === typeof this.options.interval ? 0 : this.options.interval, c = 1) : 0 >= c ? c = e : isFinite(e) || (e = c), 1 === c && 1 === e ? (e *= this.logarithmBase -
9483                    1 / this.logarithmBase, c = 1) : 1 === e / c ? (h = Math.min(e * Math.pow(this.logarithmBase, 0.01), Math.pow(this.logarithmBase, 5)), e *= h, c /= h) : c > e ? (h = Math.min(c / e * Math.pow(this.logarithmBase, 0.01), Math.pow(this.logarithmBase, 5)), 1 <= e ? c = e / h : e = c * h) : (h = Math.min(e / c * Math.pow(this.logarithmBase, 0.01), Math.pow(this.logarithmBase, 0.04)), 1 !== e && (e *= h), 1 !== c && (c /= h)), g = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : e / c > this.logarithmBase ? e / c * Math.pow(this.logarithmBase, 0.5) : this.logarithmBase, this.includeZero && (null ===
9484                this.viewportMinimum || isNaN(this.viewportMinimum)) && 1 < c && (c = 1), this.includeZero && (null === this.viewportMaximum || isNaN(this.viewportMaximum)) && 1 > e && (e = 1));
9485            h = (isNaN(this.viewportMaximum) || null === this.viewportMaximum ? e : this.viewportMaximum) / (isNaN(this.viewportMinimum) || null === this.viewportMinimum ? c : this.viewportMinimum);
9486            linearRange = (isNaN(this.viewportMaximum) || null === this.viewportMaximum ? e : this.viewportMaximum) - (isNaN(this.viewportMinimum) || null === this.viewportMinimum ? c : this.viewportMinimum);
9487            this.intervalType =
9488                "number";
9489            h = Math.pow(this.logarithmBase, C.getNiceNumber(Math.abs(Math.log(h) / f), !1));
9490            this.options && 0 < this.options.interval ? this.interval = this.options.interval : (this.interval = C.getNiceExponent(Math.log(h) / f / (a - 1), !0), b = C.getNiceNumber(linearRange / (a - 1), !0));
9491            if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) this.viewportMinimum = "axisX" === this.type ? c / Math.sqrt(g) : Math.pow(this.logarithmBase, this.interval * Math.floor(Math.log(c) / f / this.interval));
9492            if (null === this.viewportMaximum || isNaN(this.viewportMaximum)) this.viewportMaximum =
9493                "axisX" === this.type ? e * Math.sqrt(g) : Math.pow(this.logarithmBase, this.interval * Math.ceil(Math.log(e) / f / this.interval));
9494            1 === this.viewportMaximum && 1 === this.viewportMinimum && (1 === this.options.viewportMinimum ? this.viewportMaximum *= this.logarithmBase - 1 / this.logarithmBase : 1 === this.options.viewportMaximum && (this.viewportMinimum /= this.logarithmBase - 1 / this.logarithmBase), this.options && "undefined" === typeof this.options.interval && (this.interval = C.getNiceExponent(Math.ceil(Math.log(h) / f) / (a - 1)), b = C.getNiceNumber((this.viewportMaximum -
9495                this.viewportMinimum) / (a - 1), !0)));
9496            if (null === this.minimum || null === this.maximum) "axisX" === this.type ? (c = null !== this.minimum ? this.minimum : this.dataInfo.min, e = null !== this.maximum ? this.maximum : this.dataInfo.max, 1 === e / c && (h = Math.pow(this.logarithmBase, "undefined" === typeof this.options.interval ? 0.4 : this.options.interval), e *= h, c /= h), g = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : e / c > this.logarithmBase ? e / c * Math.pow(this.logarithmBase, 0.5) : this.logarithmBase) : "axisY" === this.type && (c = null !== this.minimum ?
9497                    this.minimum : this.dataInfo.min, e = null !== this.maximum ? this.maximum : this.dataInfo.max, isFinite(c) || isFinite(e) ? 1 === c && 1 === e ? (e *= this.logarithmBase, c /= this.logarithmBase) : 1 === e / c ? (h = Math.pow(this.logarithmBase, this.interval), e *= h, c /= h) : c > e ? (h = Math.min(0.01 * (c / e), 5), 1 <= e ? c = e / h : e = c * h) : (h = Math.min(e / c * Math.pow(this.logarithmBase, 0.01), Math.pow(this.logarithmBase, 0.04)), 1 !== e && (e *= h), 1 !== c && (c /= h)) : (e = "undefined" === typeof this.options.interval ? 0 : this.options.interval, c = 1), g = Infinity !== this.dataInfo.minDiff ?
9498                    this.dataInfo.minDiff : e / c > this.logarithmBase ? e / c * Math.pow(this.logarithmBase, 0.5) : this.logarithmBase, this.includeZero && (null === this.minimum || isNaN(this.minimum)) && 1 < c && (c = 1), this.includeZero && (null === this.maximum || isNaN(this.maximum)) && 1 > e && (e = 1)), this.intervalType = "number", null === this.minimum && (this.minimum = "axisX" === this.type ? c / Math.sqrt(g) : Math.pow(this.logarithmBase, this.interval * Math.floor(Math.log(c) / f / this.interval)), this.minimum = Math.min(this.minimum, null === this.sessionVariables.viewportMinimum ||
9499            isNaN(this.sessionVariables.viewportMinimum) ? "undefined" === typeof this.sessionVariables.newViewportMinimum ? Infinity : this.sessionVariables.newViewportMinimum : this.sessionVariables.viewportMinimum)), null === this.maximum && (this.maximum = "axisX" === this.type ? e * Math.sqrt(g) : Math.pow(this.logarithmBase, this.interval * Math.ceil(Math.log(e) / f / this.interval)), this.maximum = Math.max(this.maximum, null === this.sessionVariables.viewportMaximum || isNaN(this.sessionVariables.viewportMaximum) ? "undefined" === typeof this.sessionVariables.newViewportMaximum ?
9500                0 : this.sessionVariables.newViewportMaximum : this.sessionVariables.viewportMaximum)), 1 === this.maximum && 1 === this.minimum && (1 === this.options.minimum ? this.maximum *= this.logarithmBase - 1 / this.logarithmBase : 1 === this.options.maximum && (this.minimum /= this.logarithmBase - 1 / this.logarithmBase));
9501            this.viewportMinimum = Math.max(this.viewportMinimum, this.minimum);
9502            this.viewportMaximum = Math.min(this.viewportMaximum, this.maximum);
9503            this.viewportMinimum > this.viewportMaximum && (!this.options.viewportMinimum && !this.options.minimum ||
9504            this.options.viewportMaximum || this.options.maximum ? this.options.viewportMinimum || this.options.minimum || !this.options.viewportMaximum && !this.options.maximum || (this.viewportMinimum = this.minimum = (this.options.viewportMaximum || this.options.maximum) / Math.pow(this.logarithmBase, 2 * Math.ceil(this.interval))) : this.viewportMaximum = this.maximum = this.options.viewportMinimum || this.options.minimum);
9505            c = Math.pow(this.logarithmBase, Math.floor(Math.log(this.viewportMinimum) / (f * this.interval) + 0.2) * this.interval);
9506            this.range =
9507                this.viewportMaximum / this.viewportMinimum;
9508            this.noTicks = a;
9509            if (!this.options.interval && this.range < Math.pow(this.logarithmBase, 8 > this.viewportMaximum || 3 > a ? 2 : 3)) {
9510                for (f = Math.floor(this.viewportMinimum / b + 0.5) * b; f < this.viewportMinimum;) f += b;
9511                this.equidistantInterval = !1;
9512                this.intervalStartPosition = f;
9513                this.interval = b
9514            }
9514 else this.options.interval || (b = Math.ceil(this.interval), this.range > this.interval && (this.interval = b, c = Math.pow(this.logarithmBase, Math.floor(Math.log(this.viewportMinimum) / (f * this.interval) + 0.2) * this.interval))),
9515                this.equidistantInterval = !0, this.intervalStartPosition = c;
9516            if (!this.valueFormatString && (this.valueFormatString = "#,##0.##", 1 > this.viewportMinimum)) {
9517                f = Math.floor(Math.abs(Math.log(this.viewportMinimum) / Math.LN10)) + 2;
9518                if (isNaN(f) || !isFinite(f)) f = 2;
9519                if (2 < f)
9520                    for (h = 0; h < f - 2; h++) this.valueFormatString += "#"
9521            }
9522        };
9523        C.generateValueFormatString = function(a, f) {
9524            var b = "#,##0.",
9525                c = f;
9526            1 > a && (c += Math.floor(Math.abs(Math.log(a) / Math.LN10)), isNaN(c) || !isFinite(c)) && (c = f);
9527            for (var e = 0; e < c; e++) b += "#";
9528            return b
9529        };
9530        C.getNiceExponent = function(a,
9531                                     f) {
9532            var b = Math.floor(Math.log(a) / Math.LN10),
9533                c = a / Math.pow(10, b),
9534                c = 0 > b ? 1 >= c ? 1 : 5 >= c ? 5 : 10 : Math.max(Math.floor(c), 1);
9535            return Number((c * Math.pow(10, b)).toFixed(20))
9536        };
9537        C.getNiceNumber = function(a, f) {
9538            var b = Math.floor(Math.log(a) / Math.LN10),
9539                c = a / Math.pow(10, b);
9540            return Number(((f ? 1.5 > c ? 1 : 3 > c ? 2 : 7 > c ? 5 : 10 : 1 >= c ? 1 : 2 >= c ? 2 : 5 >= c ? 5 : 10) * Math.pow(10, b)).toFixed(20))
9541        };
9542        C.prototype.getLabelStartPoint = function() {
9543            var a = U[this.intervalType + "Duration"] * this.interval,
9544                a = new Date(Math.floor(this.viewportMinimum / a) * a);
9545            if ("millisecond" !==
9546                this.intervalType)
9547                if ("second" === this.intervalType) 0 < a.getMilliseconds() && (a.setSeconds(a.getSeconds() + 1), a.setMilliseconds(0));
9548                else if ("minute" === this.intervalType) {
9549                    if (0 < a.getSeconds() || 0 < a.getMilliseconds()) a.setMinutes(a.getMinutes() + 1), a.setSeconds(0), a.setMilliseconds(0)
9550                } else if ("hour" === this.intervalType) {
9551                    if (0 < a.getMinutes() || 0 < a.getSeconds() || 0 < a.getMilliseconds()) a.setHours(a.getHours() + 1), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0)
9552                } else if ("day" === this.intervalType) {
9553                    if (0 < a.getHours() ||
9554                        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)
9555                } else if ("week" === this.intervalType) {
9556                    if (0 < a.getDay() || 0 < a.getHours() || 0 < a.getMinutes() || 0 < a.getSeconds() || 0 < a.getMilliseconds()) a.setDate(a.getDate() + (7 - a.getDay())), a.setHours(0), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0)
9557                } else if ("month" === this.intervalType) {
9558                    if (1 < a.getDate() || 0 < a.getHours() || 0 < a.getMinutes() || 0 < a.getSeconds() || 0 < a.getMilliseconds()) a.setMonth(a.getMonth() +
9559                        1), a.setDate(1), a.setHours(0), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0)
9560                } 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), a.setDate(1), a.setHours(0), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0));
9561            return a
9562        };
9563        pa(P, X);
9564        pa(aa, X);
9565        aa.prototype.createUserOptions = function(a) {
9566            if ("undefined" !== typeof a || this.options._isPlaceholder) {
9567                var f = 0;
9568                this.parent.options._isPlaceholder &&
9569                this.parent.createUserOptions();
9570                this.options._isPlaceholder || (Da(this.parent[this.optionsName]), f = this.parent.options[this.optionsName].indexOf(this.options));
9571                this.options = "undefined" === typeof a ? {} : a;
9572                this.parent.options[this.optionsName][f] = this.options
9573            }
9574        };
9575        aa.prototype.render = function(a) {
9576            if (0 !== this.spacing || 0 !== this.options.lineThickness && ("undefined" !== typeof this.options.lineThickness || 0 !== this.parent.lineThickness)) {
9577                var f = this.ctx,
9578                    b = this.ctx.globalAlpha;
9579                this.ctx = a || this.ctx;
9580                this.ctx.save();
9581                this.ctx.beginPath();
9582                this.ctx.rect(this.chart.plotArea.x1, this.chart.plotArea.y1, this.chart.plotArea.width, this.chart.plotArea.height);
9583                this.ctx.clip();
9584                var c = this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.startValue),
9585                    e = this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.endValue);
9586                this.ctx.strokeStyle = this.lineColor;
9587                this.ctx.fillStyle = this.color;
9588                this.ctx.beginPath();
9589                this.ctx.globalAlpha = 1;
9590                R(this.id);
9591                var g, h, l, m, k, r;
9592                a = Math.max(this.spacing, 3);
9593                var p = Math.max(0, this.lineThickness);
9594                this.ctx.lineWidth = p;
9595                this.ctx.setLineDash &&
9596                this.ctx.setLineDash(G(this.lineDashType, p));
9597                if ("bottom" === this.scaleBreaks.parent._position || "top" === this.scaleBreaks.parent._position)
9598                    if (c = 1 === p % 2 ? (c.x << 0) + 0.5 : c.x << 0, h = 1 === p % 2 ? (e.x << 0) + 0.5 : e.x << 0, "top" === this.scaleBreaks.parent._position ? (e = this.chart.plotArea.y1, l = this.chart.plotArea.y2 + p / 2 + 0.5 << 0) : (e = this.chart.plotArea.y2, l = this.chart.plotArea.y1 - p / 2 + 0.5 << 0, a *= -1), this.bounds = {
9599                            x1: c - p / 2,
9600                            y1: e,
9601                            x2: h + p / 2,
9602                            y2: l
9603                        }, this.ctx.moveTo(c, e), "straight" === this.type || "top" === this.scaleBreaks.parent._position &&
9604                        0 >= a || "bottom" === this.scaleBreaks.parent._position && 0 <= a) this.ctx.lineTo(c, l), this.ctx.lineTo(h, l), this.ctx.lineTo(h, e);
9605                    else if ("wavy" === this.type) {
9606                        m = c;
9607                        k = e;
9608                        g = 0.5;
9609                        r = (l - k) / a / 3;
9610                        for (var n = 0; n < r; n++) this.ctx.bezierCurveTo(m + g * a, k + a, m + g * a, k + 2 * a, m, k + 3 * a), k += 3 * a, g *= -1;
9611                        this.ctx.bezierCurveTo(m + g * a, k + a, m + g * a, k + 2 * a, m, k + 3 * a);
9612                        m = h;
9613                        g *= -1;
9614                        this.ctx.lineTo(m, k);
9615                        for (n = 0; n < r; n++) this.ctx.bezierCurveTo(m + g * a, k - a, m + g * a, k - 2 * a, m, k - 3 * a), k -= 3 * a, g *= -1
9616                    } else {
9617                        if ("zigzag" === this.type) {
9618                            g = -1;
9619                            k = e + a;
9620                            m = c + a;
9621                            r = (l - k) / a / 2;
9622                            for (n = 0; n < r; n++) this.ctx.lineTo(m,
9623                                k), m += 2 * g * a, k += 2 * a, g *= -1;
9624                            this.ctx.lineTo(m, k);
9625                            m += h - c;
9626                            for (n = 0; n < r + 1; n++) this.ctx.lineTo(m, k), m += 2 * g * a, k -= 2 * a, g *= -1;
9627                            this.ctx.lineTo(m + g * a, k + a)
9628                        }
9629                    } else if ("left" === this.scaleBreaks.parent._position || "right" === this.scaleBreaks.parent._position)
9630                    if (e = 1 === p % 2 ? (e.y << 0) + 0.5 : e.y << 0, l = 1 === p % 2 ? (c.y << 0) + 0.5 : c.y << 0, "left" === this.scaleBreaks.parent._position ? (c = this.chart.plotArea.x1, h = this.chart.plotArea.x2 + p / 2 + 0.5 << 0) : (c = this.chart.plotArea.x2, h = this.chart.plotArea.x1 - p / 2 + 0.5 << 0, a *= -1), this.bounds = {
9631                            x1: c,
9632                            y1: e - p /
9633                            2,
9634                            x2: h,
9635                            y2: l + p / 2
9636                        }, this.ctx.moveTo(c, e), "straight" === this.type || "left" === this.scaleBreaks.parent._position && 0 >= a || "right" === this.scaleBreaks.parent._position && 0 <= a) this.ctx.lineTo(h, e), this.ctx.lineTo(h, l), this.ctx.lineTo(c, l);
9637                    else if ("wavy" === this.type) {
9638                        m = c;
9639                        k = e;
9640                        g = 0.5;
9641                        r = (h - m) / a / 3;
9642                        for (n = 0; n < r; n++) this.ctx.bezierCurveTo(m + a, k + g * a, m + 2 * a, k + g * a, m + 3 * a, k), m += 3 * a, g *= -1;
9643                        this.ctx.bezierCurveTo(m + a, k + g * a, m + 2 * a, k + g * a, m + 3 * a, k);
9644                        k = l;
9645                        g *= -1;
9646                        this.ctx.lineTo(m, k);
9647                        for (n = 0; n < r; n++) this.ctx.bezierCurveTo(m - a, k + g * a, m - 2 * a,
9648                            k + g * a, m - 3 * a, k), m -= 3 * a, g *= -1
9649                    } else if ("zigzag" === this.type) {
9650                        g = 1;
9651                        k = e - a;
9652                        m = c + a;
9653                        r = (h - m) / a / 2;
9654                        for (n = 0; n < r; n++) this.ctx.lineTo(m, k), k += 2 * g * a, m += 2 * a, g *= -1;
9655                        this.ctx.lineTo(m, k);
9656                        k += l - e;
9657                        for (n = 0; n < r + 1; n++) this.ctx.lineTo(m, k), k += 2 * g * a, m -= 2 * a, g *= -1;
9658                        this.ctx.lineTo(m + a, k + g * a)
9659                    }
9660                0 < p && this.ctx.stroke();
9661                this.ctx.closePath();
9662                this.ctx.globalAlpha = this.fillOpacity;
9663                this.ctx.globalCompositeOperation = "destination-over";
9664                this.ctx.fill();
9665                this.ctx.restore();
9666                this.ctx.globalAlpha = b;
9667                this.ctx = f
9668            }
9669        };
9670        pa(ga, X);
9671        ga.prototype.createUserOptions =
9672            function(a) {
9673                if ("undefined" !== typeof a || this.options._isPlaceholder) {
9674                    var f = 0;
9675                    this.parent.options._isPlaceholder && this.parent.createUserOptions();
9676                    this.options._isPlaceholder || (Da(this.parent.stripLines), f = this.parent.options.stripLines.indexOf(this.options));
9677                    this.options = "undefined" === typeof a ? {} : a;
9678                    this.parent.options.stripLines[f] = this.options
9679                }
9680            };
9681        ga.prototype.render = function() {
9682            this.ctx.save();
9683            var a = this.parent.getPixelCoordinatesOnAxis(this.value),
9684                f = Math.abs("pixel" === this._thicknessType ? this.thickness :
9685                    this.parent.conversionParameters.pixelPerUnit * this.thickness);
9686            if (0 < f) {
9687                var b = null === this.opacity ? 1 : this.opacity;
9688                this.ctx.strokeStyle = this.color;
9689                this.ctx.beginPath();
9690                var c = this.ctx.globalAlpha;
9691                this.ctx.globalAlpha = b;
9692                R(this.id);
9693                var e, g, h, l;
9694                this.ctx.lineWidth = f;
9695                this.ctx.setLineDash && this.ctx.setLineDash(G(this.lineDashType, f));
9696                if ("bottom" === this.parent._position || "top" === this.parent._position) e = g = 1 === this.ctx.lineWidth % 2 ? (a.x << 0) + 0.5 : a.x << 0, h = this.chart.plotArea.y1, l = this.chart.plotArea.y2, this.bounds = {
9697                    x1: e - f / 2,
9698                    y1: h,
9699                    x2: g + f / 2,
9700                    y2: l
9701                };
9702                else if ("left" === this.parent._position || "right" === this.parent._position) h = l = 1 === this.ctx.lineWidth % 2 ? (a.y << 0) + 0.5 : a.y << 0, e = this.chart.plotArea.x1, g = this.chart.plotArea.x2, this.bounds = {
9703                    x1: e,
9704                    y1: h - f / 2,
9705                    x2: g,
9706                    y2: l + f / 2
9707                };
9708                this.ctx.moveTo(e, h);
9709                this.ctx.lineTo(g, l);
9710                this.ctx.stroke();
9711                this.ctx.globalAlpha = c
9712            }
9713            this.ctx.restore()
9714        };
9715        pa(ia, X);
9716        ia.prototype.render = function(a, f) {
9717            var b, c, e, g, h = null,
9718                l = h = null,
9719                m = "";
9720            if (!this.valueFormatString)
9721                if ("dateTime" === this.parent.valueType) this.valueFormatString =
9722                    this.parent.valueFormatString;
9723                else {
9724                    var k = 0,
9725                        k = "xySwapped" === this.chart.plotInfo.axisPlacement ? 50 < this.parent.range ? 0 : 500 < this.chart.width && 25 > this.parent.range ? 2 : Math.floor(Math.abs(Math.log(this.parent.range) / Math.LN10)) + (5 > this.parent.range ? 2 : 10 > this.parent.range ? 1 : 0) : 50 < this.parent.range ? 0 : Math.floor(Math.abs(Math.log(this.parent.range) / Math.LN10)) + (5 > this.parent.range ? 2 : 10 > this.parent.range ? 1 : 0);
9726                    this.valueFormatString = C.generateValueFormatString(this.parent.range, k)
9727                }
9728            var l = null === this.opacity ? 1 :
9729                    this.opacity,
9730                k = Math.abs("pixel" === this._thicknessType ? this.thickness : this.parent.conversionParameters.pixelPerUnit * this.thickness),
9731                r = this.chart.overlaidCanvasCtx,
9732                p = r.globalAlpha;
9733            r.globalAlpha = l;
9734            r.beginPath();
9735            r.strokeStyle = this.color;
9736            r.lineWidth = k;
9737            r.save();
9738            this.labelFontSize = y(this.options.labelFontSize) ? this.parent.labelFontSize : this.labelFontSize;
9739            if ("left" === this.parent._position || "right" === this.parent._position) this.labelMaxWidth = y(this.options.labelMaxWidth) ? this.parent.bounds.x2 - this.parent.bounds.x1 :
9740                this.labelMaxWidth, this.labelMaxHeight = y(this.options.labelWrap) || this.labelWrap ? 3 * this.chart.height : 2 * this.labelFontSize;
9741            else if ("top" === this.parent._position || "bottom" === this.parent._position) this.labelMaxWidth = y(this.options.labelMaxWidth) ? 3 * this.chart.width : this.labelMaxWidth, this.labelMaxHeight = y(this.options.labelWrap) || this.labelWrap ? this.parent.bounds.height : 2 * this.labelFontSize;
9742            0 < k && r.setLineDash && r.setLineDash(G(this.lineDashType, k));
9743            l = new la(r, {
9744                x: 0,
9745                y: 0,
9746                padding: {
9747                    top: 2,
9748                    right: 3,
9749                    bottom: 2,
9750                    left: 4
9751                },
9752                backgroundColor: this.labelBackgroundColor,
9753                borderColor: this.labelBorderColor,
9754                borderThickness: this.labelBorderThickness,
9755                cornerRadius: this.labelCornerRadius,
9756                maxWidth: this.labelMaxWidth,
9757                maxHeight: this.labelMaxHeight,
9758                angle: this.labelAngle,
9759                text: m,
9760                horizontalAlign: "left",
9761                fontSize: this.labelFontSize,
9762                fontFamily: this.labelFontFamily,
9763                fontWeight: this.labelFontWeight,
9764                fontColor: this.labelFontColor,
9765                fontStyle: this.labelFontStyle,
9766                textBaseline: "middle"
9767            });
9768            if (this.snapToDataPoint) {
9769                var n = 0,
9770                    h = [];
9771                if ("xySwapped" === this.chart.plotInfo.axisPlacement) {
9772                    var d =
9773                        null;
9774                    if ("bottom" === this.parent._position || "top" === this.parent._position) n = this.parent.dataSeries[0].axisX.convertPixelToValue({
9775                        y: f
9776                    });
9777                    else if ("left" === this.parent._position || "right" === this.parent._position) n = this.parent.convertPixelToValue({
9778                        y: f
9779                    });
9780                    for (var q = 0; q < this.parent.dataSeries.length; q++)(d = this.parent.dataSeries[q].getDataPointAtX(n, !0)) && 0 <= d.index && (d.dataSeries = this.parent.dataSeries[q], null !== d.dataPoint.y && h.push(d));
9781                    d = null;
9782                    if (0 === h.length) return;
9783                    h.sort(function(a, b) {
9784                        return a.distance -
9785                            b.distance
9786                    });
9787                    d = Math.abs(a - this.parent.convertValueToPixel(h[0].dataPoint.y));
9788                    q = 0;
9789                    if ("rangeBar" === h[0].dataSeries.type || "error" === h[0].dataSeries.type)
9790                        for (var d = Math.abs(a - this.parent.convertValueToPixel(h[q].dataPoint.y[0])), s = 0, n = 0; n < h.length; n++)
9791                            if (h[n].dataPoint.y && h[n].dataPoint.y.length)
9792                                for (m = 0; m < h[n].dataPoint.y.length; m++) s = Math.abs(a - this.parent.convertValueToPixel(h[n].dataPoint.y[m])), s < d && (d = s, q = n);
9793                            else s = Math.abs(a - this.parent.convertValueToPixel(h[n].dataPoint.y)), s < d && (d = s, q = n);
9794                    else if ("stackedBar" ===
9795                        h[0].dataSeries.type)
9796                        for (var d = Math.abs(a - this.parent.convertValueToPixel(h[0].dataPoint.y)), v = s = 0, n = q = 0; n < h.length; n++)
9797                            if (h[n].dataPoint.y && h[n].dataPoint.y.length)
9798                                for (m = 0; m < h[n].dataPoint.y.length; m++) s = Math.abs(a - this.parent.convertValueToPixel(h[n].dataPoint.y[m])), s < d && (d = s, q = n);
9799                            else v += h[n].dataPoint.y, s = Math.abs(a - this.parent.convertValueToPixel(v)), s < d && (d = s, q = n);
9800                    else if ("stackedBar100" === h[0].dataSeries.type)
9801                        for (var d = Math.abs(a - this.parent.convertValueToPixel(h[0].dataPoint.y)), u = v = s = 0,
9802                                 n = 0; n < h.length; n++)
9803                            if (h[n].dataPoint.y && h[n].dataPoint.y.length)
9804                                for (m = 0; m < h[n].dataPoint.y.length; m++) s = Math.abs(a - this.parent.convertValueToPixel(h[n].dataPoint.y[m])), s < d && (d = s, q = n);
9805                            else v += h[n].dataPoint.y, u = h[n].dataPoint.x.getTime ? h[n].dataPoint.x.getTime() : h[n].dataPoint.x, u = 100 * (v / h[n].dataSeries.plotUnit.dataPointYSums[u]), s = Math.abs(a - this.parent.convertValueToPixel(u)), s < d && (d = s, q = n);
9806                    else
9807                        for (d = Math.abs(a - this.parent.convertValueToPixel(h[0].dataPoint.y)), n = q = s = 0; n < h.length; n++)
9808                            if (h[n].dataPoint.y &&
9809                                h[n].dataPoint.y.length)
9810                                for (m = 0; m < h[n].dataPoint.y.length; m++) s = Math.abs(a - this.parent.convertValueToPixel(h[n].dataPoint.y[m])), s < d && (d = s, q = n);
9811                            else s = Math.abs(a - this.parent.convertValueToPixel(h[n].dataPoint.y)), s < d && (d = s, q = n);
9812                    m = h[q];
9813                    if ("bottom" === this.parent._position || "top" === this.parent._position) {
9814                        b = 0;
9815                        if ("rangeBar" === this.parent.dataSeries[q].type || "error" === this.parent.dataSeries[q].type) {
9816                            d = Math.abs(a - this.parent.convertValueToPixel(m.dataPoint.y[0]));
9817                            for (n = s = 0; n < m.dataPoint.y.length; n++) s = Math.abs(a -
9818                                this.parent.convertValueToPixel(m.dataPoint.y[n])), s < d && (d = s, b = n);
9819                            h = 1 === r.lineWidth % 2 ? (this.parent.convertValueToPixel(m.dataPoint.y[b]) << 0) + 0.5 : this.parent.convertValueToPixel(m.dataPoint.y[b]) << 0;
9820                            l.text = this.labelFormatter ? this.labelFormatter({
9821                                chart: this.chart,
9822                                axis: this.parent.options,
9823                                crosshair: this.options,
9824                                value: m.dataPoint.y[b]
9825                            }) : y(this.options.label) ? W(m.dataPoint.y[b], this.valueFormatString, this.chart._cultureInfo) : this.label
9826                        } else if ("stackedBar" === this.parent.dataSeries[q].type) {
9827                            d = Math.abs(a -
9828                                this.parent.convertValueToPixel(h[0].dataPoint.y));
9829                            v = s = 0;
9830                            for (n = q; 0 <= n; n--) v += h[n].dataPoint.y, s = Math.abs(a - this.parent.convertValueToPixel(v)), s < d && (d = s, b = n);
9831                            h = 1 === r.lineWidth % 2 ? (this.parent.convertValueToPixel(v) << 0) + 0.5 : this.parent.convertValueToPixel(v) << 0;
9832                            l.text = this.labelFormatter ? this.labelFormatter({
9833                                chart: this.chart,
9834                                axis: this.parent.options,
9835                                crosshair: this.options,
9836                                value: m.dataPoint.y
9837                            }) : y(this.options.label) ? W(m.dataPoint.y, this.valueFormatString, this.chart._cultureInfo) : this.label
9838                        } else if ("stackedBar100" ===
9839                            this.parent.dataSeries[q].type) {
9840                            d = Math.abs(a - this.parent.convertValueToPixel(h[0].dataPoint.y));
9841                            u = v = s = 0;
9842                            for (n = q; 0 <= n; n--) v += h[n].dataPoint.y, u = h[n].dataPoint.x.getTime ? h[n].dataPoint.x.getTime() : h[n].dataPoint.x, u = 100 * (v / h[n].dataSeries.plotUnit.dataPointYSums[u]), s = Math.abs(a - this.parent.convertValueToPixel(u)), s < d && (d = s, b = n);
9843                            h = 1 === r.lineWidth % 2 ? (this.parent.convertValueToPixel(u) << 0) + 0.5 : this.parent.convertValueToPixel(u) << 0;
9844                            l.text = this.labelFormatter ? this.labelFormatter({
9845                                chart: this.chart,
9846                                axis: this.parent.options,
9847                                crosshair: this.options,
9848                                value: u
9849                            }) : y(this.options.label) ? W(u, this.valueFormatString, this.chart._cultureInfo) : this.label
9850                        } else h = 1 === r.lineWidth % 2 ? (this.parent.convertValueToPixel(m.dataPoint.y) << 0) + 0.5 : this.parent.convertValueToPixel(m.dataPoint.y) << 0, l.text = this.labelFormatter ? this.labelFormatter({
9851                            chart: this.chart,
9852                            axis: this.parent.options,
9853                            crosshair: this.options,
9854                            value: m.dataPoint.y
9855                        }) : y(this.options.label) ? W(m.dataPoint.y, this.valueFormatString, this.chart._cultureInfo) : this.label;
9856                        b = c = h;
9857                        e = this.chart.plotArea.y1;
9858                        g = this.chart.plotArea.y2;
9859                        this.bounds = {
9860                            x1: b - k / 2,
9861                            y1: e,
9862                            x2: c + k / 2,
9863                            y2: g
9864                        };
9865                        l.x = b - l.measureText().width / 2;
9866                        l.x + l.width > this.chart.bounds.x2 ? l.x = this.chart.bounds.x2 - l.width : l.x < this.chart.bounds.x1 && (l.x = this.chart.bounds.x1);
9867                        l.y = this.parent.lineCoordinates.y2 + l.fontSize / 2 + 2
9868                    } else if ("left" === this.parent._position || "right" === this.parent._position) {
9869                        e = g = h = 1 === r.lineWidth % 2 ? (this.parent.convertValueToPixel(m.dataPoint.x) << 0) + 0.5 : this.parent.convertValueToPixel(m.dataPoint.x) << 0;
9870                        b = this.chart.plotArea.x1;
9871                        c = this.chart.plotArea.x2;
9872                        this.bounds = {
9873                            x1: b,
9874                            y1: e - k / 2,
9875                            x2: c,
9876                            y2: g + k / 2
9877                        };
9878                        u = !1;
9879                        if (this.parent.labels)
9880                            for (h = Math.ceil(this.parent.interval), n = 0; n < this.parent.viewportMaximum; n += h)
9881                                if (this.parent.labels[n]) u = !0;
9882                                else {
9883                                    u = !1;
9884                                    break
9885                                }
9886                        if (u) {
9887                            if ("axisX" === this.parent.type)
9888                                for (n = this.parent.convertPixelToValue({
9889                                    y: f
9890                                }), d = null, q = 0; q < this.parent.dataSeries.length; q++)(d = this.parent.dataSeries[q].getDataPointAtX(n, !0)) && 0 <= d.index && (l.text = this.labelFormatter ? this.labelFormatter({
9891                                    chart: this.chart,
9892                                    axis: this.parent.options,
9893                                    crosshair: this.options,
9894                                    value: m.dataPoint.x
9895                                }) :
9896                                    y(this.options.label) ? d.dataPoint.label : this.label)
9897                        } else "dateTime" === this.parent.valueType ? l.text = this.labelFormatter ? this.labelFormatter({
9898                            chart: this.chart,
9899                            axis: this.parent.options,
9900                            crosshair: this.options,
9901                            value: m.dataPoint.x
9902                        }) : y(this.options.label) ? Ba(m.dataPoint.x, this.valueFormatString, this.chart._cultureInfo) : this.label : "number" === this.parent.valueType && (l.text = this.labelFormatter ? this.labelFormatter({
9903                                chart: this.chart,
9904                                axis: this.parent.options,
9905                                crosshair: this.options,
9906                                value: m.dataPoint.x
9907                            }) : y(this.options.label) ?
9908                                W(m.dataPoint.x, this.valueFormatString, this.chart._cultureInfo) : this.label);
9909                        l.y = g + l.fontSize / 2 - l.measureText().height / 2 + 2;
9910                        l.y - l.fontSize / 2 < this.chart.bounds.y1 ? l.y = this.chart.bounds.y1 + l.fontSize / 2 + 2 : l.y + l.measureText().height - l.fontSize / 2 > this.chart.bounds.y2 && (l.y = this.chart.bounds.y2 - l.measureText().height + l.fontSize / 2);
9911                        "left" === this.parent._position ? l.x = this.parent.lineCoordinates.x2 - l.measureText().width : "right" === this.parent._position && (l.x = this.parent.lineCoordinates.x2)
9912                    }
9913                } else if ("bottom" ===
9914                    this.parent._position || "top" === this.parent._position) {
9915                    n = this.parent.convertPixelToValue({
9916                        x: a
9917                    });
9918                    for (q = 0; q < this.parent.dataSeries.length; q++)(d = this.parent.dataSeries[q].getDataPointAtX(n, !0)) && 0 <= d.index && (d.dataSeries = this.parent.dataSeries[q], null !== d.dataPoint.y && h.push(d));
9919                    if (0 === h.length) return;
9920                    h.sort(function(a, b) {
9921                        return a.distance - b.distance
9922                    });
9923                    m = h[0];
9924                    b = c = h = 1 === r.lineWidth % 2 ? (this.parent.convertValueToPixel(m.dataPoint.x) << 0) + 0.5 : this.parent.convertValueToPixel(m.dataPoint.x) << 0;
9925                    e = this.chart.plotArea.y1;
9926                    g = this.chart.plotArea.y2;
9927                    this.bounds = {
9928                        x1: b - k / 2,
9929                        y1: e,
9930                        x2: c + k / 2,
9931                        y2: g
9932                    };
9933                    u = !1;
9934                    if (this.parent.labels)
9935                        for (h = Math.ceil(this.parent.interval), n = 0; n < this.parent.viewportMaximum; n += h)
9936                            if (this.parent.labels[n]) u = !0;
9937                            else {
9938                                u = !1;
9939                                break
9940                            }
9941                    if (u) {
9942                        if ("axisX" === this.parent.type)
9943                            for (n = this.parent.convertPixelToValue({
9944                                x: a
9945                            }), d = null, q = 0; q < this.parent.dataSeries.length; q++)(d = this.parent.dataSeries[q].getDataPointAtX(n, !0)) && 0 <= d.index && (l.text = this.labelFormatter ? this.labelFormatter({
9946                                chart: this.chart,
9947                                axis: this.parent.options,
9948                                crosshair: this.options,
9949                                value: m.dataPoint.x
9950                            }) : y(this.options.label) ? d.dataPoint.label : this.label)
9951                    } else "dateTime" === this.parent.valueType ? l.text = this.labelFormatter ? this.labelFormatter({
9952                        chart: this.chart,
9953                        axis: this.parent.options,
9954                        crosshair: this.options,
9955                        value: m.dataPoint.x
9956                    }) : y(this.options.label) ? Ba(m.dataPoint.x, this.valueFormatString, this.chart._cultureInfo) : this.label : "number" === this.parent.valueType && (l.text = this.labelFormatter ? this.labelFormatter({
9957                            chart: this.chart,
9958                            axis: this.parent.options,
9959                            crosshair: this.options,
9960                            value: m.dataPoint.x
9961                        }) : y(this.options.label) ? W(m.dataPoint.x, this.valueFormatString, this.chart._cultureInfo) : this.label);
9962                    l.x = b - l.measureText().width / 2;
9963                    l.x + l.width > this.chart.bounds.x2 && (l.x = this.chart.bounds.x2 - l.width);
9964                    l.x < this.chart.bounds.x1 && (l.x = this.chart.bounds.x1);
9965                    "bottom" === this.parent._position ? l.y = this.parent.lineCoordinates.y2 + l.fontSize / 2 + 2 : "top" === this.parent._position && (l.y = this.parent.lineCoordinates.y1 - l.height + l.fontSize / 2 + 2)
9966                } else if ("left" === this.parent._position || "right" === this.parent._position) {
9967                    !y(this.parent.dataSeries) &&
9968                    0 < this.parent.dataSeries.length && (n = this.parent.dataSeries[0].axisX.convertPixelToValue({
9969                        x: a
9970                    }));
9971                    for (q = 0; q < this.parent.dataSeries.length; q++)(d = this.parent.dataSeries[q].getDataPointAtX(n, !0)) && 0 <= d.index && (d.dataSeries = this.parent.dataSeries[q], null !== d.dataPoint.y && h.push(d));
9972                    if (0 === h.length) return;
9973                    h.sort(function(a, b) {
9974                        return a.distance - b.distance
9975                    });
9976                    q = 0;
9977                    if ("rangeColumn" === h[0].dataSeries.type || "rangeArea" === h[0].dataSeries.type || "error" === h[0].dataSeries.type || "rangeSplineArea" === h[0].dataSeries.type ||
9978                        "candlestick" === h[0].dataSeries.type || "ohlc" === h[0].dataSeries.type || "boxAndWhisker" === h[0].dataSeries.type)
9979                        for (d = Math.abs(f - this.parent.convertValueToPixel(h[0].dataPoint.y[0])), n = s = 0; n < h.length; n++)
9980                            if (h[n].dataPoint.y && h[n].dataPoint.y.length)
9981                                for (m = 0; m < h[n].dataPoint.y.length; m++) s = Math.abs(f - this.parent.convertValueToPixel(h[n].dataPoint.y[m])), s < d && (d = s, q = n);
9982                            else s = Math.abs(f - this.parent.convertValueToPixel(h[n].dataPoint.y)), s < d && (d = s, q = n);
9983                    else if ("stackedColumn" === h[0].dataSeries.type || "stackedArea" ===
9984                        h[0].dataSeries.type)
9985                        for (d = Math.abs(f - this.parent.convertValueToPixel(h[0].dataPoint.y)), n = v = s = 0; n < h.length; n++)
9986                            if (h[n].dataPoint.y && h[n].dataPoint.y.length)
9987                                for (m = 0; m < h[n].dataPoint.y.length; m++) s = Math.abs(f - this.parent.convertValueToPixel(h[n].dataPoint.y[m])), s < d && (d = s, q = n);
9988                            else v += h[n].dataPoint.y, s = Math.abs(f - this.parent.convertValueToPixel(v)), s < d && (d = s, q = n);
9989                    else if ("stackedColumn100" === h[0].dataSeries.type || "stackedArea100" === h[0].dataSeries.type)
9990                        for (d = Math.abs(f - this.parent.convertValueToPixel(h[0].dataPoint.y)),
9991                                 n = u = v = s = 0; n < h.length; n++)
9992                            if (h[n].dataPoint.y && h[n].dataPoint.y.length)
9993                                for (m = 0; m < h[n].dataPoint.y.length; m++) s = Math.abs(f - this.parent.convertValueToPixel(h[n].dataPoint.y[m])), s < d && (d = s, q = n);
9994                            else v += h[n].dataPoint.y, u = h[n].dataPoint.x.getTime ? h[n].dataPoint.x.getTime() : h[n].dataPoint.x, u = 100 * (v / h[n].dataSeries.plotUnit.dataPointYSums[u]), s = Math.abs(f - this.parent.convertValueToPixel(u)), s < d && (d = s, q = n);
9995                    else
9996                        for (d = Math.abs(f - this.parent.convertValueToPixel(h[0].dataPoint.y)), n = s = 0; n < h.length; n++)
9997                            if (h[n].dataPoint.y &&
9998                                h[n].dataPoint.y.length)
9999                                for (m = 0; m < h[n].dataPoint.y.length; m++) s = Math.abs(f - this.parent.convertValueToPixel(h[n].dataPoint.y[m])), s < d && (d = s, q = n);
10000                            else s = Math.abs(f - this.parent.convertValueToPixel(h[n].dataPoint.y)), s < d && (d = s, q = n);
10001                    m = h[q];
10002                    b = 0;
10003                    if ("rangeColumn" === this.parent.dataSeries[q].type || "rangeArea" === this.parent.dataSeries[q].type || "error" === this.parent.dataSeries[q].type || "rangeSplineArea" === this.parent.dataSeries[q].type || "candlestick" === this.parent.dataSeries[q].type || "ohlc" === this.parent.dataSeries[q].type ||
10004                        "boxAndWhisker" === this.parent.dataSeries[q].type) {
10005                        d = Math.abs(f - this.parent.convertValueToPixel(m.dataPoint.y[0]));
10006                        for (n = s = 0; n < m.dataPoint.y.length; n++) s = Math.abs(f - this.parent.convertValueToPixel(m.dataPoint.y[n])), s < d && (d = s, b = n);
10007                        h = 1 === r.lineWidth % 2 ? (this.parent.convertValueToPixel(m.dataPoint.y[b]) << 0) + 0.5 : this.parent.convertValueToPixel(m.dataPoint.y[b]) << 0;
10008                        l.text = this.labelFormatter ? this.labelFormatter({
10009                            chart: this.chart,
10010                            axis: this.parent.options,
10011                            crosshair: this.options,
10012                            value: m.dataPoint.y[b]
10013                        }) : y(this.options.label) ?
10014                            W(m.dataPoint.y[b], this.valueFormatString, this.chart._cultureInfo) : this.label
10015                    } else if ("stackedColumn" === this.parent.dataSeries[q].type || "stackedArea" === this.parent.dataSeries[q].type) {
10016                        d = Math.abs(f - this.parent.convertValueToPixel(h[0].dataPoint.y));
10017                        v = s = 0;
10018                        for (n = q; 0 <= n; n--) v += h[n].dataPoint.y, s = Math.abs(f - this.parent.convertValueToPixel(v)), s < d && (d = s, b = n);
10019                        h = 1 === r.lineWidth % 2 ? (this.parent.convertValueToPixel(v) << 0) + 0.5 : this.parent.convertValueToPixel(v) << 0;
10020                        l.text = this.labelFormatter ? this.labelFormatter({
10021                            chart: this.chart,
10022                            axis: this.parent.options,
10023                            crosshair: this.options,
10024                            value: m.dataPoint.y
10025                        }) : y(this.options.label) ? W(m.dataPoint.y, this.valueFormatString, this.chart._cultureInfo) : this.label
10026                    } else if ("stackedColumn100" === this.parent.dataSeries[q].type || "stackedArea100" === this.parent.dataSeries[q].type) {
10027                        d = Math.abs(f - this.parent.convertValueToPixel(h[0].dataPoint.y));
10028                        v = s = 0;
10029                        for (n = q; 0 <= n; n--) v += h[n].dataPoint.y, u = h[n].dataPoint.x.getTime ? h[n].dataPoint.x.getTime() : h[n].dataPoint.x, u = 100 * (v / h[n].dataSeries.plotUnit.dataPointYSums[u]),
10030                            s = Math.abs(f - this.parent.convertValueToPixel(u)), s < d && (d = s, b = n);
10031                        h = 1 === r.lineWidth % 2 ? (this.parent.convertValueToPixel(u) << 0) + 0.5 : this.parent.convertValueToPixel(u) << 0;
10032                        l.text = this.labelFormatter ? this.labelFormatter({
10033                            chart: this.chart,
10034                            axis: this.parent.options,
10035                            crosshair: this.options,
10036                            value: u
10037                        }) : y(this.options.label) ? W(u, this.valueFormatString, this.chart._cultureInfo) : this.label
10038                    } else "waterfall" === this.parent.dataSeries[q].type ? (h = 1 === r.lineWidth % 2 ? (this.parent.convertValueToPixel(m.dataSeries.dataPointEOs[m.index].cumulativeSum) <<
10039                        0) + 0.5 : this.parent.convertValueToPixel(m.dataSeries.dataPointEOs[m.index].cumulativeSum) << 0, l.text = this.labelFormatter ? this.labelFormatter({
10040                        chart: this.chart,
10041                        axis: this.parent.options,
10042                        crosshair: this.options,
10043                        value: m.dataSeries.dataPointEOs[m.index].cumulativeSum
10044                    }) : y(this.options.label) ? W(m.dataSeries.dataPointEOs[m.index].cumulativeSum, this.valueFormatString, this.chart._cultureInfo) : this.label) : (h = 1 === r.lineWidth % 2 ? (this.parent.convertValueToPixel(m.dataPoint.y) << 0) + 0.5 : this.parent.convertValueToPixel(m.dataPoint.y) <<
10045                        0, l.text = this.labelFormatter ? this.labelFormatter({
10046                        chart: this.chart,
10047                        axis: this.parent.options,
10048                        crosshair: this.options,
10049                        value: m.dataPoint.y
10050                    }) : y(this.options.label) ? W(m.dataPoint.y, this.valueFormatString, this.chart._cultureInfo) : this.label);
10051                    e = g = h;
10052                    b = this.chart.plotArea.x1;
10053                    c = this.chart.plotArea.x2;
10054                    this.bounds = {
10055                        x1: b,
10056                        y1: e - k / 2,
10057                        x2: c,
10058                        y2: g + k / 2
10059                    };
10060                    l.y = g + l.fontSize / 2 - l.measureText().height / 2 + 2;
10061                    l.y - l.fontSize / 2 < this.chart.bounds.y1 ? l.y = this.chart.bounds.y1 + l.fontSize / 2 + 2 : l.y + l.measureText().height - l.fontSize / 2 > this.chart.bounds.y2 &&
10062                        (l.y = this.chart.bounds.y2 - l.measureText().height + l.fontSize / 2);
10063                    "left" === this.parent._position ? l.x = this.parent.lineCoordinates.x2 - l.measureText().width : "right" === this.parent._position && (l.x = this.parent.lineCoordinates.x2)
10064                }
10065                h = null;
10066                ("bottom" === this.parent._position || "top" === this.parent._position) && (b >= this.parent.convertValueToPixel(this.parent.viewportMinimum) && c <= this.parent.convertValueToPixel(this.parent.viewportMaximum)) && (0 < k && (r.moveTo(b, e), r.lineTo(c, g), r.stroke()), r.restore(
10066), !y(l.text) && ("number" ===
10067                typeof l.text.valueOf() || 0 < l.text.length) && l.render(!0));
10068                ("left" === this.parent._position || "right" === this.parent._position) && (g >= this.parent.convertValueToPixel(this.parent.viewportMaximum) && e <= this.parent.convertValueToPixel(this.parent.viewportMinimum)) && (0 < k && (r.moveTo(b, e), r.lineTo(c, g), r.stroke()), r.restore(), !y(l.text) && ("number" === typeof l.text.valueOf() || 0 < l.text.length) && l.render(!0))
10069            } else {
10070                if ("bottom" === this.parent._position || "top" === this.parent._position) b = c = h = 1 === r.lineWidth % 2 ? (a << 0) + 0.5 :
10071                    a << 0, e = this.chart.plotArea.y1, g = this.chart.plotArea.y2, this.bounds = {
10072                    x1: b - k / 2,
10073                    y1: e,
10074                    x2: c + k / 2,
10075                    y2: g
10076                };
10077                else if ("left" === this.parent._position || "right" === this.parent._position) e = g = h = 1 === r.lineWidth % 2 ? (f << 0) + 0.5 : f << 0, b = this.chart.plotArea.x1, c = this.chart.plotArea.x2, this.bounds = {
10078                    x1: b,
10079                    y1: e - k / 2,
10080                    x2: c,
10081                    y2: g + k / 2
10082                };
10083                if ("xySwapped" === this.chart.plotInfo.axisPlacement)
10084                    if ("left" === this.parent._position || "right" === this.parent._position) {
10085                        u = !1;
10086                        if (this.parent.labels)
10087                            for (h = Math.ceil(this.parent.interval), n = 0; n < this.parent.viewportMaximum; n +=
10088                                h)
10089                                if (this.parent.labels[n]) u = !0;
10090                                else {
10091                                    u = !1;
10092                                    break
10093                                }
10094                        if (u) {
10095                            if ("axisX" === this.parent.type)
10096                                for (n = this.parent.convertPixelToValue({
10097                                    y: f
10098                                }), d = null, q = 0; q < this.parent.dataSeries.length; q++)(d = this.parent.dataSeries[q].getDataPointAtX(n, !0)) && 0 <= d.index && (l.text = this.labelFormatter ? this.labelFormatter({
10099                                    chart: this.chart,
10100                                    axis: this.parent.options,
10101                                    crosshair: this.options,
10102                                    value: this.parent.convertPixelToValue(a)
10103                                }) : y(this.options.label) ? d.dataPoint.label : this.label)
10104                        } else "dateTime" === this.parent.valueType ? l.text = this.labelFormatter ?
10105                            this.labelFormatter({
10106                                chart: this.chart,
10107                                axis: this.parent.options,
10108                                crosshair: this.options,
10109                                value: this.parent.convertPixelToValue(f)
10110                            }) : y(this.options.label) ? Ba(this.parent.convertPixelToValue(f), this.valueFormatString, this.chart._cultureInfo) : this.label : "number" === this.parent.valueType && (l.text = this.labelFormatter ? this.labelFormatter({
10111                                chart: this.chart,
10112                                axis: this.parent.options,
10113                                crosshair: this.options,
10114                                value: this.parent.convertPixelToValue(f)
10115                            }) : y(this.options.label) ? W(this.parent.convertPixelToValue(f), this.valueFormatString,
10116                                this.chart._cultureInfo) : this.label);
10117                        l.y = f + l.fontSize / 2 - l.measureText().height / 2 + 2;
10118                        l.y - l.fontSize / 2 < this.chart.bounds.y1 ? l.y = this.chart.bounds.y1 + l.fontSize / 2 + 2 : l.y + l.measureText().height - l.fontSize / 2 > this.chart.bounds.y2 && (l.y = this.chart.bounds.y2 - l.measureText().height + l.fontSize / 2);
10119                        "left" === this.parent._position ? l.x = this.parent.lineCoordinates.x1 - l.measureText().width : "right" === this.parent._position && (l.x = this.parent.lineCoordinates.x2)
10120                    } else {
10121                        if ("bottom" === this.parent._position || "top" === this.parent._position) l.text =
10122                            this.labelFormatter ? this.labelFormatter({
10123                                chart: this.chart,
10124                                axis: this.parent.options,
10125                                crosshair: this.options,
10126                                value: this.parent.convertPixelToValue(a)
10127                            }) : y(this.options.label) ? W(this.parent.convertPixelToValue(a), this.valueFormatString, this.chart._cultureInfo) : this.label, l.x = b - l.measureText().width / 2, l.x + l.width > this.chart.bounds.x2 && (l.x = this.chart.bounds.x2 - l.width), l.x < this.chart.bounds.x1 && (l.x = this.chart.bounds.x1), "bottom" === this.parent._position && (l.y = this.parent.lineCoordinates.y2 + l.fontSize / 2 +
10128                            2), "top" === this.parent._position && (l.y = this.parent.lineCoordinates.y1 - l.height + l.fontSize / 2 + 2)
10129                    }
10130                else if ("bottom" === this.parent._position || "top" === this.parent._position) {
10131                    u = !1;
10132                    m = "";
10133                    if (this.parent.labels)
10134                        for (h = Math.ceil(this.parent.interval), n = 0; n < this.parent.viewportMaximum; n += h)
10135                            if (this.parent.labels[n]) u = !0;
10136                            else {
10137                                u = !1;
10138                                break
10139                            }
10140                    if (u) {
10141                        if ("axisX" === this.parent.type)
10142                            for (n = this.parent.convertPixelToValue({
10143                                x: a
10144                            }), d = null, q = 0; q < this.parent.dataSeries.length; q++)(d = this.parent.dataSeries[q].getDataPointAtX(n, !0)) &&
10145                            0 <= d.index && (l.text = this.labelFormatter ? this.labelFormatter({
10146                                chart: this.chart,
10147                                axis: this.parent.options,
10148                                crosshair: this.options,
10149                                value: this.parent.convertPixelToValue(a)
10150                            }) : y(this.options.label) ? d.dataPoint.label : this.label)
10151                    } else "dateTime" === this.parent.valueType ? l.text = this.labelFormatter ? this.labelFormatter({
10152                        chart: this.chart,
10153                        axis: this.parent.options,
10154                        crosshair: this.options,
10155                        value: this.parent.convertPixelToValue(a)
10156                    }) : y(this.options.label) ? Ba(this.parent.convertPixelToValue(a), this.valueFormatString, this.chart._cultureInfo) :
10157                        this.label : "number" === this.parent.valueType && (l.text = this.labelFormatter ? this.labelFormatter({
10158                            chart: this.chart,
10159                            axis: this.parent.options,
10160                            crosshair: this.options,
10161                            value: 0 < this.parent.dataSeries.length ? this.parent.convertPixelToValue(a) : ""
10162                        }) : y(this.options.label) ? W(this.parent.convertPixelToValue(a), this.valueFormatString, this.chart._cultureInfo) : this.label);
10163                    l.x = b - l.measureText().width / 2;
10164                    l.x + l.width > this.chart.bounds.x2 && (l.x = this.chart.bounds.x2 - l.width);
10165                    l.x < this.chart.bounds.x1 && (l.x = this.chart.bounds.x1);
10166                    "bottom" === this.parent._position ? l.y = this.parent.lineCoordinates.y2 + l.fontSize / 2 + 2 : "top" === this.parent._position && (l.y = this.parent.lineCoordinates.y1 - l.height + l.fontSize / 2 + 2)
10167                } else if ("left" === this.parent._position || "right" === this.parent._position) l.text = this.labelFormatter ? this.labelFormatter({
10168                    chart: this.chart,
10169                    axis: this.parent.options,
10170                    crosshair: this.options,
10171                    value: this.parent.convertPixelToValue(f)
10172                }) : y(this.options.label) ? W(this.parent.convertPixelToValue(f), this.valueFormatString, this.chart._cultureInfo) :
10173                    this.label, l.y = f + l.fontSize / 2 - l.measureText().height / 2 + 2, l.y - l.fontSize / 2 < this.chart.bounds.y1 ? l.y = this.chart.bounds.y1 + l.fontSize / 2 + 2 : l.y + l.measureText().height - l.fontSize / 2 > this.chart.bounds.y2 && (l.y = this.chart.bounds.y2 - l.measureText().height + l.fontSize / 2), "left" === this.parent._position ? l.x = this.parent.lineCoordinates.x2 - l.measureText().width : "right" === this.parent._position && (l.x = this.parent.lineCoordinates.x2);
10174                0 < k && (r.moveTo(b, e), r.lineTo(c, g), r.stroke());
10175                r.restore();
10176                !y(l.text) && ("number" === typeof l.text.valueOf() ||
10177                0 < l.text.length) && l.render(!0)
10178            }
10179            r.globalAlpha = p
10180        };
10181        pa(Y, X);
10182        Y.prototype._initialize = function() {
10183            if (this.enabled) {
10184                this.container = document.createElement("div");
10185                this.container.setAttribute("class", "canvasjs-chart-tooltip");
10186                this.container.style.position = "absolute";
10187                this.container.style.height = "auto";
10188                this.container.style.boxShadow = "1px 1px 2px 2px rgba(0,0,0,0.1)";
10189                this.container.style.zIndex = "1000";
10190                this.container.style.pointerEvents = "none";
10191                this.container.style.display = "none";
10192                var a;
10193                a = '<div style=" width: auto;height: auto;min-width: 50px;';
10194                a += "line-height: auto;";
10195                a += "margin: 0px 0px 0px 0px;";
10196                a += "padding: 5px;";
10197                a += "font-family: Calibri, Arial, Georgia, serif;";
10198                a += "font-weight: normal;";
10199                a += "font-style: " + (v ? "italic;" : "normal;");
10200                a += "font-size: 14px;";
10201                a += "color: #000000;";
10202                a += "text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);";
10203                a += "text-align: left;";
10204                a += "border: 2px solid gray;";
10205                a += v ? "background: rgba(255,255,255,.9);" : "background: rgb(255,255,255);";
10206                a += "text-indent: 0px;";
10207                a += "white-space: nowrap;";
10208                a += "border-radius: 5px;";
10209                a += "-moz-user-select:none;";
10210                a += "-khtml-user-select: none;";
10211                a += "-webkit-user-select: none;";
10212                a += "-ms-user-select: none;";
10213                a += "user-select: none;";
10214                v || (a += "filter: alpha(opacity = 90);", a += "filter: progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#666666');");
10215                a += '} "> Sample Tooltip</div>';
10216                this.container.innerHTML = a;
10217                this.contentDiv = this.container.firstChild;
10218                this.container.style.borderRadius = this.contentDiv.style.borderRadius;
10219                this.chart._canvasJSContainer.appendChild(this.container)
10220            }
10221        };
10222        Y.prototype.mouseMoveHandler =
10223            function(a, f) {
10224                this._lastUpdated && 4 > (new Date).getTime() - this._lastUpdated || (this._lastUpdated = (new Date).getTime(), this.chart.resetOverlayedCanvas(), this._updateToolTip(a, f))
10225            };
10226        Y.prototype._updateToolTip = function(a, f, b) {
10227            b = "undefined" === typeof b ? !0 : b;
10228            this.container || this._initialize();
10229            this.enabled || this.hide();
10230            if (!this.chart.disableToolTip) {
10231                if ("undefined" === typeof a || "undefined" === typeof f) {
10232                    if (isNaN(this._prevX) || isNaN(this._prevY)) return;
10233                    a = this._prevX;
10234                    f = this._prevY
10235                } else this._prevX = a, this._prevY = f;
10236                var c = null,
10237                    e = null,
10238                    g = [],
10239                    h = 0;
10240                if (this.shared && this.enabled && "none" !== this.chart.plotInfo.axisPlacement) {
10241                    if ("xySwapped" === this.chart.plotInfo.axisPlacement) {
10242                        var l = [];
10243                        if (this.chart.axisX)
10244                            for (var m = 0; m < this.chart.axisX.length; m++) {
10245                                for (var h = this.chart.axisX[m].convertPixelToValue({
10246                                    y: f
10247                                }), k = null, c = 0; c < this.chart.axisX[m].dataSeries.length; c++)(k = this.chart.axisX[m].dataSeries[c].getDataPointAtX(h, b)) && 0 <= k.index && (k.dataSeries = this.chart.axisX[m].dataSeries[c], null !== k.dataPoint.y && l.push(k));
10248                                k = null
10249                            }
10250                        if (this.chart.axisX2)
10251                            for (m =
10252                                     0; m < this.chart.axisX2.length; m++) {
10253                                h = this.chart.axisX2[m].convertPixelToValue({
10254                                    y: f
10255                                });
10256                                k = null;
10257                                for (c = 0; c < this.chart.axisX2[m].dataSeries.length; c++)(k = this.chart.axisX2[m].dataSeries[c].getDataPointAtX(h, b)) && 0 <= k.index && (k.dataSeries = this.chart.axisX2[m].dataSeries[c], null !== k.dataPoint.y && l.push(k));
10258                                k = null
10259                            }
10260                    } else {
10261                        l = [];
10262                        if (this.chart.axisX)
10263                            for (m = 0; m < this.chart.axisX.length; m++)
10264                                for (h = this.chart.axisX[m].convertPixelToValue({
10265                                    x: a
10266                                }), k = null, c = 0; c < this.chart.axisX[m].dataSeries.length; c++)(k = this.chart.axisX[m].dataSeries[c].getDataPointAtX(h,
10267                                    b)) && 0 <= k.index && (k.dataSeries = this.chart.axisX[m].dataSeries[c], null !== k.dataPoint.y && l.push(k));
10268                        if (this.chart.axisX2)
10269                            for (m = 0; m < this.chart.axisX2.length; m++)
10270                                for (h = this.chart.axisX2[m].convertPixelToValue({
10271                                    x: a
10272                                }), k = null, c = 0; c < this.chart.axisX2[m].dataSeries.length; c++)(k = this.chart.axisX2[m].dataSeries[c].getDataPointAtX(h, b)) && 0 <= k.index && (k.dataSeries = this.chart.axisX2[m].dataSeries[c], null !== k.dataPoint.y && l.push(k))
10273                    }
10274                    if (0 === l.length) return;
10275                    l.sort(function(a, b) {
10276                        return a.distance - b.distance
10277                    });
10278                    b = l[0];
10279                    for (c = 0; c < l.length; c++) l[c].dataPoint.x.valueOf() === b.dataPoint.x.valueOf() && g.push(l[c]);
10280                    l = null
10281                } else {
10282                    if (k = this.chart.getDataPointAtXY(a, f, b)) this.currentDataPointIndex = k.dataPointIndex, this.currentSeriesIndex = k.dataSeries.index;
10283                    else if (v)
10284                        if (k = Wa(a, f, this.chart._eventManager.ghostCtx), 0 < k && "undefined" !== typeof this.chart._eventManager.objectMap[k]) {
10285                            k = this.chart._eventManager.objectMap[k];
10286                            if ("legendItem" === k.objectType) return;
10287                            this.currentSeriesIndex = k.dataSeriesIndex;
10288                            this.currentDataPointIndex = 0 <=
10289                            k.dataPointIndex ? k.dataPointIndex : -1
10290                        } else this.currentDataPointIndex = -1;
10291                    else this.currentDataPointIndex = -1;
10292                    if (0 <= this.currentSeriesIndex) {
10293                        e = this.chart.data[this.currentSeriesIndex];
10294                        k = {};
10295                        if (0 <= this.currentDataPointIndex) c = e.dataPoints[this.currentDataPointIndex], k.dataSeries = e, k.dataPoint = c, k.index = this.currentDataPointIndex, k.distance = Math.abs(c.x - h), "waterfall" === e.type && (k.cumulativeSumYStartValue = e.dataPointEOs[this.currentDataPointIndex].cumulativeSumYStartValue, k.cumulativeSum = e.dataPointEOs[this.currentDataPointIndex].cumulativeSum);
10296                        else {
10297                            if (!this.enabled || "line" !== e.type && "stepLine" !== e.type && "spline" !== e.type && "area" !== e.type && "stepArea" !== e.type && "splineArea" !== e.type && "stackedArea" !== e.type && "stackedArea100" !== e.type && "rangeArea" !== e.type && "rangeSplineArea" !== e.type && "candlestick" !== e.type && "ohlc" !== e.type && "boxAndWhisker" !== e.type) return;
10298                            h = e.axisX.convertPixelToValue({
10299                                x: a
10300                            });
10301                            k = e.getDataPointAtX(h, b);
10302                            k.dataSeries = e;
10303                            this.currentDataPointIndex = k.index;
10304                            c = k.dataPoint
10305                        }
10306                        if (!y(k.dataPoint.y))
10307                            if (k.dataSeries.axisY)
10308                                if (0 < k.dataPoint.y.length) {
10309                                    for (c =
10310                                             b = 0; c < k.dataPoint.y.length; c++) k.dataPoint.y[c] < k.dataSeries.axisY.viewportMinimum ? b-- : k.dataPoint.y[c] > k.dataSeries.axisY.viewportMaximum && b++;
10311                                    b < k.dataPoint.y.length && b > -k.dataPoint.y.length && g.push(k)
10312                                } else "column" === e.type || "bar" === e.type ? 0 > k.dataPoint.y ? 0 > k.dataSeries.axisY.viewportMinimum && k.dataSeries.axisY.viewportMaximum >= k.dataPoint.y && g.push(k) : k.dataSeries.axisY.viewportMinimum <= k.dataPoint.y && 0 <= k.dataSeries.axisY.viewportMaximum && g.push(k) : "bubble" === e.type ? (b = this.chart._eventManager.objectMap[e.dataPointIds[
10312k.index]].size /
10313                                    2, k.dataPoint.y >= k.dataSeries.axisY.viewportMinimum - b && k.dataPoint.y <= k.dataSeries.axisY.viewportMaximum + b && g.push(k)) : "waterfall" === e.type ? (b = 0, k.cumulativeSumYStartValue < k.dataSeries.axisY.viewportMinimum ? b-- : k.cumulativeSumYStartValue > k.dataSeries.axisY.viewportMaximum && b++, k.cumulativeSum < k.dataSeries.axisY.viewportMinimum ? b-- : k.cumulativeSum > k.dataSeries.axisY.viewportMaximum && b++, 2 > b && -2 < b && g.push(k)) : (0 <= k.dataSeries.type.indexOf("100") || "stackedColumn" === e.type || "stackedBar" === e.type || k.dataPoint.y >=
10314                                    k.dataSeries.axisY.viewportMinimum && k.dataPoint.y <= k.dataSeries.axisY.viewportMaximum) && g.push(k);
10315                            else g.push(k)
10316                    }
10317                }
10318                if (0 < g.length && (this.highlightObjects(g), this.enabled))
10319                    if (b = "", b = this.getToolTipInnerHTML({
10320                            entries: g
10321                        }), null !== b) {
10322                        this.contentDiv.innerHTML = b;
10323                        b = !1;
10324                        "none" === this.container.style.display && (b = !0, this.container.style.display = "block");
10325                        try {
10326                            this.contentDiv.style.background = this.backgroundColor ? this.backgroundColor : v ? "rgba(255,255,255,.9)" : "rgb(255,255,255)", this.borderColor = "waterfall" === g[0].dataSeries.type ?
10327                                this.contentDiv.style.borderRightColor = this.contentDiv.style.borderLeftColor = this.contentDiv.style.borderColor = this.options.borderColor ? this.options.borderColor : g[0].dataPoint.color ? g[0].dataPoint.color : -1 < g[0].dataPoint.y ? g[0].dataSeries.risingColor : g[0].dataSeries.fallingColor : "error" === g[0].dataSeries.type ? this.contentDiv.style.borderRightColor = this.contentDiv.style.borderLeftColor = this.contentDiv.style.borderColor = this.options.borderColor ? this.options.borderColor : g[0].dataSeries.color ? g[0].dataSeries.color :
10328                                    g[0].dataSeries._colorSet[e.index % g[0].dataSeries._colorSet.length] : this.contentDiv.style.borderRightColor = this.contentDiv.style.borderLeftColor = this.contentDiv.style.borderColor = this.options.borderColor ? this.options.borderColor : g[0].dataPoint.color ? g[0].dataPoint.color : g[0].dataSeries.color ? g[0].dataSeries.color : g[0].dataSeries._colorSet[g[0].index % g[0].dataSeries._colorSet.length], this.contentDiv.style.borderWidth = this.borderThickness || 0 === this.borderThickness ? this.borderThickness + "px" : "2px", this.contentDiv.style.borderRadius =
10329                                this.cornerRadius || 0 === this.cornerRadius ? this.cornerRadius + "px" : "5px", this.container.style.borderRadius = this.contentDiv.style.borderRadius, this.contentDiv.style.fontSize = this.fontSize || 0 === this.fontSize ? this.fontSize + "px" : "14px", this.contentDiv.style.color = this.fontColor ? this.fontColor : "#000000", this.contentDiv.style.fontFamily = this.fontFamily ? this.fontFamily : "Calibri, Arial, Georgia, serif;", this.contentDiv.style.fontWeight = this.fontWeight ? this.fontWeight : "normal", this.contentDiv.style.fontStyle =
10330                                this.fontStyle ? this.fontStyle : v ? "italic" : "normal"
10331                        } catch (q) {}
10332                        "pie" === g[0].dataSeries.type || "doughnut" === g[0].dataSeries.type || "funnel" === g[0].dataSeries.type || "pyramid" === g[0].dataSeries.type || "bar" === g[0].dataSeries.type || "rangeBar" === g[0].dataSeries.type || "stackedBar" === g[0].dataSeries.type || "stackedBar100" === g[0].dataSeries.type ? a = a - 10 - this.container.clientWidth : (a = g[0].dataSeries.axisX.convertValueToPixel(g[0].dataPoint.x) - this.container.clientWidth << 0, a -= 10);
10333                        0 > a && (a += this.container.clientWidth +
10334                            20);
10335                        a + this.container.clientWidth > Math.max(this.chart.container.clientWidth, this.chart.width) && (a = Math.max(0, Math.max(this.chart.container.clientWidth, this.chart.width) - this.container.clientWidth));
10336                        f = 1 !== g.length || this.shared || "line" !== g[0].dataSeries.type && "stepLine" !== g[0].dataSeries.type && "spline" !== g[0].dataSeries.type && "area" !== g[0].dataSeries.type && "stepArea" !== g[0].dataSeries.type && "splineArea" !== g[0].dataSeries.type ? "bar" === g[0].dataSeries.type || "rangeBar" === g[0].dataSeries.type || "stackedBar" ===
10337                        g[0].dataSeries.type || "stackedBar100" === g[0].dataSeries.type ? g[0].dataSeries.axisX.convertValueToPixel(g[0].dataPoint.x) : f : g[0].dataSeries.axisY.convertValueToPixel(g[0].dataPoint.y);
10338                        f = -f + 10;
10339                        0 < f + this.container.clientHeight + 5 && (f -= f + this.container.clientHeight + 5 - 0);
10340                        this.fixMozTransitionDelay(a, f);
10341                        !this.animationEnabled || b ? this.disableAnimation() : (this.enableAnimation(), this.container.style.MozTransition = this.mozContainerTransition);
10342                        this.container.style.left = a + "px";
10343                        this.container.style.bottom = f + "px"
10344                    } else this.hide(!1)
10345            }
10346        };
10347        Y.prototype.highlightObjects = function(a) {
10348            var f = this.chart.overlaidCanvasCtx;
10349            this.chart.resetOverlayedCanvas();
10350            f.clearRect(0, 0, this.chart.width, this.chart.height);
10351            f.save();
10352            var b = this.chart.plotArea,
10353                c = 0;
10354            f.beginPath();
10355            f.rect(b.x1, b.y1, b.x2 - b.x1, b.y2 - b.y1);
10356            f.clip();
10357            for (b = 0; b < a.length; b++) {
10358                var e = a[b];
10359                if ((e = this.chart._eventManager.objectMap[e.dataSeries.dataPointIds[e.index]]) && e.objectType && "dataPoint" === e.objectType) {
10360                    var c = this.chart.data[e.dataSeriesIndex],
10361                        g = c.dataPoints[e.dataPointIndex],
10362                        h = e.dataPointIndex;
10363                    !1 === g.highlightEnabled || !0 !== c.highlightEnabled && !0 !== g.highlightEnabled || ("line" === c.type || "stepLine" === c.type || "spline" === c.type || "scatter" === c.type || "area" === c.type || "stepArea" === c.type || "splineArea" === c.type || "stackedArea" === c.type || "stackedArea100" === c.type || "rangeArea" === c.type || "rangeSplineArea" === c.type ? (g = c.getMarkerProperties(h, e.x1, e.y1, this.chart.overlaidCanvasCtx), g.size = Math.max(1.5 * g.size << 0, 10), g.borderColor = g.borderColor || "#FFFFFF", g.borderThickness = g.borderThickness || Math.ceil(0.1 *
10364                            g.size), ja.drawMarkers([g]), "undefined" !== typeof e.y2 && (g = c.getMarkerProperties(h, e.x1, e.y2, this.chart.overlaidCanvasCtx), g.size = Math.max(1.5 * g.size << 0, 10), g.borderColor = g.borderColor || "#FFFFFF", g.borderThickness = g.borderThickness || Math.ceil(0.1 * g.size), ja.drawMarkers([g]))) : "bubble" === c.type ? (g = c.getMarkerProperties(h, e.x1, e.y1, this.chart.overlaidCanvasCtx), g.size = e.size, g.color = "white", g.borderColor = "white", f.globalAlpha = 0.3, ja.drawMarkers([g]), f.globalAlpha = 1) : "column" === c.type || "stackedColumn" ===
10365                    c.type || "stackedColumn100" === c.type || "bar" === c.type || "rangeBar" === c.type || "stackedBar" === c.type || "stackedBar100" === c.type || "rangeColumn" === c.type || "waterfall" === c.type ? V(f, e.x1, e.y1, e.x2, e.y2, "white", 0, null, !1, !1, !1, !1, 0.3) : "pie" === c.type || "doughnut" === c.type ? ra(f, e.center, e.radius, "white", c.type, e.startAngle, e.endAngle, 0.3, e.percentInnerRadius) : "funnel" === c.type || "pyramid" === c.type ? sa(f, e.funnelSection, 0.3, "white") : "candlestick" === c.type ? (f.globalAlpha = 1, f.strokeStyle = e.color, f.lineWidth = 2 * e.borderThickness,
10366                        c = 0 === f.lineWidth % 2 ? 0 : 0.5, f.beginPath(), f.moveTo(e.x3 - c, Math.min(e.y2, e.y3)), f.lineTo(e.x3 - c, Math.min(e.y1, e.y4)), f.stroke(), f.beginPath(), f.moveTo(e.x3 - c, Math.max(e.y1, e.y4)), f.lineTo(e.x3 - c, Math.max(e.y2, e.y3)), f.stroke(), V(f, e.x1, Math.min(e.y1, e.y4), e.x2, Math.max(e.y1, e.y4), "transparent", 2 * e.borderThickness, e.color, !1, !1, !1, !1), f.globalAlpha = 1) : "ohlc" === c.type ? (f.globalAlpha = 1, f.strokeStyle = e.color, f.lineWidth = 2 * e.borderThickness, c = 0 === f.lineWidth % 2 ? 0 : 0.5, f.beginPath(), f.moveTo(e.x3 - c, e.y2), f.lineTo(e.x3 -
10367                        c, e.y3), f.stroke(), f.beginPath(), f.moveTo(e.x3, e.y1), f.lineTo(e.x1, e.y1), f.stroke(), f.beginPath(), f.moveTo(e.x3, e.y4), f.lineTo(e.x2, e.y4), f.stroke(), f.globalAlpha = 1) : "boxAndWhisker" === c.type ? (f.save(), f.globalAlpha = 1, f.strokeStyle = e.stemColor, f.lineWidth = 2 * e.
10367stemThickness, 0 < e.stemThickness && (f.beginPath(), f.moveTo(e.x3, e.y2 + e.borderThickness / 2), f.lineTo(e.x3, e.y1 + e.whiskerThickness / 2), f.stroke(), f.beginPath(), f.moveTo(e.x3, e.y4 - e.whiskerThickness / 2), f.lineTo(e.x3, e.y3 - e.borderThickness / 2), f.stroke()),
10368                        f.beginPath(), V(f, e.x1 - e.borderThickness / 2, Math.max(e.y2 + e.borderThickness / 2, e.y3 + e.borderThickness / 2), e.x2 + e.borderThickness / 2, Math.min(e.y2 - e.borderThickness / 2, e.y3 - e.borderThickness / 2), "transparent", e.borderThickness, e.color, !1, !1, !1, !1), f.globalAlpha = 1, f.strokeStyle = e.whiskerColor, f.lineWidth = 2 * e.whiskerThickness, 0 < e.whiskerThickness && (f.beginPath(), f.moveTo(Math.floor(e.x3 - e.whiskerLength / 2), e.y4), f.lineTo(Math.ceil(e.x3 + e.whiskerLength / 2), e.y4), f.stroke(), f.beginPath(), f.moveTo(Math.floor(e.x3 -
10369                        e.whiskerLength / 2), e.y1), f.lineTo(Math.ceil(e.x3 + e.whiskerLength / 2), e.y1), f.stroke()), f.globalAlpha = 1, f.strokeStyle = e.lineColor, f.lineWidth = 2 * e.lineThickness, 0 < e.lineThickness && (f.beginPath(), f.moveTo(e.x1, e.y5), f.lineTo(e.x2, e.y5), f.stroke()), f.restore(), f.globalAlpha = 1) : "error" === c.type && z(f, e.x1, e.y1, e.x2, e.y2, "white", e.whiskerProperties, e.stemProperties, e.isXYSwapped, 0.3))
10370                }
10371            }
10372            f.restore();
10373            f.globalAlpha = 1;
10374            f.beginPath()
10375        };
10376        Y.prototype.getToolTipInnerHTML = function(a) {
10377            a = a.entries;
10378            for (var f = null, b = null,
10379                     c = null, e = 0, g = "", h = !0, l = 0; l < a.length; l++)
10380                if (a[l].dataSeries.toolTipContent || a[l].dataPoint.toolTipContent) {
10381                    h = !1;
10382                    break
10383                }
10384            if (h && (this.content && "function" === typeof this.content || this.contentFormatter)) a = {
10385                chart: this.chart,
10386                toolTip: this.options,
10387                entries: a
10388            }, f = this.contentFormatter ? this.contentFormatter(a) : this.content(a);
10389            else if (this.shared && "none" !== this.chart.plotInfo.axisPlacement) {
10390                for (var m = null, k = "", l = 0; l < a.length; l++) b = a[l].dataSeries, c = a[l].dataPoint, e = a[l].index, g = "", 0 === l && (h && !this.content) && (this.chart.axisX &&
10391                0 < this.chart.axisX.length ? k += "undefined" !== typeof this.chart.axisX[0].labels[c.x] ? this.chart.axisX[0].labels[c.x] : "{x}" : this.chart.axisX2 && 0 < this.chart.axisX2.length && (k += "undefined" !== typeof this.chart.axisX2[0].labels[c.x] ? this.chart.axisX2[0].labels[c.x] : "{x}"), k += "</br>", k = this.chart.replaceKeywordsWithValue(k, c, b, e)), null === c.toolTipContent || "undefined" === typeof c.toolTipContent && null === b.options.toolTipContent || ("line" === b.type || "stepLine" === b.type || "spline" === b.type || "area" === b.type || "stepArea" ===
10392                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 || "waterfall" === b.type ? (this.chart.axisX && 1 < this.chart.axisX.length && (g += m != b.axisXIndex ? b.axisX.title ? b.axisX.title + "<br/>" : "X:{axisXIndex}<br/>" : ""), g += c.toolTipContent ? c.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ?
10393                    this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>{name}:</span>&nbsp;&nbsp;{y}", m = b.axisXIndex) : "bubble" === b.type ? (this.chart.axisX && 1 < this.chart.axisX.length && (g += m != b.axisXIndex ? b.axisX.title ? b.axisX.title + "<br/>" : "X:{axisXIndex}<br/>" : ""), g += c.toolTipContent ? c.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>{name}:</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}") :
10394                    "rangeColumn" === b.type || "rangeBar" === b.type || "rangeArea" === b.type || "rangeSplineArea" === b.type || "error" === b.type ? (this.chart.axisX && 1 < this.chart.axisX.length && (g += m != b.axisXIndex ? b.axisX.title ? b.axisX.title + "<br/>" : "X:{axisXIndex}<br/>" : ""), g += c.toolTipContent ? c.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>{name}:</span>&nbsp;&nbsp;{y[0]},&nbsp;{y[1]}") : "candlestick" ===
10395                    b.type || "ohlc" === b.type ? (this.chart.axisX && 1 < this.chart.axisX.length && (g += m != b.axisXIndex ? b.axisX.title ? b.axisX.title + "<br/>" : "X:{axisXIndex}<br/>" : ""), g += c.toolTipContent ? c.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>{name}:</span><br/>Open: &nbsp;&nbsp;{y[0]}<br/>High: &nbsp;&nbsp;&nbsp;{y[1]}<br/>Low:&nbsp;&nbsp;&nbsp;{y[2]}<br/>Close: &nbsp;&nbsp;{y[3]}") : "boxAndWhisker" ===
10396                        b.type && (this.chart.axisX && 1 < this.chart.axisX.length && (g += m != b.axisXIndex ? b.axisX.title ? b.axisX.title + "<br/>" : "X:{axisXIndex}<br/>" : ""), g += c.toolTipContent ? c.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>{name}:</span><br/>Minimum: &nbsp;&nbsp;{y[0]}<br/>Q1: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[1]}<br/>Q2: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[4]}<br/>Q3: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[2]}<br/>Maximum: &nbsp;{y[3]}"),
10397                null === f && (f = ""), !0 === this.reversed ? (f = this.chart.replaceKeywordsWithValue(g, c, b, e) + f, l < a.length - 1 && (f = "</br>" + f)) : (f += this.chart.replaceKeywordsWithValue(g, c, b, e), l < a.length - 1 && (f += "</br>")));
10398                null !== f && (f = k + f)
10399            } else {
10400                b = a[0].dataSeries;
10401                c = a[0].dataPoint;
10402                e = a[0].index;
10403                if (null === c.toolTipContent || "undefined" === typeof c.toolTipContent && null === b.options.toolTipContent) return null;
10404                "line" === b.type || "stepLine" === b.type || "spline" === b.type || "area" === b.type || "stepArea" === b.type || "splineArea" === b.type || "column" ===
10405                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 || "waterfall" === b.type ? g = c.toolTipContent ? c.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>" + (c.label ? "{label}" : "{x}
10405") + ":</span>&nbsp;&nbsp;{y}" : "bubble" === b.type ? g = c.toolTipContent ?
10406                    c.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>" + (c.label ? "{label}" : "{x}") + ":</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}" : "pie" === b.type || "doughnut" === b.type || "funnel" === b.type || "pyramid" === b.type ? g = c.toolTipContent ? c.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" :
10407                        "'color:{color};'") + "\"'>" + (c.name ? "{name}:</span>&nbsp;&nbsp;" : c.label ? "{label}:</span>&nbsp;&nbsp;" : "</span>") + "{y}" : "rangeColumn" === b.type || "rangeBar" === b.type || "rangeArea" === b.type || "rangeSplineArea" === b.type || "error" === b.type ? g = c.toolTipContent ? c.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>" + (c.label ? "{label}" : "{x}") + " :</span>&nbsp;&nbsp;{y[0]}, &nbsp;{y[1]}" :
10408                    "candlestick" === b.type || "ohlc" === b.type ? g = c.toolTipContent ? c.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>" + (c.label ? "{label}" : "{x}") + "</span><br/>Open: &nbsp;&nbsp;{y[0]}<br/>High: &nbsp;&nbsp;&nbsp;{y[1]}<br/>Low: &nbsp;&nbsp;&nbsp;&nbsp;{y[2]}<br/>Close: &nbsp;&nbsp;{y[3]}" : "boxAndWhisker" === b.type && (g = c.toolTipContent ? c.toolTipContent : b.toolTipContent ? b.toolTipContent :
10409                            this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>" + (c.label ? "{label}" : "{x}") + "</span><br/>Minimum: &nbsp;&nbsp;{y[0]}<br/>Q1: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[1]}<br/>Q2: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[4]}<br/>Q3: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[2]}<br/>Maximum: &nbsp;{y[3]}");
10410                null === f && (f = "");
10411                f += this.chart.replaceKeywordsWithValue(g, c, b, e)
10412            }
10413            return f
10414        };
10415        Y.prototype.enableAnimation = function() {
10416            if (!this.container.style.WebkitTransition) {
10417                var a = this.getContainerTransition(this.containerTransitionDuration);
10418                this.container.style.WebkitTransition = a;
10419                this.container.style.MsTransition = a;
10420                this.container.style.transition = a;
10421                this.container.style.MozTransition = this.mozContainerTransition
10422            }
10423        };
10424        Y.prototype.disableAnimation = function() {
10425            this.container.style.WebkitTransition && (this.container.style.WebkitTransition =
10426                "", this.container.style.MozTransition = "", this.container.style.MsTransition = "", this.container.style.transition = "")
10427        };
10428        Y.prototype.hide = function(a) {
10429            this.container && (this.container.style.display = "none", this.currentSeriesIndex = -1, this._prevY = this._prevX = NaN, ("undefined" === typeof a || a) && this.chart.resetOverlayedCanvas())
10430        };
10431        Y.prototype.show = function(a, f, b) {
10432            this._updateToolTip(a, f, "undefined" === typeof b ? !1 : b)
10433        };
10434        Y.prototype.fixMozTransitionDelay = function(a, f) {
10435            if (20 < this.chart._eventManager.lastObjectId) this.mozContainerTransition =
10436                this.getContainerTransition(0);
10437            else {
10438                var b = parseFloat(this.container.style.left),
10439                    b = isNaN(b) ? 0 : b,
10440                    c = parseFloat(this.container.style.bottom),
10441                    c = isNaN(c) ? 0 : c;
10442                10 < Math.sqrt(Math.pow(b - a, 2) + Math.pow(c - f, 2)) ? this.mozContainerTransition = this.getContainerTransition(0.1) : this.mozContainerTransition = this.getContainerTransition(0)
10443            }
10444        };
10445        Y.prototype.getContainerTransition = function(a) {
10446            return "left " + a + "s ease-out 0s, bottom " + a + "s ease-out 0s"
10447        };
10448        fa.prototype.reset = function() {
10449            this.lastObjectId = 0;
10450            this.objectMap = [];
10451            this.rectangularRegionEventSubscriptions = [];
10452            this.previousDataPointEventObject = null;
10453            this.eventObjects = [];
10454            v && (this.ghostCtx.clearRect(0, 0, this.chart.width, this.chart.height), this.ghostCtx.beginPath())
10455        };
10456        fa.prototype.getNewObjectTrackingId = function() {
10457            return ++this.lastObjectId
10458        };
10459        fa.prototype.mouseEventHandler = function(a) {
10460            if ("mousemove" === a.type || "click" === a.type) {
10461                var f = [],
10462                    b = Oa(a),
10463                    c = null;
10464                if ((c = this.chart.getObjectAtXY(b.x, b.y, !1)) && "undefined" !== typeof this.objectMap[c])
10465                    if (c = this.objectMap[c], "dataPoint" === c.objectType) {
10466                        var e = this.chart.data[c.dataSeriesIndex],
10467                            g = e.dataPoints[c.dataPointIndex],
10468                            h = c.dataPointIndex;
10469                        c.eventParameter = {
10470                            x: b.x,
10471                            y: b.y,
10472                            dataPoint: g,
10473                            dataSeries: e.options,
10474                            dataPointIndex: h,
10475                            dataSeriesIndex: e.index,
10476                            chart: this.chart
10477                        };
10478                        c.eventContext = {
10479                            context: g,
10480                            userContext: g,
10481                            mouseover: "mouseover",
10482                            mousemove: "mousemove",
10483                            mouseout: "mouseout",
10484                            click: "click"
10485                        };
10486                        f.push(c);
10487                        c = this.objectMap[e.id];
10488                        c.eventParameter = {
10489                            x: b.x,
10490                            y: b.y,
10491                            dataPoint: g,
10492                            dataSeries: e.options,
10493                            dataPointIndex: h,
10494                            dataSeriesIndex: e.index,
10495                            chart: this.chart
10496                        };
10497                        c.eventContext = {
10498                            context: e,
10499                            userContext: e.options,
10500                            mouseover: "mouseover",
10501                            mousemove: "mousemove",
10502                            mouseout: "mouseout",
10503                            click: "click"
10504                        };
10505                        f.push(this.objectMap[e.id])
10506                    } else "legendItem" === c.objectType && (e = this.chart.data[c.dataSeriesIndex], g = null !== c.dataPointIndex ? e.dataPoints[c.dataPointIndex] : null, c.eventParameter = {
10507                        x: b.x,
10508                        y: b.y,
10509                        dataSeries: e.options,
10510                        dataPoint: g,
10511                        dataPointIndex: c.dataPointIndex,
10512                        dataSeriesIndex: c.dataSeriesIndex,
10513                        chart: this.chart
10514                    }, c.eventContext = {
10515                        context: this.chart.legend,
10516                        userContext: this.chart.legend.options,
10517                        mouseover: "itemmouseover",
10518                        mousemove: "itemmousemove",
10519                        mouseout: "itemmouseout",
10520                        click: "itemclick"
10521                    }, f.push(c));
10522                e = [];
10523                for (b = 0; b < this.mouseoveredObjectMaps.length; b++) {
10524                    g = !0;
10525                    for (c = 0; c < f.length; c++)
10526                        if (f[c].id === this.mouseoveredObjectMaps[b].id) {
10527                            g = !1;
10528                            break
10529                        }
10530                    g ? this.fireEvent(this.mouseoveredObjectMaps[b], "mouseout", a) : e.push(this.mouseoveredObjectMaps[b])
10531                }
10532                this.mouseoveredObjectMaps = e;
10533                for (b = 0; b < f.length; b++) {
10534                    e = !1;
10535                    for (c = 0; c < this.mouseoveredObjectMaps.length; c++)
10536                        if (f[b].id === this.mouseoveredObjectMaps[c].id) {
10537                            e = !0;
10538                            break
10539                        }
10540                    e || (this.fireEvent(f[b], "mouseover", a), this.mouseoveredObjectMaps.push(f[b]));
10541                    "click" === a.type ? this.fireEvent(f[b], "click", a) : "mousemove" === a.type && this.fireEvent(f[b], "mousemove", a)
10542                }
10543            }
10544        };
10545        fa.prototype.fireEvent = function(a, f, b) {
10546            if (a && f) {
10547                var c = a.eventParameter,
10548                    e = a.eventContext,
10549                    g = a.eventContext.userContext;
10550                g && (e && g[e[f]]) && g[e[f]].call(g, c);
10551                "mouseout" !== f ? g.cursor && g.cursor !== b.target.style.cursor && (b.target.style.cursor = g.cursor) : (b.target.style.cursor = this.chart._defaultCursor, delete a.eventParameter, delete a.eventContext);
10552                "click" === f && ("dataPoint" === a.objectType && this.chart.pieDoughnutClickHandler) &&
10553                this.chart.pieDoughnutClickHandler.call(this.chart.data[a.dataSeriesIndex], c);
10554                "click" === f && ("dataPoint" === a.objectType && this.chart.funnelPyramidClickHandler) && this.chart.funnelPyramidClickHandler.call(this.chart.data[a.dataSeriesIndex], c)
10555            }
10556        };
10557        ka.prototype.animate = function(a, f, b, c, e) {
10558            var g = this;
10559            this.chart.isAnimating = !0;
10560            e = e || H.easing.linear;
10561            b && this.animations.push({
10562                startTime: (new Date).getTime() + (a ? a : 0),
10563                duration: f,
10564                animationCallback: b,
10565                onComplete: c
10566            });
10567            for (a = []; 0 < this.animations.length;)
10568                if (f = this.animations.shift(),
10569                        b = (new Date).getTime(), c = 0, f.startTime <= b && (c = e(Math.min(b - f.startTime, f.duration), 0, 1, f.duration), c = Math.min(c, 1), isNaN(c) || !isFinite(c)) && (c = 1), 1 > c && a.push(f), f.animationCallback(c), 1 <= c && f.onComplete) f.onComplete();
10570            this.animations = a;
10571            0 < this.animations.length ? this.animationRequestId = this.chart.requestAnimFrame.call(window, function() {
10572                g.animate.call(g)
10573            }) : this.chart.isAnimating = !1
10574        };
10575        ka.prototype.cancelAllAnimations = function() {
10576            this.animations = [];
10577            this.animationRequestId && this.chart.cancelRequestAnimFrame.call(window,
10578                this.animationRequestId);
10579            this.animationRequestId = null;
10580            this.chart.isAnimating = !1
10581        };
10582        var H = {
10583                yScaleAnimation: function(a, f) {
10584                    if (0 !== a) {
10585                        var b = f.dest,
10586                            c = f.source.canvas,
10587                            e = f.animationBase;
10588                        b.drawImage(c, 0, 0, c.width, c.height, 0, e - e * a, b.canvas.width / ha, a * b.canvas.height / ha)
10589                    }
10590                },
10591                xScaleAnimation: function(a, f) {
10592                    if (0 !== a) {
10593                        var b = f.dest,
10594                            c = f.source.canvas,
10595                            e = f.animationBase;
10596                        b.drawImage(c, 0, 0, c.width, c.height, e - e * a, 0, a * b.canvas.width / ha, b.canvas.height / ha)
10597                    }
10598                },
10599                xClipAnimation: function(a, f) {
10600                    if (0 !== a) {
10601                        var b = f.dest,
10602                            c = f.source.canvas;
10603                        b.save();
10604                        0 < a && b.drawImage(c, 0, 0, c.width * a, c.height, 0, 0, c.width * a / ha, c.height / ha);
10605                        b.restore()
10606                    }
10607                },
10608                fadeInAnimation: function(a, f) {
10609                    if (0 !== a) {
10610                        var b = f.dest,
10611                            c = f.source.canvas;
10612                        b.save();
10613                        b.globalAlpha = a;
10614                        b.drawImage(c, 0, 0, c.width, c.height, 0, 0, b.canvas.width / ha, b.canvas.height / ha);
10615                        b.restore()
10616                    }
10617                },
10618                easing: {
10619                    linear: function(a, f, b, c) {
10620                        return b * a / c + f
10621                    },
10622                    easeOutQuad: function(a, f, b, c) {
10623                        return -b * (a /= c) * (a - 2) + f
10624                    },
10625                    easeOutQuart: function(a, f, b, c) {
10626                        return -b * ((a = a / c - 1) * a * a * a - 1) + f
10627                    },
10628                    easeInQuad: function(a, f, b, c) {
10629                        return b * (a /= c) * a + f
10630                    },
10631                    easeInQuart: function(a,
10632                                          f, b, c) {
10633                        return b * (a /= c) * a * a * a + f
10634                    }
10635                }
10636            },
10637            ja = {
10638                drawMarker: function(a, f, b, c, e, g, h, l) {
10639                    if (b) {
10640                        var m = 1;
10641                        b.fillStyle = g ? g : "#000000";
10642                        b.strokeStyle = h ? h : "#000000";
10643                        b.lineWidth = l ? l : 0;
10644                        "circle" === c ? (b.moveTo(a, f), b.beginPath(), b.arc(a, f, e / 2, 0, 2 * Math.PI, !1), g && b.fill(), l && (h ? b.stroke() : (m = b.globalAlpha, b.globalAlpha = 0.15, b.strokeStyle = "black", b.stroke(), b.globalAlpha = m))) : "square" === c ? (b.beginPath(), b.rect(a - e / 2, f - e / 2, e, e), g && b.fill(), l && (h ? b.stroke() : (m = b.globalAlpha, b.globalAlpha = 0.15, b.strokeStyle = "black", b.stroke(), b.globalAlpha =
10645                            m))) : "triangle" === c ? (b.beginPath(), b.moveTo(a - e / 2, f + e / 2), b.lineTo(a + e / 2, f + e / 2), b.lineTo(a, f - e / 2), b.closePath(), g && b.fill(), l && (h ? b.stroke() : (m = b.globalAlpha, b.globalAlpha = 0.15, b.strokeStyle = "black", b.stroke(), b.globalAlpha = m)), b.beginPath()) : "cross" === c && (b.strokeStyle = g, b.lineWidth = e / 4, b.beginPath(), b.moveTo(a - e / 2, f - e / 2), b.lineTo(a + e / 2, f + e / 2), b.stroke(), b.moveTo(a + e / 2, f - e / 2), b.lineTo(a - e / 2, f + e / 2), b.stroke())
10646                    }
10647                },
10648                drawMarkers: function(a) {
10649                    for (var f = 0; f < a.length; f++) {
10650                        var b = a[f];
10651                        ja.drawMarker(b.x, b.y, b.ctx,
10652                            b.type, b.size, b.color, b.borderColor, b.borderThickness)
10653                    }
10654                }
10655            };
10656        return q
10657    }();
10658    x.Chart.version = "v2.0.1 GA"
10659})();
10660
10661/*
10662 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.
10663
10664 Copyright 2006 Google Inc. https://code.google.com/p/explorercanvas/
10665 Licensed under the Apache License, Version 2.0
10666 */
10667document.createElement("canvas").getContext || function() {
10668    function V() {
10669        return this.context_ || (this.context_ = new C(this))
10670    }
10671
10672    function W(a, b, c) {
10673        var g = M.call(arguments, 2);
10674        return function() {
10675            return a.apply(b, g.concat(M.call(arguments)))
10676        }
10677    }
10678
10679    function N(a) {
10680        return String(a).replace(/&/g, "&amp;").replace(/"/g, "&quot;")
10681    }
10682
10683    function O(a) {
10684        a.namespaces.g_vml_ || a.namespaces.add("g_vml_", "urn:schemas-microsoft-com:vml", "#default#VML");
10685        a.namespaces.g_o_ || a.namespaces.add("g_o_", "urn:schemas-microsoft-com:office:office", "#default#VML");
10686        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}")
10687    }
10688
10689    function X(a) {
10690        var b = a.srcElement;
10691        switch (a.propertyName) {
10692            case "width":
10693                b.getContext().clearRect();
10694                b.style.width = b.attributes.width.nodeValue + "px";
10695                b.firstChild.style.width = b.clientWidth + "px";
10696                break;
10697            case "height":
10698                b.getContext().clearRect(), b.style.height = b.attributes.height.nodeValue + "px", b.firstChild.style.height = b.clientHeight +
10699                    "px"
10700        }
10701    }
10702
10703    function Y(a) {
10704        a = a.srcElement;
10705        a.firstChild && (a.firstChild.style.width = a.clientWidth + "px", a.firstChild.style.height = a.clientHeight + "px")
10706    }
10707
10708    function D() {
10709        return [
10710            [1, 0, 0],
10711            [0, 1, 0],
10712            [0, 0, 1]
10713        ]
10714    }
10715
10716    function t(a, b) {
10717        for (var c = D(), g = 0; 3 > g; g++)
10718            for (var e = 0; 3 > e;
10718 e++) {
10719                for (var f = 0, d = 0; 3 > d; d++) f += a[g][d] * b[d][e];
10720                c[g][e] = f
10721            }
10722        return c
10723    }
10724
10725    function P(a, b) {
10726        b.fillStyle = a.fillStyle;
10727        b.lineCap = a.lineCap;
10728        b.lineJoin = a.lineJoin;
10729        b.lineWidth = a.lineWidth;
10730        b.miterLimit = a.miterLimit;
10731        b.shadowBlur = a.shadowBlur;
10732        b.shadowColor = a.shadowColor;
10733        b.shadowOffsetX =
10734            a.shadowOffsetX;
10735        b.shadowOffsetY = a.shadowOffsetY;
10736        b.strokeStyle = a.strokeStyle;
10737        b.globalAlpha = a.globalAlpha;
10738        b.font = a.font;
10739        b.textAlign = a.textAlign;
10740        b.textBaseline = a.textBaseline;
10741        b.arcScaleX_ = a.arcScaleX_;
10742        b.arcScaleY_ = a.arcScaleY_;
10743        b.lineScale_ = a.lineScale_
10744    }
10745
10746    function Q(a) {
10747        var b = a.indexOf("(", 3),
10748            c = a.indexOf(")", b + 1),
10749            b = a.substring(b + 1, c).split(",");
10750        if (4 != b.length || "a" != a.charAt(3)) b[3] = 1;
10751        return b
10752    }
10753
10754    function E(a, b, c) {
10755        return Math.min(c, Math.max(b, a))
10756    }
10757
10758    function F(a, b, c) {
10759        0 > c && c++;
10760        1 < c && c--;
10761        return 1 > 6 * c ? a + 6 * (b - a) * c :
10762            1 > 2 * c ? b : 2 > 3 * c ? a + 6 * (b - a) * (2 / 3 - c) : a
10763    }
10764
10765    function G(a) {
10766        if (a in H) return H[a];
10767        var b, c = 1;
10768        a = String(a);
10769        if ("#" == a.charAt(0)) b = a;
10770        else if (/^rgb/.test(a)) {
10771            c = Q(a);
10772            b = "#";
10773            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)];
10774            c = +c[3]
10775        } else if (/^hsl/.test(a)) {
10776            e = c = Q(a);
10777            b = parseFloat(e[0]) / 360 % 360;
10778            0 > b && b++;
10779            g = E(parseFloat(e[1]) / 100, 0, 1);
10780            e = E(parseFloat(e[2]) / 100, 0, 1);
10781            if (0 == g) g = e = b = e;
10782            else {
10783                var f = 0.5 > e ? e * (1 + g) : e + g - e * g,
10784                    d = 2 * e - f;
10785                g = F(d, f, b + 1 / 3);
10786                e = F(d, f, b);
10787                b = F(d, f, b - 1 / 3)
10788            }
10789            b = "#" +
10790                v[Math.floor(255 * g)] + v[Math.floor(255 * e)] + v[Math.floor(255 * b)];
10791            c = c[3]
10792        } else b = Z[a] || a;
10793        return H[a] = {
10794            color: b,
10795            alpha: c
10796        }
10797    }
10798
10799    function C(a) {
10800        this.m_ = D();
10801        this.mStack_ = [];
10802        this.aStack_ = [];
10803        this.currentPath_ = [];
10804        this.fillStyle = this.strokeStyle = "#000";
10805        this.lineWidth = 1;
10806        this.lineJoin = "miter";
10807        this.lineCap = "butt";
10808        this.miterLimit = 1 * q;
10809        this.globalAlpha = 1;
10810        this.font = "10px sans-serif";
10811        this.textAlign = "left";
10812        this.textBaseline = "alphabetic";
10813        this.canvas = a;
10814        var b = "width:" + a.clientWidth + "px;height:" + a.clientHeight + "px;overflow:hidden;position:absolute",
10815            c = a.ownerDocument.createElement("div");
10816        c.style.cssText = b;
10817        a.appendChild(c);
10818        b = c.cloneNode(!1);
10819        b.style.backgroundColor = "red";
10820        b.style.filter = "alpha(opacity=0)";
10821        a.appendChild(b);
10822        this.element_ = c;
10823        this.lineScale_ = this.arcScaleY_ = this.arcScaleX_ = 1
10824    }
10825
10826    function R(a, b, c, g) {
10827        a.currentPath_.push({
10828            type: "bezierCurveTo",
10829            cp1x: b.x,
10830            cp1y: b.y,
10831            cp2x: c.x,
10832            cp2y: c.y,
10833            x: g.x,
10834            y: g.y
10835        });
10836        a.currentX_ = g.x;
10837        a.currentY_ = g.y
10838    }
10839
10840    function S(a, b) {
10841        var c = G(a.strokeStyle),
10842            g = c.color,
10843            c = c.alpha * a.globalAlpha,
10844            e = a.lineScale_ * a.lineWidth;
10845        1 > e && (c *= e);
10846        b.push("<g_vml_:stroke",
10847            ' opacity="', c, '"', ' joinstyle="', a.lineJoin, '"', ' miterlimit="', a.miterLimit, '"', ' endcap="', $[a.lineCap] || "square", '"', ' weight="', e, 'px"', ' color="', g, '" />')
10848    }
10849
10850    function T(a, b, c, g) {
10851        var e = a.fillStyle,
10852            f = a.arcScaleX_,
10853            d = a.arcScaleY_,
10854            k = g.x - c.x,
10855            n = g.y - c.y;
10856        if (e instanceof w) {
10857            var h = 0,
10858                l = g = 0,
10859                u = 0,
10860                m = 1;
10861            if ("gradient" == e.type_) {
10862                h = e.x1_ / f;
10863                c = e.y1_ / d;
10864                var p = s(a, e.x0_ / f, e.y0_ / d),
10865                    h = s(a, h, c),
10866                    h = 180 * Math.atan2(h.x - p.x, h.y - p.y) / Math.PI;
10867                0 > h && (h += 360);
10868                1E-6 > h && (h = 0)
10869            } else p = s(a, e.x0_, e.y0_), g = (p.x - c.x) / k, l = (p.y - c.y) / n, k /= f * q,
10870                n /= d * q, m = x.max(k, n), u = 2 * e.r0_ / m, m = 2 * e.r1_ / m - u;
10871            f = e.colors_;
10872            f.sort(function(a, b) {
10873                return a.offset - b.offset
10874            });
10875            d = f.length;
10876            p = f[0].color;
10877            c = f[d - 1].color;
10878            k = f[0].alpha * a.globalAlpha;
10879            a = f[d - 1].alpha * a.globalAlpha;
10880            for (var n = [], r = 0; r < d; r++) {
10881                var t = f[r];
10882                n.push(t.offset * m + u + " " + t.color)
10883            }
10884            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, '" />')
10885        } else e instanceof
10886        I ? k && n && b.push("<g_vml_:fill", ' position="', -c.x / k * f * f, ",", -c.y / n * d * d, '"', ' type="tile"', ' src="', e.src_, '" />
10886') : (e = G(a.fillStyle), b.push('<g_vml_:fill color="', e.color, '" opacity="', e.alpha * a.globalAlpha, '" />'))
10887    }
10888
10889    function s(a, b, c) {
10890        a = a.m_;
10891        return {
10892            x: q * (b * a[0][0] + c * a[1][0] + a[2][0]) - r,
10893            y: q * (b * a[0][1] + c * a[1][1] + a[2][1]) - r
10894        }
10895    }
10896
10897    function z(a, b, c) {
10898        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] *
10899            b[1][0]))))
10900    }
10901
10902    function w(a) {
10903        this.type_ = a;
10904        this.r1_ = this.y1_ = this.x1_ = this.r0_ = this.y0_ = this.x0_ = 0;
10905        this.colors_ = []
10906    }
10907
10908    function I(a, b) {
10909        if (!a || 1 != a.nodeType || "IMG" != a.tagName) throw new A("TYPE_MISMATCH_ERR");
10910        if ("complete" != a.readyState) throw new A("INVALID_STATE_ERR");
10911        switch (b) {
10912            case "repeat":
10913            case null:
10914            case "":
10915                this.repetition_ = "repeat";
10916                break;
10917            case "repeat-x":
10918            case "repeat-y":
10919            case "no-repeat":
10920                this.repetition_ = b;
10921                break;
10922            default:
10923                throw new A("SYNTAX_ERR");
10924        }
10925        this.src_ = a.src;
10926        this.width_ = a.width;
10927        this.height_ = a.height
10928    }
10929
10930    function A(a) {
10931        this.code = this[a];
10932        this.message = a + ": DOM Exception " + this.code
10933    }
10934    var x = Math,
10935        k = x.round,
10936        J = x.sin,
10937        K = x.cos,
10938        ba = x.abs,
10939        aa = x.sqrt,
10940        q = 10,
10941        r = q / 2;
10942    navigator.userAgent.match(/MSIE ([\d.]+)?/);
10943    var M = Array.prototype.slice;
10944    O(document);
10945    var U = {
10946        init: function(a) {
10947            a = a || document;
10948            a.createElement("canvas");
10949            a.attachEvent("onreadystatechange", W(this.init_, this, a))
10950        },
10951        init_: function(a) {
10952            a = a.getElementsByTagName("canvas");
10953            for (var b = 0; b < a.length; b++) this.initElement(a[b])
10954        },
10955        initElement: function(a) {
10956            if (!a.getContext) {
10957                a.getContext =
10958                    V;
10959                O(a.ownerDocument);
10960                a.innerHTML = "";
10961                a.attachEvent("onpropertychange", X);
10962                a.attachEvent("onresize", Y);
10963                var b = a.attributes;
10964                b.width && b.width.specified ? a.style.width = b.width.nodeValue + "px" : a.width = a.clientWidth;
10965                b.height && b.height.specified ? a.style.height = b.he
10965ight.nodeValue + "px" : a.height = a.clientHeight
10966            }
10967            return a
10968        }
10969    };
10970    U.init();
10971    for (var v = [], d = 0; 16 > d; d++)
10972        for (var B = 0; 16 > B; B++) v[16 * d + B] = d.toString(16) + B.toString(16);
10973    var Z = {
10974            aliceblue: "#F0F8FF",
10975            antiquewhite: "#FAEBD7",
10976            aquamarine: "#7FFFD4",
10977            azure: "#F0FFFF",
10978            beige: "#F5F5DC",
10979            bisque: "#FFE4C4",
10980            black: "#000000",
10981            blanchedalmond: "#FFEBCD",
10982            blueviolet: "#8A2BE2",
10983            brown: "#A52A2A",
10984            burlywood: "#DEB887",
10985            cadetblue: "#5F9EA0",
10986            chartreuse: "#7FFF00",
10987            chocolate: "#D2691E",
10988            coral: "#FF7F50",
10989            cornflowerblue: "#6495ED",
10990            cornsilk: "#FFF8DC",
10991            crimson: "#DC143C",
10992            cyan: "#00FFFF",
10993            darkblue: "#00008B",
10994            darkcyan: "#008B8B",
10995            darkgoldenrod: "#B8860B",
10996            darkgray: "#A9A9A9",
10997            darkgreen: "#006400",
10998            darkgrey: "#A9A9A9",
10999            darkkhaki: "#BDB76B",
11000            darkmagenta: "#8B008B",
11001            darkolivegreen: "#556B2F",
11002            darkorange: "#FF8C00",
11003            darkorchid: "#9932CC",
11004            darkred: "#8B0000",
11005            darksalmon: "#E9967A",
11006            darkseagreen: "#8FBC8F",
11007            darkslateblue: "#483D8B",
11008            darkslategray: "#2F4F4F",
11009            darkslategrey: "#2F4F4F",
11010            darkturquoise: "#00CED1",
11011            darkviolet: "#9400D3",
11012            deeppink: "#FF1493",
11013            deepskyblue: "#00BFFF",
11014            dimgray: "#696969",
11015            dimgrey: "#696969",
11016            dodgerblue: "#1E90FF",
11017            firebrick: "#B22222",
11018            floralwhite: "#FFFAF0",
11019            forestgreen: "#228B22",
11020            gainsboro: "#DCDCDC",
11021            ghostwhite: "#F8F8FF",
11022            gold: "#FFD700",
11023            goldenrod: "#DAA520",
11024            grey: "#808080",
11025            greenyellow: "#ADFF2F",
11026            honeydew: "#F0FFF0",
11027            hotpink: "#FF69B4",
11028            indianred: "#CD5C5C",
11029            indigo: "#4B0082",
11030            ivory: "#FFFFF0",
11031            khaki: "#F0E68C",
11032            lavender: "#E6E6FA",
11033            lavenderblush: "#FFF0F5",
11034            lawngreen: "#7CFC00",
11035            lemonchiffon: "#FFFACD",
11036            lightblue: "#ADD8E6",
11037            lightcoral: "#F08080",
11038            lightcyan: "#E0FFFF",
11039            lightgoldenrodyellow: "#FAFAD2",
11040            lightgreen: "#90EE90",
11041            lightgrey: "#D3D3D3",
11042            lightpink: "#FFB6C1",
11043            lightsalmon: "#FFA07A",
11044            lightseagreen: "#20B2AA",
11045            lightskyblue: "#87CEFA",
11046            lightslategray: "#778899",
11047            lightslategrey: "#778899",
11048            lightsteelblue: "#B0C4DE",
11049            lightyellow: "#FFFFE0",
11050            limegreen: "#32CD32",
11051            linen: "#FAF0E6",
11052            magenta: "#FF00FF",
11053            mediumaquamarine: "#66CDAA",
11054            mediumblue: "#0000CD",
11055            mediumorchid: "#BA55D3",
11056            mediumpurple: "#9370DB",
11057            mediumseagreen: "#3CB371",
11058            mediumslateblue: "#7B68EE",
11059            mediumspringgreen: "#00FA9A",
11060            mediumturquoise: "#48D1CC",
11061            mediumvioletred: "#C71585",
11062            midnightblue: "#191970",
11063            mintcream: "#F5FFFA",
11064            mistyrose: "#FFE4E1",
11065            moccasin: "#FFE4B5",
11066            navajowhite: "#FFDEAD",
11067            oldlace: "#FDF5E6",
11068            olivedrab: "#6B8E23",
11069            orange: "#FFA500",
11070            orangered: "#FF4500",
11071            orchid: "#DA70D6",
11072            palegoldenrod: "#EEE8AA",
11073            palegreen: "#98FB98",
11074            paleturquoise: "#AFEEEE",
11075            palevioletred: "#DB7093",
11076            papayawhip: "#FFEFD5",
11077            peachpuff: "#FFDAB9",
11078            peru: "#CD853F",
11079            pink: "#FFC0CB",
11080            plum: "#DDA0DD",
11081            powderblue: "#B0E0E6",
11082            rosybrown: "#BC8F8F",
11083            royalblue: "#4169E1",
11084            saddlebrown: "#8B4513",
11085            salmon: "#FA8072",
11086            sandybrown: "#F4A460",
11087            seagreen: "#2E8B57",
11088            seashell: "#FFF5EE",
11089            sienna: "#A0522D",
11090            skyblue: "#87CEEB",
11091            slateblue: "#6A5ACD",
11092            slategray: "#708090",
11093            slategrey: "#708090",
11094            snow: "#FFFAFA",
11095            springgreen: "#00FF7F",
11096            steelblue: "#4682B4",
11097            tan: "#D2B48C",
11098            thistle: "#D8BFD8",
11099            tomato: "#FF6347",
11100            turquoise: "#40E0D0",
11101            violet: "#EE82EE",
11102            wheat: "#F5DEB3",
11103            whitesmoke: "#F5F5F5",
11104            yellowgreen: "#9ACD32"
11105        },
11106        H = {},
11107        L = {},
11108        $ = {
11109            butt: "flat",
11110            round: "round"
11111        },
11112        d = C.prototype;
11113    d.clearRect = function() {
11114        this.textMeasureEl_ && (this.textMeasureEl_.removeNode(!0), this.textMeasureEl_ = null);
11115        this.element_.innerHTML = ""
11116    };
11117    d.beginPath = function() {
11118        this.currentPath_ = []
11119    };
11120    d.moveTo = function(a, b) {
11121        var c = s(this, a, b);
11122        this.currentPath_.push({
11123            type: "moveTo",
11124            x: c.x,
11125            y: c.y
11126        });
11127        this.currentX_ = c.x;
11128        this.currentY_ = c.y
11129    };
11130    d.lineTo = function(a, b) {
11131        var c = s(this, a, b);
11132        this.currentPath_.push({
11133            type: "lineTo",
11134            x: c.x,
11135            y: c.y
11136        });
11137        this.currentX_ = c.x;
11138        this.currentY_ = c.y
11139    };
11140    d.bezierCurveTo =
11141        function(a, b, c, g, e, f) {
11142            e = s(this, e, f);
11143            a = s(this, a, b);
11144            c = s(this, c, g);
11145            R(this, a, c, e)
11146        };
11147    d.quadraticCurveTo = function(a, b, c, g) {
11148        a = s(this, a, b);
11149        c = s(this, c, g);
11150        g = {
11151            x: this.currentX_ + 2 / 3 * (a.x - this.currentX_),
11152            y: this.currentY_ + 2 / 3 * (a.y - this.currentY_)
11153        };
11154        R(this, g, {
11155            x: g.x + (c.x - this.currentX_) / 3,
11156            y: g.y + (c.y - this.currentY_) / 3
11157        }, c)
11158    };
11159    d.arc = function(a, b, c, g, e, f) {
11160        c *= q;
11161        var d = f ? "at" : "wa",
11162            k = a + K(g) * c - r,
11163            n = b + J(g) * c - r;
11164        g = a + K(e) * c - r;
11165        e = b + J(e) * c - r;
11166        k != g || f || (k += 0.125);
11167        a = s(this, a, b);
11168        k = s(this, k, n);
11169        g = s(this, g, e);
11170        this.currentPath_.push({
11171            type: d,
11172            x: a.x,
11173            y: a.y,
11174            radius: c,
11175            xStart: k.x,
11176            yStart: k.y,
11177            xEnd: g.x,
11178            yEnd: g.y
11179        })
11180    };
11181    d.rect = function(a, b, c, g) {
11182        this.moveTo(a, b);
11183        this.lineTo(a + c, b);
11184        this.lineTo(a + c, b + g);
11185        this.lineTo(a, b + g);
11186        this.closePath()
11187    };
11188    d.strokeRect = function(a, b, c, g) {
11189        var e = this.currentPath_;
11190        this.beginPath();
11191        this.moveTo(a, b);
11192        this.lineTo(a + c, b);
11193        this.lineTo(a + c, b + g);
11194        this.lineTo(a, b + g);
11195        this.closePath();
11196        this.stroke();
11197        this.currentPath_ = e
11198    };
11199    d.fillRect = function(a, b, c, g) {
11200        var e = this.currentPath_;
11201        this.beginPath();
11202        this.moveTo(a, b);
11203        this.lineTo(a + c, b);
11204        this.lineTo(a +
11205            c, b + g);
11206        this.lineTo(a, b + g);
11207        this.closePath();
11208        this.fill();
11209        this.currentPath_ = e
11210    };
11211    d.createLinearGradient = function(a, b, c, g) {
11212        var e = new w("gradient");
11213        e.x0_ = a;
11214        e.y0_ = b;
11215        e.x1_ = c;
11216        e.y1_ = g;
11217        return e
11218    };
11219    d.createRadialGradient = function(a, b, c, g, e, f) {
11220        var d = new w("gradientradial");
11221        d.x0_ = a;
11222        d.y0_ = b;
11223        d.r0_ = c;
11224        d.x1_ = g;
11225        d.y1_ = e;
11226        d.r1_ = f;
11227        return d
11228    };
11229    d.drawImage = function(a, b) {
11230        var c, g, e, d, r, y, n, h;
11231        e = a.runtimeStyle.width;
11232        d = a.runtimeStyle.height;
11233        a.runtimeStyle.width = "auto";
11234        a.runtimeStyle.height = "auto";
11235        var l = a.width,
11236            u = a.height;
11237        a.runtimeStyle.width =
11238            e;
11239        a.runtimeStyle.height = d;
11240        if (3 == arguments.length) c = arguments[1], g = arguments[2], r = y = 0, n = e = l, h = d = u;
11241        else if (5 == arguments.length) c = arguments[1], g = arguments[2], e = arguments[3], d = arguments[4], r = y = 0, n = l, h = u;
11242        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];
11243        else throw Error("Invalid number of arguments");
11244        var m = s(this, c, g),
11245            p = [];
11246        p.push(" <g_vml_:group", ' coordsize="', 10 * q, ",", 10 * q, '"', ' coordorigin="0,0"', ' style="width:',
11247            10, "px;height:", 10, "px;position:absolute;");
11248        if (1 != this.m_[0][0] || this.m_[0][1] || 1 != this.m_[1][1] || this.m_[1][0]) {
11249            var t = [];
11250            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), "");
11251            var v = s(this, c + e, g),
11252                w = s(this, c, g + d);
11253            c = s(this, c + e, g + d);
11254            m.x = x.max(m.x, v.x, w.x, c.x);
11255            m.y = x.max(m.y, v.y, w.y, c.y);
11256            p.push("padding:0 ", k(m.x / q), "px ", k(m.y / q), "px 0;filter:progid:DXImageTransform.Microsoft.Matrix(", t.join(""), ", sizingmethod='clip');")
11257        } else p.push("top:",
11258            k(m.y / q), "px;left:", k(m.x / q), "px;");
11259        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 - 
11259y - h) / u, '"', " />", "</g_vml_:group>");
11260        this.element_.insertAdjacentHTML("BeforeEnd", p.join(""))
11261    };
11262    d.stroke = function(a) {
11263        var b = [];
11264        b.push("<g_vml_:shape", ' filled="', !!a, '"', ' style="position:absolute;width:', 10, "px;height:", 10, 'px;"', ' coordorigin="0,0"', ' coordsize="', 10 * q, ",", 10 * q, '"',
11265            ' stroked="', !a, '"', ' path="');
11266        for (var c = {
11267            x: null,
11268            y: null
11269        }, d = {
11270            x: null,
11271            y: null
11272        }, e = 0; e < this.currentPath_.length; e++) {
11273            var f = this.currentPath_[e];
11274            switch (f.type) {
11275                case "moveTo":
11276                    b.push(" m ", k(f.x), ",", k(f.y));
11277                    break;
11278                case "lineTo":
11279                    b.push(" l ", k(f.x), ",", k(f.y));
11280                    break;
11281                case "close":
11282                    b.push(" x ");
11283                    f = null;
11284                    break;
11285                case "bezierCurveTo":
11286                    b.push(" c ", k(f.cp1x), ",", k(f.cp1y), ",", k(f.cp2x), ",", k(f.cp2y), ",", k(f.x), ",", k(f.y));
11287                    break;
11288                case "at":
11289                case "wa":
11290                    b.push(" ", f.type, " ", k(f.x - this.arcScaleX_ * f.radius), ",", k(f.y - this.arcScaleY_ *
11291                        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))
11292            }
11293            if (f) {
11294                if (null == c.x || f.x < c.x) c.x = f.x;
11295                if (null == d.x || f.x > d.x) d.x = f.x;
11296                if (null == c.y || f.y < c.y) c.y = f.y;
11297                if (null == d.y || f.y > d.y) d.y = f.y
11298            }
11299        }
11300        b.push(' ">');
11301        a ? T(this, b, c, d) : S(this, b);
11302        b.push("</g_vml_:shape>");
11303        this.element_.insertAdjacentHTML("beforeEnd", b.join(""))
11304    };
11305    d.fill = function() {
11306        this.stroke(!0)
11307    };
11308    d.closePath = function() {
11309        this.currentPath_.push({
11310            type: "close"
11311        })
11312    };
11313    d.save = function() {
11314        var a = {};
11315        P(this, a);
11316        this.aStack_.push(a);
11317        this.mStack_.push(this.m_);
11318        this.m_ = t(D(), this.m_)
11319    };
11320    d.restore = function() {
11321        this.aStack_.length && (P(this.aStack_.pop(), this), this.m_ = this.mStack_.pop())
11322    };
11323    d.translate = function(a, b) {
11324        z(this, t([
11325            [1, 0, 0],
11326            [0, 1, 0],
11327            [a, b, 1]
11328        ], this.m_), !1)
11329    };
11330    d.rotate = function(a) {
11331        var b = K(a);
11332        a = J(a);
11333        z(this, t([
11334            [b, a, 0],
11335            [-a, b, 0],
11336            [0, 0, 1]
11337        ], this.m_), !1)
11338    };
11339    d.scale = function(a, b) {
11340        this.arcScaleX_ *= a;
11341        this.arcScaleY_ *= b;
11342        z(this, t([
11343            [a, 0, 0],
11344            [0, b, 0],
11345            [0, 0, 1]
11346        ], this.m_), !0)
11347    };
11348    d.transform = function(a, b, c, d, e, f) {
11349        z(this, t([
11350            [a,
11351                b, 0
11352            ],
11353            [c, d, 0],
11354            [e, f, 1]
11355        ], this.m_), !0)
11356    };
11357    d.setTransform = function(a, b, c, d, e, f) {
11358        z(this, [
11359            [a, b, 0],
11360            [c, d, 0],
11361            [e, f, 1]
11362        ], !0)
11363    };
11364    d.drawText_ = function(a, b, c, d, e) {
11365        var f = this.m_;
11366        d = 0;
11367        var r = 1E3,
11368            t = 0,
11369            n = [],
11370            h;
11371        h = this.font;
11372        if (L[h]) h = L[h];
11373        else {
11374            var l = document.createElement("div").style;
11375            try {
11376                l.font = h
11377            } catch (u) {}
11378            h = L[h] = {
11379                style: l.fontStyle || "normal",
11380                variant: l.fontVariant || "normal",
11381                weight: l.fontWeight || "normal",
11382                size: l.fontSize || 10,
11383                family: l.fontFamily || "sans-serif"
11384            }
11385        }
11386        var l = h,
11387            m = this.element_;
11388        h = {};
11389        for (var p in l) h[p] = l[p];
11390        p = parseFloat(m.currentStyle.fontSize);
11391        m = parseFloat(l.size);
11392        "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;
11393        h.size *= 0.981;
11394        p = h.style + " " + h.variant + " " + h.weight + " " + h.size + "px " + h.family;
11395        m = this.element_.currentStyle;
11396        l = this.textAlign.toLowerCase();
11397        switch (l) {
11398            case "left":
11399            case "center":
11400            case "right":
11401                break;
11402            case "end":
11403                l = "ltr" == m.direction ? "right" : "left";
11404                break;
11405            case "start":
11406                l = "rtl" == m.direction ? "right" :
11407                    "left";
11408                break;
11409            default:
11410                l = "left"
11411        }
11412        switch (this.textBaseline) {
11413            case "hanging":
11414            case "top":
11415                t = h.size / 1.75;
11416                break;
11417            case "middle":
11418                break;
11419            default:
11420            case null:
11421            case "alphabetic":
11422            case "ideographic":
11423            case "bottom":
11424                t = -h.size / 2.25
11425        }
11426        switch (l) {
11427            case "right":
11428                d = 1E3;
11429                r = 0.05;
11430                break;
11431            case "center":
11432                d = r = 500
11433        }
11434        b = s(this, b + 0, c + t);
11435        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;">');
11436        e ? S(this, n) : T(this, n, {
11437            x: -d,
11438            y: 0
11439        }, {
11440            x: r,
11441            y: h.size
11442        });
11443        e = f[0][0].toFixed(3) + "," + f[1][0].toFixed(3) + "," + f[0][1].toFixed(3) + "," + f[1][1].toFixed(3) + ",0,0";
11444        b = k(b.x / q) + "," + k(b.y / q);
11445        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>');
11446        this.element_.insertAdjacentHTML("beforeEnd", n.join(""))
11447    };
11448    d.fillText = function(a, b, c, d) {
11449        this.drawText_(a, b, c, d, !1)
11450    };
11451    d.strokeText = function(a,
11452                            b, c, d) {
11453        this.drawText_(a, b, c, d, !0)
11454    };
11455    d.measureText = function(a) {
11456        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);
11457        var b = this.element_.ownerDocument;
11458        this.textMeasureEl_.innerHTML = "";
11459        this.textMeasureEl_.style.font = this.font;
11460        this.textMeasureEl_.appendChild(b.createTextNode(a));
11461        return {
11462            width: this.textMeasureEl_.offsetWidth
11463        }
11464    };
11465    d.clip = function() {};
11466    d.arcTo = function() {};
11467    d.createPattern = function(a, b) {
11468        return new I(a, b)
11469    };
11470    w.prototype.addColorStop = function(a, b) {
11471        b = G(b);
11472        this.colors_.push({
11473            offset: a,
11474            color: b.color,
11475            alpha: b.alpha
11476        })
11477    };
11478    d = A.prototype = Error();
11479    d.INDEX_SIZE_ERR = 1;
11480    d.DOMSTRING_SIZE_ERR = 2;
11481    d.HIERARCHY_REQUEST_ERR = 3;
11482    d.WRONG_DOCUMENT_ERR = 4;
11483    d.INVALID_CHARACTER_ERR = 5;
11484    d.NO_DATA_ALLOWED_ERR = 6;
11485    d.NO_MODIFICATION_ALLOWED_ERR = 7;
11486    d.NOT_FOUND_ERR = 8;
11487    d.NOT_SUPPORTED_ERR = 9;
11488    d.INUSE_ATTRIBUTE_ERR = 10;
11489    d.INVALID_STATE_ERR = 11;
11490    d.SYNTAX_ERR = 12;
11491    d.INVALID_MODIFICATION_ERR =
11492        13;
11493    d.NAMESPACE_ERR = 14;
11494    d.INVALID_ACCESS_ERR = 15;
11495    d.VALIDATION_ERR = 16;
11496    d.TYPE_MISMATCH_ERR = 17;
11497    G_vmlCanvasManager = U;
11498    CanvasRenderingContext2D = C;
11499    CanvasGradient = w;
11500    CanvasPattern = I;
11501    DOMException = A
11502}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.