riku
2022-06-17 3a5c011d9509d3bc0367921f463676c81ff2e374
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
/**
 * @license Highcharts JS v5.0.6 (2016-12-07)
 * Gantt series
 *
 * (c) 2016 Lars A. V. Cabrera
 *
 * --- WORK IN PROGRESS ---
 *
 * License: www.highcharts.com/license
 */
(function(factory) {
    if (typeof module === 'object' && module.exports) {
        module.exports = factory;
    } else {
        factory(Highcharts);
    }
}(function(Highcharts) {
    (function(H) {
        /**
         * (c) 2016 Highsoft AS
         * Authors: Lars A. V. Cabrera
         *
         * License: www.highcharts.com/license
         */
        'use strict';
 
        var dateFormat = H.dateFormat,
            each = H.each,
            isObject = H.isObject,
            pick = H.pick,
            wrap = H.wrap,
            Axis = H.Axis,
            Chart = H.Chart,
            Tick = H.Tick;
 
 
        // Enum for which side the axis is on.
        // Maps to axis.side
        var axisSide = {
            top: 0,
            right: 1,
            bottom: 2,
            left: 3,
            0: 'top',
            1: 'right',
            2: 'bottom',
            3: 'left'
        };
 
        /**
         * Checks if an axis is the outer axis in its dimension. Since
         * axes are placed outwards in order, the axis with the highest
         * index is the outermost axis.
         *
         * Example: If there are multiple x-axes at the top of the chart,
         * this function returns true if the axis supplied is the last
         * of the x-axes.
         *
         * @return true if the axis is the outermost axis in its dimension;
         *         false if not
         */
        Axis.prototype.isOuterAxis = function() {
            var axis = this,
                thisIndex = -1,
                isOuter = true;
 
            each(this.chart.axes, function(otherAxis, index) {
                if (otherAxis.side === axis.side) {
                    if (otherAxis === axis) {
                        // Get the index of the axis in question
                        thisIndex = index;
 
                        // Check thisIndex >= 0 in case thisIndex has
                        // not been found yet
                    } else if (thisIndex >= 0 && index > thisIndex) {
                        // There was an axis on the same side with a
                        // higher index. Exit the loop.
                        isOuter = false;
                        return;
                    }
                }
            });
            // There were either no other axes on the same side,
            // or the other axes were not farther from the chart
            return isOuter;
        };
 
        /**
         * Shortcut function to Tick.label.getBBox().width.
         *
         * @return {number} width - the width of the tick label
         */
        Tick.prototype.getLabelWidth = function() {
            return this.label.getBBox().width;
        };
 
        /**
         * Get the maximum label length.
         * This function can be used in states where the axis.maxLabelLength has not
         * been set.
         *
         * @param  {boolean} force - Optional parameter to force a new calculation, even
         *                           if a value has already been set
         * @return {number} maxLabelLength - the maximum label length of the axis
         */
        Axis.prototype.getMaxLabelLength = function(force) {
            var tickPositions = this.tickPositions,
                ticks = this.ticks,
                maxLabelLength = 0;
 
            if (!this.maxLabelLength || force) {
                each(tickPositions, function(tick) {
                    tick = ticks[tick];
                    if (tick && tick.labelLength > maxLabelLength) {
                        maxLabelLength = tick.labelLength;
                    }
                });
                this.maxLabelLength = maxLabelLength;
            }
            return this.maxLabelLength;
        };
 
        /**
         * Adds the axis defined in axis.options.title
         */
        Axis.prototype.addTitle = function() {
            var axis = this,
                renderer = axis.chart.renderer,
                axisParent = axis.axisParent,
                horiz = axis.horiz,
                opposite = axis.opposite,
                options = axis.options,
                axisTitleOptions = options.title,
                hasData,
                showAxis,
                textAlign;
 
            // For reuse in Axis.render
            hasData = axis.hasData();
            axis.showAxis = showAxis = hasData || pick(options.showEmpty, true);
 
            // Disregard title generation in original Axis.getOffset()
            options.title = '';
 
            if (!axis.axisTitle) {
                textAlign = axisTitleOptions.textAlign;
                if (!textAlign) {
                    textAlign = (horiz ? {
                        low: 'left',
                        middle: 'center',
                        high: 'right'
                    } : {
                        low: opposite ? 'right' : 'left',
                        middle: 'center',
                        high: opposite ? 'left' : 'right'
                    })[axisTitleOptions.align];
                }
                axis.axisTitle = renderer.text(
                        axisTitleOptions.text,
                        0,
                        0,
                        axisTitleOptions.useHTML
                    )
                    .attr({
                        zIndex: 7,
                        rotation: axisTitleOptions.rotation || 0,
                        align: textAlign
                    })
                    .addClass('highcharts-axis-title')
 
                // Add to axisParent instead of axisGroup, to ignore the space
                // it takes
                .add(axisParent);
                axis.axisTitle.isNew = true;
            }
 
 
            // hide or show the title depending on whether showEmpty is set
            axis.axisTitle[showAxis ? 'show' : 'hide'](true);
        };
 
        /**
         * Add custom date formats
         */
        H.dateFormats = {
            // Week number
            W: function(timestamp) {
                var date = new Date(timestamp),
                    day = date.getUTCDay() === 0 ? 7 : date.getUTCDay(),
                    time = date.getTime(),
                    startOfYear = new Date(date.getUTCFullYear(), 0, 1, -6),
                    dayNumber;
                date.setDate(date.getUTCDate() + 4 - day);
                dayNumber = Math.floor((time - startOfYear) / 86400000);
                return 1 + Math.floor(dayNumber / 7);
            },
            // First letter of the day of the week, e.g. 'M' for 'Monday'.
            E: function(timestamp) {
                return dateFormat('%a', timestamp, true).charAt(0);
            }
        };
 
        /**
         * Prevents adding the last tick label if the axis is not a category axis.
         *
         * Since numeric labels are normally placed at starts and ends of a range of
         * value, and this module makes the label point at the value, an "extra" label
         * would appear.
         *
         * @param {function} proceed - the original function
         */
        wrap(Tick.prototype, 'addLabel', function(proceed) {
            var axis = this.axis,
                isCategoryAxis = axis.options.categories !== undefined,
                tickPositions = axis.tickPositions,
                lastTick = tickPositions[tickPositions.length - 1],
                isLastTick = this.pos !== lastTick;
 
            if (!axis.options.grid || isCategoryAxis || isLastTick) {
                proceed.apply(this);
            }
        });
 
        /**
         * Center tick labels vertically and horizontally between ticks
         *
         * @param {function} proceed - the original function
         *
         * @return {object} object - an object containing x and y positions
         *                         for the tick
         */
        wrap(Tick.prototype, 'getLabelPosition', function(proceed, x, y, label) {
            var retVal = proceed.apply(this, Array.prototype.slice.call(arguments, 1)),
                axis = this.axis,
                options = axis.options,
                tickInterval = options.tickInterval || 1,
                newX,
                newPos,
                axisHeight,
                fontSize,
                labelMetrics,
                lblB,
                lblH,
                labelCenter;
 
            // Only center tick labels if axis has option grid: true
            if (options.grid) {
                fontSize = options.labels.style.fontSize;
                labelMetrics = axis.chart.renderer.fontMetrics(fontSize, label);
                lblB = labelMetrics.b;
                lblH = labelMetrics.h;
 
                if (axis.horiz && options.categories === undefined) {
                    // Center x position
                    axisHeight = axis.axisGroup.getBBox().height;
                    newPos = this.pos + tickInterval / 2;
                    retVal.x = axis.translate(newPos) + axis.left;
                    labelCenter = (axisHeight / 2) + (lblH / 2) - Math.abs(lblH - lblB);
 
                    // Center y position
                    if (axis.side === axisSide.top) {
                        retVal.y = y - labelCenter;
                    } else {
                        retVal.y = y + labelCenter;
                    }
                } else {
                    // Center y position
                    if (options.categories === undefined) {
                        newPos = this.pos + (tickInterval / 2);
                        retVal.y = axis.translate(newPos) + axis.top + (lblB / 2);
                    }
 
                    // Center x position
                    newX = (this.getLabelWidth() / 2) - (axis.maxLabelLength / 2);
                    if (axis.side === axisSide.left) {
                        retVal.x += newX;
                    } else {
                        retVal.x -= newX;
                    }
                }
            }
            return retVal;
        });
 
 
        /**
         * Draw vertical ticks extra long to create cell floors and roofs.
         * Overrides the tickLength for vertical axes.
         *
         * @param {function} proceed - the original function
         * @returns {array} retVal -
         */
        wrap(Axis.prototype, 'tickSize', function(proceed) {
            var axis = this,
                retVal = proceed.apply(axis, Array.prototype.slice.call(arguments, 1)),
                labelPadding,
                distance;
 
            if (axis.options.grid && !axis.horiz) {
                labelPadding = (Math.abs(axis.defaultLeftAxisOptions.labels.x) * 2);
                if (!axis.maxLabelLength) {
                    axis.maxLabelLength = axis.getMaxLabelLength();
                }
                distance = axis.maxLabelLength + labelPadding;
 
                retVal[0] = distance;
            }
            return retVal;
        });
 
        /**
         * Disregards space required by axisTitle, by adding axisTitle to axisParent
         * instead of axisGroup, and disregarding margins and offsets related to
         * axisTitle.
         *
         * @param {function} proceed - the original function
         */
        wrap(Axis.prototype, 'getOffset', function(proceed) {
            var axis = this,
                axisOffset = axis.chart.axisOffset,
                side = axis.side,
                axisHeight,
                tickSize,
                options = axis.options,
                axisTitleOptions = options.title,
                addTitle = axisTitleOptions &&
                axisTitleOptions.text &&
                axisTitleOptions.enabled !== false;
 
            if (axis.options.grid && isObject(axis.options.title)) {
 
                tickSize = axis.tickSize('tick')[0];
                if (axisOffset[side] && tickSize) {
                    axisHeight = axisOffset[side] + tickSize;
                }
 
                if (addTitle) {
                    // Use the custom addTitle() to add it, while preventing making room
                    // for it
                    axis.addTitle();
                }
 
                proceed.apply(axis, Array.prototype.slice.call(arguments, 1));
 
                axisOffset[side] = pick(axisHeight, axisOffset[side]);
 
 
                // Put axis options back after original Axis.getOffset() has been called
                options.title = axisTitleOptions;
 
            } else {
                proceed.apply(axis, Array.prototype.slice.call(arguments, 1));
            }
        });
 
        /**
         * Prevents rotation of labels when squished, as rotating them would not
         * help.
         *
         * @param {function} proceed - the original function
         */
        wrap(Axis.prototype, 'renderUnsquish', function(proceed) {
            if (this.options.grid) {
                this.labelRotation = 0;
                this.options.labels.rotation = 0;
            }
            proceed.apply(this);
        });
 
        /**
         * Places leftmost tick at the start of the axis, to create a left wall.
         *
         * @param {function} proceed - the original function
         */
        wrap(Axis.prototype, 'setOptions', function(proceed, userOptions) {
            var axis = this;
            if (userOptions.grid && axis.horiz) {
                userOptions.startOnTick = true;
                userOptions.minPadding = 0;
                userOptions.endOnTick = true;
            }
            proceed.apply(this, Array.prototype.slice.call(arguments, 1));
        });
 
        /**
         * Draw an extra line on the far side of the the axisLine,
         * creating cell roofs of a grid.
         *
         * @param {function} proceed - the original function
         */
        wrap(Axis.prototype, 'render', function(proceed) {
            var axis = this,
                options = axis.options,
                labelPadding,
                distance,
                lineWidth,
                linePath,
                yStartIndex,
                yEndIndex,
                xStartIndex,
                xEndIndex,
                renderer = axis.chart.renderer,
                axisGroupBox;
 
            if (options.grid) {
                labelPadding = (Math.abs(axis.defaultLeftAxisOptions.labels.x) * 2);
                distance = axis.maxLabelLength + labelPadding;
                lineWidth = options.lineWidth;
 
                // Remove right wall before rendering
                if (axis.rightWall) {
                    axis.rightWall.destroy();
                }
 
                // Call original Axis.render() to obtain axis.axisLine and
                // axis.axisGroup
                proceed.apply(axis);
 
                axisGroupBox = axis.axisGroup.getBBox();
 
                // Add right wall on horizontal axes
                if (axis.horiz) {
                    axis.rightWall = renderer.path([
                            'M',
                            axisGroupBox.x + axis.width + 1, // account for left wall
                            axisGroupBox.y,
                            'L',
                            axisGroupBox.x + axis.width + 1, // account for left wall
                            axisGroupBox.y + axisGroupBox.height
                        ])
                        .attr({
                            stroke: options.tickColor || '#ccd6eb',
                            'stroke-width': options.tickWidth || 1,
                            zIndex: 7,
                            class: 'grid-wall'
                        })
                        .add(axis.axisGroup);
                }
 
                if (axis.isOuterAxis() && axis.axisLine) {
                    if (axis.horiz) {
                        // -1 to avoid adding distance each time the chart updates
                        distance = axisGroupBox.height - 1;
                    }
 
                    if (lineWidth) {
                        linePath = axis.getLinePath(lineWidth);
                        xStartIndex = linePath.indexOf('M') + 1;
                        xEndIndex = linePath.indexOf('L') + 1;
                        yStartIndex = linePath.indexOf('M') + 2;
                        yEndIndex = linePath.indexOf('L') + 2;
 
                        // Negate distance if top or left axis
                        if (axis.side === axisSide.top || axis.side === axisSide.left) {
                            distance = -distance;
                        }
 
                        // If axis is horizontal, reposition line path vertically
                        if (axis.horiz) {
                            linePath[yStartIndex] = linePath[yStartIndex] + distance;
                            linePath[yEndIndex] = linePath[yEndIndex] + distance;
                        } else {
                            // If axis is vertical, reposition line path horizontally
                            linePath[xStartIndex] = linePath[xStartIndex] + distance;
                            linePath[xEndIndex] = linePath[xEndIndex] + distance;
                        }
 
                        if (!axis.axisLineExtra) {
                            axis.axisLineExtra = renderer.path(linePath)
                                .attr({
                                    stroke: options.lineColor,
                                    'stroke-width': lineWidth,
                                    zIndex: 7
                                })
                                .add(axis.axisGroup);
                        } else {
                            axis.axisLineExtra.animate({
                                d: linePath
                            });
                        }
 
                        // show or hide the line depending on options.showEmpty
                        axis.axisLine[axis.showAxis ? 'show' : 'hide'](true);
                    }
                }
            } else {
                proceed.apply(axis);
            }
        });
 
        /**
         * Wraps chart rendering with the following customizations:
         * 1. Prohibit timespans of multitudes of a time unit
         * 2. Draw cell walls on vertical axes
         *
         * @param {function} proceed - the original function
         */
        wrap(Chart.prototype, 'render', function(proceed) {
            // 25 is optimal height for default fontSize (11px)
            // 25 / 11 ≈ 2.28
            var fontSizeToCellHeightRatio = 25 / 11,
                fontMetrics,
                fontSize;
 
            each(this.axes, function(axis) {
                var options = axis.options;
                if (options.grid) {
                    fontSize = options.labels.style.fontSize;
                    fontMetrics = axis.chart.renderer.fontMetrics(fontSize);
 
                    // Prohibit timespans of multitudes of a time unit,
                    // e.g. two days, three weeks, etc.
                    if (options.type === 'datetime') {
                        options.units = [
                            ['millisecond', [1]],
                            ['second', [1]],
                            ['minute', [1]],
                            ['hour', [1]],
                            ['day', [1]],
                            ['week', [1]],
                            ['month', [1]],
                            ['year', null]
                        ];
                    }
 
                    // Make tick marks taller, creating cell walls of a grid.
                    // Use cellHeight axis option if set
                    if (axis.horiz) {
                        options.tickLength = options.cellHeight ||
                            fontMetrics.h * fontSizeToCellHeightRatio;
                    } else {
                        options.tickWidth = 1;
                        if (!options.lineWidth) {
                            options.lineWidth = 1;
                        }
                    }
                }
            });
 
            // Call original Chart.render()
            proceed.apply(this);
        });
 
    }(Highcharts));
    (function(H) {
        /**
         * (c) 2014-2016 Highsoft AS
         * Authors: Torstein Honsi, Lars A. V. Cabrera
         *
         * License: www.highcharts.com/license
         */
        'use strict';
 
        var defaultPlotOptions = H.getOptions().plotOptions,
            color = H.Color,
            columnType = H.seriesTypes.column,
            each = H.each,
            extendClass = H.extendClass,
            isNumber = H.isNumber,
            isObject = H.isObject,
            merge = H.merge,
            pick = H.pick,
            seriesTypes = H.seriesTypes,
            wrap = H.wrap,
            Axis = H.Axis,
            Point = H.Point,
            Series = H.Series,
            pointFormat = '<span style="color:{point.color}">' +
            '\u25CF' +
            '</span> {series.name}: <b>{point.yCategory}</b><br/>',
            xrange = 'xrange';
 
        defaultPlotOptions.xrange = merge(defaultPlotOptions.column, {
            tooltip: {
                pointFormat: pointFormat
            }
        });
        seriesTypes.xrange = extendClass(columnType, {
            pointClass: extendClass(Point, {
                // Add x2 and yCategory to the available properties for tooltip formats
                getLabelConfig: function() {
                    var cfg = Point.prototype.getLabelConfig.call(this);
 
                    cfg.x2 = this.x2;
                    cfg.yCategory = this.yCategory = this.series.yAxis.categories && this.series.yAxis.categories[this.y];
                    return cfg;
                }
            }),
            type: xrange,
            forceDL: true,
            parallelArrays: ['x', 'x2', 'y'],
            requireSorting: false,
            animate: seriesTypes.line.prototype.animate,
 
            /**
             * Borrow the column series metrics, but with swapped axes. This gives free access
             * to features like groupPadding, grouping, pointWidth etc.
             */
            getColumnMetrics: function() {
                var metrics,
                    chart = this.chart;
 
                function swapAxes() {
                    each(chart.series, function(s) {
                        var xAxis = s.xAxis;
                        s.xAxis = s.yAxis;
                        s.yAxis = xAxis;
                    });
                }
 
                swapAxes();
 
                this.yAxis.closestPointRange = 1;
                metrics = columnType.prototype.getColumnMetrics.call(this);
 
                swapAxes();
 
                return metrics;
            },
 
            /**
             * Override cropData to show a point where x is outside visible range
             * but x2 is outside.
             */
            cropData: function(xData, yData, min, max) {
 
                // Replace xData with x2Data to find the appropriate cropStart
                var cropData = Series.prototype.cropData,
                    crop = cropData.call(this, this.x2Data, yData, min, max);
 
                // Re-insert the cropped xData
                crop.xData = xData.slice(crop.start, crop.end);
 
                return crop;
            },
 
            translate: function() {
                columnType.prototype.translate.apply(this, arguments);
                var series = this,
                    xAxis = series.xAxis,
                    metrics = series.columnMetrics,
                    minPointLength = series.options.minPointLength || 0;
 
                each(series.points, function(point) {
                    var plotX = point.plotX,
                        posX = pick(point.x2, point.x + (point.len || 0)),
                        plotX2 = xAxis.toPixels(posX, true),
                        width = plotX2 - plotX,
                        widthDifference,
                        shapeArgs,
                        partialFill;
 
                    if (minPointLength) {
                        widthDifference = minPointLength - width;
                        if (widthDifference < 0) {
                            widthDifference = 0;
                        }
                        plotX -= widthDifference / 2;
                        plotX2 += widthDifference / 2;
                    }
 
                    plotX = Math.max(plotX, -10);
                    plotX2 = Math.min(Math.max(plotX2, -10), xAxis.len + 10);
 
                    point.shapeArgs = {
                        x: plotX,
                        y: point.plotY + metrics.offset,
                        width: plotX2 - plotX,
                        height: metrics.width
                    };
                    point.tooltipPos[0] += width / 2;
                    point.tooltipPos[1] -= metrics.width / 2;
 
                    // Add a partShapeArgs to the point, based on the shapeArgs property
                    partialFill = point.partialFill;
                    if (partialFill) {
                        // Get the partial fill amount
                        if (isObject(partialFill)) {
                            partialFill = partialFill.amount;
                        }
                        // If it was not a number, assume 0
                        if (!isNumber(partialFill)) {
                            partialFill = 0;
                        }
                        shapeArgs = point.shapeArgs;
                        point.partShapeArgs = {
                            x: shapeArgs.x,
                            y: shapeArgs.y + 1,
                            width: shapeArgs.width * partialFill,
                            height: shapeArgs.height - 2
                        };
                    }
                });
            },
 
            drawPoints: function() {
                var series = this,
                    chart = this.chart,
                    options = series.options,
                    renderer = chart.renderer,
                    animationLimit = options.animationLimit || 250,
                    verb = chart.pointCount < animationLimit ? 'animate' : 'attr';
 
                // draw the columns
                each(series.points, function(point) {
                    var plotY = point.plotY,
                        graphic = point.graphic,
                        type = point.shapeType,
                        shapeArgs = point.shapeArgs,
                        partShapeArgs = point.partShapeArgs,
                        seriesOpts = series.options,
                        pfOptions = point.partialFill,
                        fill,
                        state = point.selected && 'select',
                        cutOff = options.stacking && !options.borderRadius;
 
                    if (isNumber(plotY) && point.y !== null) {
                        if (graphic) { // update
                            point.graphicOriginal[verb](
                                merge(shapeArgs)
                            );
                            if (partShapeArgs) {
                                point.graphicOverlay[verb](
                                    merge(partShapeArgs)
                                );
                            }
 
                        } else {
                            point.graphic = graphic = renderer.g('point')
                                .attr({
                                    'class': point.getClassName()
                                })
                                .add(point.group || series.group);
 
                            point.graphicOriginal = renderer[type](shapeArgs)
                                .addClass('highcharts-partfill-original')
                                .add(graphic);
                            if (partShapeArgs) {
                                point.graphicOverlay = renderer[type](partShapeArgs)
                                    .addClass('highcharts-partfill-overlay')
                                    .add(graphic);
                            }
                        }
 
 
 
                    } else if (graphic) {
                        point.graphic = graphic.destroy(); // #1269
                    }
                });
            }
        });
 
        /**
         * Max x2 should be considered in xAxis extremes
         */
        wrap(Axis.prototype, 'getSeriesExtremes', function(proceed) {
            var axis = this,
                series = axis.series,
                dataMax,
                modMax;
 
            proceed.call(this);
            if (axis.isXAxis && series.type === xrange) {
                dataMax = pick(axis.dataMax, Number.MIN_VALUE);
                each(this.series, function(series) {
                    each(series.x2Data || [], function(val) {
                        if (val > dataMax) {
                            dataMax = val;
                            modMax = true;
                        }
                    });
                });
                if (modMax) {
                    axis.dataMax = dataMax;
                }
            }
        });
 
    }(Highcharts));
    (function(H) {
        /**
         * (c) 2016 Highsoft AS
         * Authors: Lars A. V. Cabrera
         *
         * License: www.highcharts.com/license
         */
        'use strict';
        // 
    }(Highcharts));
}));