app/assets/javascripts/highcharts/modules/funnel.js in highcharts-rails-4.2.0 vs app/assets/javascripts/highcharts/modules/funnel.js in highcharts-rails-4.2.2

- old
+ new

@@ -1,10 +1,10 @@ /** * @license * Highcharts funnel module * - * (c) 2010-2014 Torstein Honsi + * (c) 2010-2016 Torstein Honsi * * License: www.highcharts.com/license */ /* eslint indent:0 */ (function (factory) { @@ -229,27 +229,33 @@ */ drawPoints: function () { var series = this, options = series.options, chart = series.chart, - renderer = chart.renderer; + renderer = chart.renderer, + pointOptions, + pointAttr, + shapeArgs, + graphic; each(series.data, function (point) { - var pointOptions = point.options, - graphic = point.graphic, - shapeArgs = point.shapeArgs; + pointOptions = point.options; + graphic = point.graphic; + shapeArgs = point.shapeArgs; + pointAttr = { + fill: point.color, + stroke: pick(pointOptions.borderColor, options.borderColor), + 'stroke-width': pick(pointOptions.borderWidth, options.borderWidth) + }; + if (!graphic) { // Create the shapes point.graphic = renderer.path(shapeArgs) - .attr({ - fill: point.color, - stroke: pick(pointOptions.borderColor, options.borderColor), - 'stroke-width': pick(pointOptions.borderWidth, options.borderWidth) - }) + .attr(pointAttr) .add(series.group); } else { // Update the shapes - graphic.animate(shapeArgs); + graphic.attr(pointAttr).animate(shapeArgs); } }); }, /**