philipfc
philipfc

Reputation: 609

how to make specific labels outside gauge chart

The gauge graph is great!

I am looking for a way to label only 2 points outside the gauge chart. The first point being what the gauge value is (say $80,000) and the second being an industry standard (say $90,000) on a gauge that goes from 0 to $100,000. The needle would be pointing at $80,000 and the $90,000 would be at the appropriate position on the arc as well.

Please let me know what you recommend.

I have created a jsfiddle with everything but the 2 labels we are hoping for.

$('#container').highcharts({
  chart: {
    type: 'gauge',

http://jsfiddle.net/Fe6yJ/

Upvotes: 5

Views: 9017

Answers (1)

Mark
Mark

Reputation: 108537

If I am understanding you correctly, you want two labels on the outside of the gauge at relevant points. This can be done with a the yAxis label options:

  yAxis: {
        labels: {
            enabled: true,
            x: 35, y: -10 // move them to the outside
        },
        tickPositions: [80, 90], // only draw them at 80, 980
        minorTickLength: 0,
        min: 0,
        max: 100,
       //etc...

Fiddle here.

enter image description here

Upvotes: 7

Related Questions