5

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/

4

1 回答 1

7

如果我对您的理解正确,您需要在仪表外部的相关点上有两个标签。这可以通过yAxis标签选项来完成:

  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...

在这里拉小提琴。

在此处输入图像描述

于 2013-08-29T17:04:40.537 回答