Search code examples
highchartsgauge

highcharts solidgauge reverse angle direction


So I have this solidgauge with options:

{
  pane: {
    startAngle: 0,
    endAngle: 360,
  },
}

But I want to add an option to have the gauge the other way round, so I went for:

{
  pane: {
    startAngle: this.inversed ? 360 : 0,
    endAngle: this.inversed ? 0 : 360,
  }
}

With this.inversed set to true, the animation goes well, but unfortunately, at the end I get an error:

Error: <rect> attribute height: A negative value is not valid. ("-298.45130209103036")

It feels like a bug because I don't change anything else.

Can someone help me on reversing the angle direction of my solidgauge?

Cheers


Solution

  • I've reported a bug, which you can track here: https://github.com/highcharts/highcharts/issues/17361

    As a temporary solution you can switch to the last working Highcharts version - 9.2.2 or set series.clip to false, which solves the problem of disappearing pane.

    Demo: https://jsfiddle.net/BlackLabel/o53r01ce/