Solid gauge chart (special Chart)

Solid gauge 차트를 표현합니다. highcharts-more.js 필요 modules/solid-gauge.js 필요

Example

// 시작 데이터
var orgVal = 80;

myChart.setOptions({
  chart:{
    type:'solidgauge'
  },
  pane: {
    startAngle: -90, // 게이지 바 시작 각도
    endAngle: 90, // 게이지 바 종료 각도
  },
  yAxis: {
    min: 0, // 게이지 바 시작 값
    max: 200, // 게이지 바 종료 값
  },
  series: [{
    data: [orgVal]
  }]
},{
  append: true,
  redraw: true
});

// 1.5초마다 동적으로 랜덤 데이터 삽입하는 구문
var series = myChart.series(0);
this.refreshInterval = setInterval(
  (function() {
    let newVal,
    inc;
    inc = Math.round((Math.random() - 0.5) * 100);
    newVal = orgVal + inc;
    if (newVal < 0 || newVal > 200) {
        newVal = orgVal - inc;
    }
    if (series != -1) series.setData([newVal], {append:false, redraw:true});
  }).bind(this),
  1500
);

s

Since

version desc
7.3.0.0