app/assets/javascripts/highcharts/modules/funnel.js in highcharts-rails-3.0.2 vs app/assets/javascripts/highcharts/modules/funnel.js in highcharts-rails-3.0.3

- old
+ new

@@ -92,11 +92,11 @@ x4, y5; // Return the width at a specific y coordinate series.getWidthAt = getWidthAt = function (y) { - return y > height - neckHeight ? + return y > height - neckHeight || height === neckHeight ? neckWidth : neckWidth + (width - neckWidth) * ((height - neckHeight - y) / (height - neckHeight)); }; series.getX = function (y, half) { return centerX + (half ? -1 : 1) * ((getWidthAt(y) / 2) + options.dataLabels.distance); @@ -135,10 +135,10 @@ each(data, function (point) { // set start and end positions y5 = null; fraction = sum ? point.y / sum : 0; - y1 = cumulative * height; + y1 = centerY - height / 2 + cumulative * height; y3 = y1 + fraction * height; //tempWidth = neckWidth + (width - neckWidth) * ((height - neckHeight - y1) / (height - neckHeight)); tempWidth = getWidthAt(y1); x1 = centerX - tempWidth / 2; x2 = x1 + tempWidth;