Yes, there is a workaround. You can achieve this by using the attr () function of jQuery. When you click on the rectangle, you change the stroke width attribute.
But I think this is a good point to report, perhaps as an API error?
In any case, the JS code will look like this:
$(function () { var renderer = new Highcharts.Renderer( $('#container')[0], 400, 300 ), rect = renderer.rect(100, 100, 100, 100, 5) .attr({ 'stroke-width': 2, stroke: 'gray', fill: 'silver', zIndex: 3 }) .on('click', function () { rect.animate({ x: 50, y: 50, width: 200, height: 20 }) $("rect").attr("stroke-width", "30");
To see it in action, adjusted JSFIDDLE
VERSION 2
Based on your comment, I am editing the code. In this case, you will also set the stroke width animation. This is a simple solution. Another solution would be to configure the original Highcharts library, which I would not recommend. Anyway, hope this helps:
$(function () { var renderer = new Highcharts.Renderer( $('#container')[0], 400, 300 ), rect = renderer.rect(100, 100, 100, 100, 5) .attr({ 'stroke-width': 2, stroke: 'gray', fill: 'silver', zIndex: 3 }) .on('click', function () { rect.animate({ x: 50, y: 50, width: 200, height: 20 }) $("rect").animate( { "stroke-width": "10" }, { duration: 500, step: function(now) { $(this).attr("stroke-width", now); } }); }) .add(); });
Duration can be adjusted to suit your needs. See here in action: JSFIDDLE