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
| (function (H) { H.wrap(H.seriesTypes.column.prototype, 'translate', function (proceed) { var options = this.options, rTopLeft = options.borderRadiusTopLeft || 0, rTopRight = options.borderRadiusTopRight || 0, rBottomRight = options.borderRadiusBottomRight || 0, rBottomLeft = options.borderRadiusBottomLeft || 0;
proceed.call(this);
if (rTopLeft || rTopRight || rBottomRight || rBottomLeft) { H.each(this.points, function (point) { var shapeArgs = point.shapeArgs, w = shapeArgs.width, h = shapeArgs.height, x = shapeArgs.x, y = shapeArgs.y;
point.dlBox = point.shapeArgs;
point.shapeType = 'path'; point.shapeArgs = { d: [ 'M', x + rTopLeft, y, 'L', x + w - rTopRight, y, 'C', x + w - rTopRight / 2, y, x + w, y + rTopRight / 2, x + w, y + rTopRight, 'L', x + w, y + h - rBottomRight, 'C', x + w, y + h - rBottomRight / 2, x + w - rBottomRight / 2, y + h, x + w - rBottomRight, y + h, 'L', x + rBottomLeft, y + h, 'C', x + rBottomLeft / 2, y + h, x, y + h - rBottomLeft / 2, x, y + h - rBottomLeft, 'L', x, y + rTopLeft, 'C', x, y + rTopLeft / 2, x + rTopLeft / 2, y, x + rTopLeft, y, 'Z' ] }; }); } }); }(Highcharts));
|