Unique id, prevent conflict w/ data usage

This commit is contained in:
billz 2020-02-02 14:58:35 +00:00
parent 9dc2a67d70
commit d15fd5692d
3 changed files with 4 additions and 4 deletions

View file

@ -201,7 +201,7 @@ pre.unstyled {
font-size: 0.9rem!important;
}
canvas#divChartBandwidthhourly {
canvas#divDBChartBandwidthhourly {
height: 350px!important;
}

View file

@ -41,7 +41,7 @@
function ShowBandwidthChartHandler(e) {
// Remove hourly chartjs chart
$('#divChartBandwidthhourly').empty();
$('#divDBChartBandwidthhourly').empty();
// Construct ajax uri for getting the proper data
var timeunit = 'hourly';
var uri = 'ajax/bandwidth/get_bandwidth.php?';
@ -62,7 +62,7 @@
return e.date;
});
// Init. chart with label series
var barchart = CreateChart('divChartBandwidth'+timeunit, labels);
var barchart = CreateChart('divDBChartBandwidth'+timeunit, labels);
var dataRx = jsondata.map(function(e) {
return e.rx;
});

View file

@ -34,7 +34,7 @@ $ifaceStatus = $wlan0up ? "up" : "down";
<h4><?php echo _("Hourly traffic amount"); ?></h4>
<div id="divInterface" class="d-none"><?php echo RASPI_WIFI_CLIENT_INTERFACE; ?></div>
<div class="col-md-12">
<canvas id="divChartBandwidthhourly"></canvas>
<canvas id="divDBChartBandwidthhourly"></canvas>
</div>
</div><!-- /.card-body -->
</div><!-- /.card-->