Fixed night mode not applying to query graphs

Issue was that HighCharts was too late in the load order
to apply color-selector.js method
This commit is contained in:
Risto Lahtela 2021-01-31 12:24:35 +02:00
parent 12c8f24773
commit 7f953e989e
3 changed files with 10 additions and 6 deletions

View File

@ -468,6 +468,7 @@
Highcharts.setOptions(Highcharts.theme);
updateGraphs();
} catch (e) {
if (graphs !== undefined) console.error(e);
}
}

View File

@ -389,6 +389,9 @@ function displayDataResultScreen(resultCount, view) {
const beforeDate = queryState.view.beforeDate ? queryState.view.beforeDate : view.beforeDate;
const afterTime = queryState.view.afterTime ? queryState.view.afterTime : view.afterTime;
const beforeTime = queryState.view.beforeTime ? queryState.view.beforeTime : view.beforeTime;
graphs.splice(0, graphs.length); // Remove view graph from state as it is removed from DOM
document.querySelector('#content .tab').innerHTML =
`<div class="container-fluid mt-4">
<div class="d-sm-flex align-items-center justify-content-between mb-4">

View File

@ -307,12 +307,6 @@
<script src="./vendor/jquery/jquery.min.js"></script>
<script src="./vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="./js/sb-admin-2.js"></script>
<script src="./js/xmlhttprequests.js"></script>
<script src="./js/color-selector.js"></script>
<script src="./js/domUtils.js"></script>
<!-- Page level plugins -->
<script src="vendor/datatables/jquery.dataTables.min.js"></script>
<script src="vendor/datatables/dataTables.bootstrap4.min.js"></script>
@ -320,6 +314,12 @@
<script src="./vendor/highcharts/map.js"></script>
<script src="./vendor/highcharts/world.js"></script>
<!-- Custom scripts for all pages-->
<script src="./js/sb-admin-2.js"></script>
<script src="./js/xmlhttprequests.js"></script>
<script src="./js/color-selector.js"></script>
<script src="./js/domUtils.js"></script>
<!-- Page level custom scripts -->
<script src="./js/graphs.js"></script>
<script src='./js/filters.js'></script>