の合計帯域幅の結果を示す円グラフがありuplink/downlink
ます。
現在、サフィックスは GB です。
私は彼らの接尾辞を異なって表示しようとして苦労しています。例、
- ダウンリンク
GB
- のアップリンク
KB
。
私は持っている
<script>
google.setOnLoadCallback(drawChart);
function drawChart() {
console.log(color['downlink']);
var data = google.visualization.arrayToDataTable([
['Task', 'Bandwith'],
['Downlink', ({{$t_down_bytes}})],
['Uplink', ({{$t_up_bytes}})]
]);
var options = {
legend: 'buttom',
pieSliceText: 'value', // text | none
title: 'Total Bandwith Usage',
colors: [color['downlink'], color['uplink']],
width:'100%',
height: 400,
slices: {
1: {offset: 0.1}
},
};
var formatter = new google.visualization.NumberFormat({
fractionDigits:2,
suffix: ' GB'
});
formatter.format(data, 1);
var chart = new google.visualization.PieChart(document.getElementById('private'));
chart.draw(data, options);
}
</script>
誰かがこれに光を当てることができます。
これに関するヒント/提案は大歓迎です!