我需要自定義儀表高圖作為我將其定制為 jsfiddle 代碼。var gaugeOptions = { chart: { type: 'solidgauge' }, title: null, pane: { center: ['50%', '85%'], size: '140%', startAngle: -90, endAngle: 90, background: { backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || '#EEE', innerRadius: '60%', outerRadius: '100%', shape: 'arc' } }, exporting: { enabled: false }, tooltip: { enabled: false }, // the value axis yAxis: { stops: [ [0.1, '#55BF3B'], // green [0.5, '#DDDF0D'], // yellow [0.9, '#DF5353'] // red ], lineWidth: 2, tickWidth: 10, tickInterval: 10, lineColor: '#fff', minorTickInterval: null, labels: { enabled: false }, minorTickPosition: 'inside', tickPosition: 'inside', tickPixelInterval: 10, tickLength: '50', tickColor: '#fff', zIndex: 6, minorTickWidth: 0, }, plotOptions: { solidgauge: { dataLabels: { enabled: false }, rounded: false }, gauge: { dial: { radius: '40', backgroundColor: '#1d96e0', baseWidth: 20, topWidth: 1, baseLength: '5%', // of radius rearLength: '0%' }, pivot: { radius: '10', backgroundColor: '#1d96e0' } }, series: { dataLabels: { enabled: true } } },};https://jsfiddle.net/viethien/9L4xcho3/5/但是當(dāng)我調(diào)整儀表圖表的大小時(shí),它顯示得不好我擔(dān)心計(jì)算儀表板的寬度以適應(yīng)風(fēng)格。
查看完整描述