score:0

It is possible to get width from arcs that are created in chart's background. Then use that calculated width to update series. Here all panes are of equal width, so it is possible to get one width and set it to all series.

Example: http://jsfiddle.net/xs0gj2zu/

var token = true;
Highcharts.chart('container', {

    chart: {
        type: 'solidgauge',
        marginTop: 50,
        events:{
            load: function(){
                token = false;
              var each = Highcharts.each,
                  series = this.series,
                  band = this.yAxis[0].plotLinesAndBands[0],
                  d = band.svgElem.d.split(" "),
                  width = parseFloat(d[13]) - parseFloat(d[2]);

              each(series, function(s){
                s.update({borderWidth: width}, false);
              });
              this.redraw();
              token = true;
          },
            redraw: function(){
            if(token) {
                token = false;

              var each = Highcharts.each,
                  series = this.series,
                  band = this.yAxis[0].plotLinesAndBands[0],
                  d = band.svgElem.d.split(" "),
                  width = parseFloat(d[13]) - parseFloat(d[2]);

              each(series, function(s){
                s.update({borderWidth: width}, false);
              });
              this.redraw();

              token = true;
            }
          }
        }
    },
    ...

(The token is a variable used to avoid infinite loops, because redraw is called in redraw.)


Related Query

More Query from same tag