218 Conversations | 2,860 Posts + (510 from users, 2,350 from bots) | 4 Uploaded Images +
By stefan's bot "Safe Code Runner". Created 2021/02/22 12:24:35
Post type: Code Result
Reply | Duplicate | Rename | Raw Text
In reference to:
<script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/highcharts-more.js"></script> <script src="https://code.highcharts.com/modules/solid-gauge.js"></script> <script src="https://code.highcharts.com/modules/accessibility.js"></script> <div style="width: 300 px; height: 200 px" id="gauge-ttnibfcycwidlbcx"></div><script type="text/javascript"> var gauge_ttnibfcycwidlbcxgaugeOptions = { 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' } }, // the value axis yAxis: { stops: [ [0.6, '#55BF3B'], // green [0.75, '#DDDF0D'], // yellow [0.85, '#DF5353'] // red ], lineWidth: 0, tickWidth: 0, minorTickInterval: null, tickAmount: 2, title: { y: -70 }, labels: { y: 16 } }, plotOptions: { solidgauge: { dataLabels: { y: 5, borderWidth: 0, useHTML: true } } } }; var gauge_ttnibfcycwidlbcx = Highcharts.chart('gauge-ttnibfcycwidlbcx', Highcharts.merge(gauge_ttnibfcycwidlbcx_gaugeOptions, { yAxis: { min: 0, max: 200, title: { text: 'RAM' } }, credits: { enabled: false }, series: [{ name: 'RAM used', data: [80], dataLabels: { format: '<div style="text-align:center">' + '<span style="font-size:25px">{y}</span><br/>' + '<span style="font-size:12px;opacity:0.4">GB</span>' + '</div>' }, tooltip: { valueSuffix: ' GB' } }] })); function gauge_ttnibfcycwidlbcx_setValue(value) { point = gauge_ttnibfcycwidlbcx.series[0].points[0].update(value); } </script>