highcharts-rails 4.2.7 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +34 -0
- data/Gemfile +4 -0
- data/Rakefile +53 -32
- data/app/assets/javascripts/highcharts.js +18775 -17176
- data/app/assets/javascripts/highcharts/highcharts-3d.js +1849 -1563
- data/app/assets/javascripts/highcharts/highcharts-more.js +2162 -1988
- data/app/assets/javascripts/highcharts/modules/accessibility.js +1005 -0
- data/app/assets/javascripts/highcharts/modules/annotations.js +408 -401
- data/app/assets/javascripts/highcharts/modules/boost.js +561 -546
- data/app/assets/javascripts/highcharts/modules/broken-axis.js +330 -324
- data/app/assets/javascripts/highcharts/modules/data.js +973 -965
- data/app/assets/javascripts/highcharts/modules/drilldown.js +783 -723
- data/app/assets/javascripts/highcharts/modules/exporting.js +864 -785
- data/app/assets/javascripts/highcharts/modules/funnel.js +290 -306
- data/app/assets/javascripts/highcharts/modules/heatmap.js +701 -645
- data/app/assets/javascripts/highcharts/modules/no-data-to-display.js +150 -132
- data/app/assets/javascripts/highcharts/modules/offline-exporting.js +414 -355
- data/app/assets/javascripts/highcharts/modules/overlapping-datalabels.js +164 -0
- data/app/assets/javascripts/highcharts/modules/series-label.js +473 -448
- data/app/assets/javascripts/highcharts/modules/solid-gauge.js +279 -271
- data/app/assets/javascripts/highcharts/modules/treemap.js +921 -886
- data/app/assets/javascripts/highcharts/themes/dark-blue.js +307 -244
- data/app/assets/javascripts/highcharts/themes/dark-green.js +303 -244
- data/app/assets/javascripts/highcharts/themes/dark-unica.js +231 -201
- data/app/assets/javascripts/highcharts/themes/gray.js +314 -245
- data/app/assets/javascripts/highcharts/themes/grid-light.js +91 -66
- data/app/assets/javascripts/highcharts/themes/grid.js +124 -96
- data/app/assets/javascripts/highcharts/themes/sand-signika.js +119 -94
- data/app/assets/javascripts/highcharts/themes/skies.js +108 -85
- data/lib/highcharts/version.rb +1 -1
- metadata +13 -14
- data/app/assets/javascripts/highcharts/adapters/standalone-framework.js +0 -1
- data/app/assets/javascripts/highcharts/modules/canvas-tools.js +0 -3115
- data/app/assets/javascripts/highcharts/modules/map.js +0 -2117
| @@ -1,320 +1,304 @@ | |
| 1 1 | 
             
            /**
         | 
| 2 | 
            -
             * @license 
         | 
| 2 | 
            +
             * @license Highcharts JS v5.0.0 (2016-09-29)
         | 
| 3 3 | 
             
             * Highcharts funnel module
         | 
| 4 4 | 
             
             *
         | 
| 5 5 | 
             
             * (c) 2010-2016 Torstein Honsi
         | 
| 6 6 | 
             
             *
         | 
| 7 7 | 
             
             * License: www.highcharts.com/license
         | 
| 8 8 | 
             
             */
         | 
| 9 | 
            -
             | 
| 10 | 
            -
            (function (factory) {
         | 
| 9 | 
            +
            (function(factory) {
         | 
| 11 10 | 
             
                if (typeof module === 'object' && module.exports) {
         | 
| 12 11 | 
             
                    module.exports = factory;
         | 
| 13 12 | 
             
                } else {
         | 
| 14 13 | 
             
                    factory(Highcharts);
         | 
| 15 14 | 
             
                }
         | 
| 16 | 
            -
            }(function | 
| 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 | 
            -
             * Pyramid series type.
         | 
| 309 | 
            -
             * A pyramid series is a special type of funnel, without neck and reversed by default.
         | 
| 310 | 
            -
             */
         | 
| 311 | 
            -
            defaultOptions.plotOptions.pyramid = Highcharts.merge(defaultOptions.plotOptions.funnel, {        
         | 
| 312 | 
            -
            	neckWidth: '0%',
         | 
| 313 | 
            -
            	neckHeight: '0%',
         | 
| 314 | 
            -
            	reversed: true
         | 
| 315 | 
            -
            });
         | 
| 316 | 
            -
            Highcharts.seriesTypes.pyramid = Highcharts.extendClass(Highcharts.seriesTypes.funnel, {
         | 
| 317 | 
            -
            	type: 'pyramid'
         | 
| 318 | 
            -
            });
         | 
| 15 | 
            +
            }(function(Highcharts) {
         | 
| 16 | 
            +
                (function(Highcharts) {
         | 
| 17 | 
            +
                    /**
         | 
| 18 | 
            +
                     * Highcharts funnel module
         | 
| 19 | 
            +
                     *
         | 
| 20 | 
            +
                     * (c) 2010-2016 Torstein Honsi
         | 
| 21 | 
            +
                     *
         | 
| 22 | 
            +
                     * License: www.highcharts.com/license
         | 
| 23 | 
            +
                     */
         | 
| 24 | 
            +
                    /* eslint indent:0 */
         | 
| 25 | 
            +
                    'use strict';
         | 
| 26 | 
            +
             | 
| 27 | 
            +
                    // create shortcuts
         | 
| 28 | 
            +
                    var seriesType = Highcharts.seriesType,
         | 
| 29 | 
            +
                        seriesTypes = Highcharts.seriesTypes,
         | 
| 30 | 
            +
                        noop = Highcharts.noop,
         | 
| 31 | 
            +
                        each = Highcharts.each;
         | 
| 32 | 
            +
             | 
| 33 | 
            +
             | 
| 34 | 
            +
                    seriesType('funnel', 'pie', {
         | 
| 35 | 
            +
                            animation: false,
         | 
| 36 | 
            +
                            center: ['50%', '50%'],
         | 
| 37 | 
            +
                            width: '90%',
         | 
| 38 | 
            +
                            neckWidth: '30%',
         | 
| 39 | 
            +
                            height: '100%',
         | 
| 40 | 
            +
                            neckHeight: '25%',
         | 
| 41 | 
            +
                            reversed: false,
         | 
| 42 | 
            +
                            size: true, // to avoid adapting to data label size in Pie.drawDataLabels
         | 
| 43 | 
            +
             | 
| 44 | 
            +
             | 
| 45 | 
            +
                            // Presentational
         | 
| 46 | 
            +
                            dataLabels: {
         | 
| 47 | 
            +
                                //position: 'right',
         | 
| 48 | 
            +
                                connectorWidth: 1
         | 
| 49 | 
            +
                                    //connectorColor: null
         | 
| 50 | 
            +
                            },
         | 
| 51 | 
            +
                            states: {
         | 
| 52 | 
            +
                                select: {
         | 
| 53 | 
            +
                                    color: '#cccccc',
         | 
| 54 | 
            +
                                    borderColor: '#000000',
         | 
| 55 | 
            +
                                    shadow: false
         | 
| 56 | 
            +
                                }
         | 
| 57 | 
            +
                            }
         | 
| 58 | 
            +
             | 
| 59 | 
            +
                        },
         | 
| 60 | 
            +
             | 
| 61 | 
            +
                        // Properties
         | 
| 62 | 
            +
                        {
         | 
| 63 | 
            +
                            animate: noop,
         | 
| 64 | 
            +
             | 
| 65 | 
            +
                            /**
         | 
| 66 | 
            +
                             * Overrides the pie translate method
         | 
| 67 | 
            +
                             */
         | 
| 68 | 
            +
                            translate: function() {
         | 
| 69 | 
            +
             | 
| 70 | 
            +
                                var
         | 
| 71 | 
            +
                                // Get positions - either an integer or a percentage string must be given
         | 
| 72 | 
            +
                                    getLength = function(length, relativeTo) {
         | 
| 73 | 
            +
                                        return (/%$/).test(length) ?
         | 
| 74 | 
            +
                                            relativeTo * parseInt(length, 10) / 100 :
         | 
| 75 | 
            +
                                            parseInt(length, 10);
         | 
| 76 | 
            +
                                    },
         | 
| 77 | 
            +
             | 
| 78 | 
            +
                                    sum = 0,
         | 
| 79 | 
            +
                                    series = this,
         | 
| 80 | 
            +
                                    chart = series.chart,
         | 
| 81 | 
            +
                                    options = series.options,
         | 
| 82 | 
            +
                                    reversed = options.reversed,
         | 
| 83 | 
            +
                                    ignoreHiddenPoint = options.ignoreHiddenPoint,
         | 
| 84 | 
            +
                                    plotWidth = chart.plotWidth,
         | 
| 85 | 
            +
                                    plotHeight = chart.plotHeight,
         | 
| 86 | 
            +
                                    cumulative = 0, // start at top
         | 
| 87 | 
            +
                                    center = options.center,
         | 
| 88 | 
            +
                                    centerX = getLength(center[0], plotWidth),
         | 
| 89 | 
            +
                                    centerY = getLength(center[1], plotHeight),
         | 
| 90 | 
            +
                                    width = getLength(options.width, plotWidth),
         | 
| 91 | 
            +
                                    tempWidth,
         | 
| 92 | 
            +
                                    getWidthAt,
         | 
| 93 | 
            +
                                    height = getLength(options.height, plotHeight),
         | 
| 94 | 
            +
                                    neckWidth = getLength(options.neckWidth, plotWidth),
         | 
| 95 | 
            +
                                    neckHeight = getLength(options.neckHeight, plotHeight),
         | 
| 96 | 
            +
                                    neckY = (centerY - height / 2) + height - neckHeight,
         | 
| 97 | 
            +
                                    data = series.data,
         | 
| 98 | 
            +
                                    path,
         | 
| 99 | 
            +
                                    fraction,
         | 
| 100 | 
            +
                                    half = options.dataLabels.position === 'left' ? 1 : 0,
         | 
| 101 | 
            +
             | 
| 102 | 
            +
                                    x1,
         | 
| 103 | 
            +
                                    y1,
         | 
| 104 | 
            +
                                    x2,
         | 
| 105 | 
            +
                                    x3,
         | 
| 106 | 
            +
                                    y3,
         | 
| 107 | 
            +
                                    x4,
         | 
| 108 | 
            +
                                    y5;
         | 
| 109 | 
            +
             | 
| 110 | 
            +
                                // Return the width at a specific y coordinate
         | 
| 111 | 
            +
                                series.getWidthAt = getWidthAt = function(y) {
         | 
| 112 | 
            +
                                    var top = (centerY - height / 2);
         | 
| 113 | 
            +
             | 
| 114 | 
            +
                                    return y > neckY || height === neckHeight ?
         | 
| 115 | 
            +
                                        neckWidth :
         | 
| 116 | 
            +
                                        neckWidth + (width - neckWidth) * (1 - (y - top) / (height - neckHeight));
         | 
| 117 | 
            +
                                };
         | 
| 118 | 
            +
                                series.getX = function(y, half) {
         | 
| 119 | 
            +
                                    return centerX + (half ? -1 : 1) * ((getWidthAt(reversed ? 2 * centerY - y : y) / 2) + options.dataLabels.distance);
         | 
| 120 | 
            +
                                };
         | 
| 121 | 
            +
             | 
| 122 | 
            +
                                // Expose
         | 
| 123 | 
            +
                                series.center = [centerX, centerY, height];
         | 
| 124 | 
            +
                                series.centerX = centerX;
         | 
| 125 | 
            +
             | 
| 126 | 
            +
                                /*
         | 
| 127 | 
            +
                                 * Individual point coordinate naming:
         | 
| 128 | 
            +
                                 *
         | 
| 129 | 
            +
                                 * x1,y1 _________________ x2,y1
         | 
| 130 | 
            +
                                 *  \                         /
         | 
| 131 | 
            +
                                 *   \                       /
         | 
| 132 | 
            +
                                 *    \                     /
         | 
| 133 | 
            +
                                 *     \                   /
         | 
| 134 | 
            +
                                 *      \                 /
         | 
| 135 | 
            +
                                 *     x3,y3 _________ x4,y3
         | 
| 136 | 
            +
                                 *
         | 
| 137 | 
            +
                                 * Additional for the base of the neck:
         | 
| 138 | 
            +
                                 *
         | 
| 139 | 
            +
                                 *       |               |
         | 
| 140 | 
            +
                                 *       |               |
         | 
| 141 | 
            +
                                 *       |               |
         | 
| 142 | 
            +
                                 *     x3,y5 _________ x4,y5
         | 
| 143 | 
            +
                                 */
         | 
| 144 | 
            +
             | 
| 145 | 
            +
             | 
| 146 | 
            +
             | 
| 147 | 
            +
             | 
| 148 | 
            +
                                // get the total sum
         | 
| 149 | 
            +
                                each(data, function(point) {
         | 
| 150 | 
            +
                                    if (!ignoreHiddenPoint || point.visible !== false) {
         | 
| 151 | 
            +
                                        sum += point.y;
         | 
| 152 | 
            +
                                    }
         | 
| 153 | 
            +
                                });
         | 
| 154 | 
            +
             | 
| 155 | 
            +
                                each(data, function(point) {
         | 
| 156 | 
            +
                                    // set start and end positions
         | 
| 157 | 
            +
                                    y5 = null;
         | 
| 158 | 
            +
                                    fraction = sum ? point.y / sum : 0;
         | 
| 159 | 
            +
                                    y1 = centerY - height / 2 + cumulative * height;
         | 
| 160 | 
            +
                                    y3 = y1 + fraction * height;
         | 
| 161 | 
            +
                                    //tempWidth = neckWidth + (width - neckWidth) * ((height - neckHeight - y1) / (height - neckHeight));
         | 
| 162 | 
            +
                                    tempWidth = getWidthAt(y1);
         | 
| 163 | 
            +
                                    x1 = centerX - tempWidth / 2;
         | 
| 164 | 
            +
                                    x2 = x1 + tempWidth;
         | 
| 165 | 
            +
                                    tempWidth = getWidthAt(y3);
         | 
| 166 | 
            +
                                    x3 = centerX - tempWidth / 2;
         | 
| 167 | 
            +
                                    x4 = x3 + tempWidth;
         | 
| 168 | 
            +
             | 
| 169 | 
            +
                                    // the entire point is within the neck
         | 
| 170 | 
            +
                                    if (y1 > neckY) {
         | 
| 171 | 
            +
                                        x1 = x3 = centerX - neckWidth / 2;
         | 
| 172 | 
            +
                                        x2 = x4 = centerX + neckWidth / 2;
         | 
| 173 | 
            +
             | 
| 174 | 
            +
                                        // the base of the neck
         | 
| 175 | 
            +
                                    } else if (y3 > neckY) {
         | 
| 176 | 
            +
                                        y5 = y3;
         | 
| 177 | 
            +
             | 
| 178 | 
            +
                                        tempWidth = getWidthAt(neckY);
         | 
| 179 | 
            +
                                        x3 = centerX - tempWidth / 2;
         | 
| 180 | 
            +
                                        x4 = x3 + tempWidth;
         | 
| 181 | 
            +
             | 
| 182 | 
            +
                                        y3 = neckY;
         | 
| 183 | 
            +
                                    }
         | 
| 184 | 
            +
             | 
| 185 | 
            +
                                    if (reversed) {
         | 
| 186 | 
            +
                                        y1 = 2 * centerY - y1;
         | 
| 187 | 
            +
                                        y3 = 2 * centerY - y3;
         | 
| 188 | 
            +
                                        y5 = (y5 ? 2 * centerY - y5 : null);
         | 
| 189 | 
            +
                                    }
         | 
| 190 | 
            +
                                    // save the path
         | 
| 191 | 
            +
                                    path = [
         | 
| 192 | 
            +
                                        'M',
         | 
| 193 | 
            +
                                        x1, y1,
         | 
| 194 | 
            +
                                        'L',
         | 
| 195 | 
            +
                                        x2, y1,
         | 
| 196 | 
            +
                                        x4, y3
         | 
| 197 | 
            +
                                    ];
         | 
| 198 | 
            +
                                    if (y5) {
         | 
| 199 | 
            +
                                        path.push(x4, y5, x3, y5);
         | 
| 200 | 
            +
                                    }
         | 
| 201 | 
            +
                                    path.push(x3, y3, 'Z');
         | 
| 202 | 
            +
             | 
| 203 | 
            +
                                    // prepare for using shared dr
         | 
| 204 | 
            +
                                    point.shapeType = 'path';
         | 
| 205 | 
            +
                                    point.shapeArgs = {
         | 
| 206 | 
            +
                                        d: path
         | 
| 207 | 
            +
                                    };
         | 
| 208 | 
            +
             | 
| 209 | 
            +
             | 
| 210 | 
            +
                                    // for tooltips and data labels
         | 
| 211 | 
            +
                                    point.percentage = fraction * 100;
         | 
| 212 | 
            +
                                    point.plotX = centerX;
         | 
| 213 | 
            +
                                    point.plotY = (y1 + (y5 || y3)) / 2;
         | 
| 214 | 
            +
             | 
| 215 | 
            +
                                    // Placement of tooltips and data labels
         | 
| 216 | 
            +
                                    point.tooltipPos = [
         | 
| 217 | 
            +
                                        centerX,
         | 
| 218 | 
            +
                                        point.plotY
         | 
| 219 | 
            +
                                    ];
         | 
| 220 | 
            +
             | 
| 221 | 
            +
                                    // Slice is a noop on funnel points
         | 
| 222 | 
            +
                                    point.slice = noop;
         | 
| 223 | 
            +
             | 
| 224 | 
            +
                                    // Mimicking pie data label placement logic
         | 
| 225 | 
            +
                                    point.half = half;
         | 
| 226 | 
            +
             | 
| 227 | 
            +
                                    if (!ignoreHiddenPoint || point.visible !== false) {
         | 
| 228 | 
            +
                                        cumulative += fraction;
         | 
| 229 | 
            +
                                    }
         | 
| 230 | 
            +
                                });
         | 
| 231 | 
            +
                            },
         | 
| 232 | 
            +
                            /**
         | 
| 233 | 
            +
                             * Draw a single point (wedge)
         | 
| 234 | 
            +
                             * @param {Object} point The point object
         | 
| 235 | 
            +
                             * @param {Object} color The color of the point
         | 
| 236 | 
            +
                             * @param {Number} brightness The brightness relative to the color
         | 
| 237 | 
            +
                             */
         | 
| 238 | 
            +
                            drawPoints: seriesTypes.column.prototype.drawPoints,
         | 
| 239 | 
            +
             | 
| 240 | 
            +
                            /**
         | 
| 241 | 
            +
                             * Funnel items don't have angles (#2289)
         | 
| 242 | 
            +
                             */
         | 
| 243 | 
            +
                            sortByAngle: function(points) {
         | 
| 244 | 
            +
                                points.sort(function(a, b) {
         | 
| 245 | 
            +
                                    return a.plotY - b.plotY;
         | 
| 246 | 
            +
                                });
         | 
| 247 | 
            +
                            },
         | 
| 248 | 
            +
             | 
| 249 | 
            +
                            /**
         | 
| 250 | 
            +
                             * Extend the pie data label method
         | 
| 251 | 
            +
                             */
         | 
| 252 | 
            +
                            drawDataLabels: function() {
         | 
| 253 | 
            +
                                var data = this.data,
         | 
| 254 | 
            +
                                    labelDistance = this.options.dataLabels.distance,
         | 
| 255 | 
            +
                                    leftSide,
         | 
| 256 | 
            +
                                    sign,
         | 
| 257 | 
            +
                                    point,
         | 
| 258 | 
            +
                                    i = data.length,
         | 
| 259 | 
            +
                                    x,
         | 
| 260 | 
            +
                                    y;
         | 
| 261 | 
            +
             | 
| 262 | 
            +
                                // In the original pie label anticollision logic, the slots are distributed
         | 
| 263 | 
            +
                                // from one labelDistance above to one labelDistance below the pie. In funnels
         | 
| 264 | 
            +
                                // we don't want this.
         | 
| 265 | 
            +
                                this.center[2] -= 2 * labelDistance;
         | 
| 266 | 
            +
             | 
| 267 | 
            +
                                // Set the label position array for each point.
         | 
| 268 | 
            +
                                while (i--) {
         | 
| 269 | 
            +
                                    point = data[i];
         | 
| 270 | 
            +
                                    leftSide = point.half;
         | 
| 271 | 
            +
                                    sign = leftSide ? 1 : -1;
         | 
| 272 | 
            +
                                    y = point.plotY;
         | 
| 273 | 
            +
                                    x = this.getX(y, leftSide);
         | 
| 274 | 
            +
             | 
| 275 | 
            +
                                    // set the anchor point for data labels
         | 
| 276 | 
            +
                                    point.labelPos = [
         | 
| 277 | 
            +
                                        0, // first break of connector
         | 
| 278 | 
            +
                                        y, // a/a
         | 
| 279 | 
            +
                                        x + (labelDistance - 5) * sign, // second break, right outside point shape
         | 
| 280 | 
            +
                                        y, // a/a
         | 
| 281 | 
            +
                                        x + labelDistance * sign, // landing point for connector
         | 
| 282 | 
            +
                                        y, // a/a
         | 
| 283 | 
            +
                                        leftSide ? 'right' : 'left', // alignment
         | 
| 284 | 
            +
                                        0 // center angle
         | 
| 285 | 
            +
                                    ];
         | 
| 286 | 
            +
                                }
         | 
| 287 | 
            +
             | 
| 288 | 
            +
                                seriesTypes.pie.prototype.drawDataLabels.call(this);
         | 
| 289 | 
            +
                            }
         | 
| 290 | 
            +
             | 
| 291 | 
            +
                        });
         | 
| 292 | 
            +
             | 
| 293 | 
            +
                    /** 
         | 
| 294 | 
            +
                     * Pyramid series type.
         | 
| 295 | 
            +
                     * A pyramid series is a special type of funnel, without neck and reversed by default.
         | 
| 296 | 
            +
                     */
         | 
| 297 | 
            +
                    seriesType('pyramid', 'funnel', {
         | 
| 298 | 
            +
                        neckWidth: '0%',
         | 
| 299 | 
            +
                        neckHeight: '0%',
         | 
| 300 | 
            +
                        reversed: true
         | 
| 301 | 
            +
                    });
         | 
| 319 302 |  | 
| 303 | 
            +
                }(Highcharts));
         | 
| 320 304 | 
             
            }));
         |