ArgusSite/static/scripts/graphs.js

72 lines
1.0 KiB
JavaScript
Raw Permalink Normal View History

2023-07-03 22:31:18 +00:00
Chart.defaults.color = "rgba(0, 0, 0, 0.4)";
Chart.defaults.font.size = 15;
Chart.defaults.font.weight = 400;
2023-08-14 04:11:03 +00:00
2023-07-03 22:31:18 +00:00
var warningsOptions = {
plugins: {
legend: {
display: false,
},
},
responsive: true,
maintainAspectRatio: false,
scales: {
y: {
grid: {
display: true,
color: "#D9D9D9",
},
},
x: {
grid: {
display: false,
},
},
},
};
new Chart("chart-warnings", {
type: "bar",
options: warningsOptions,
data: warningsData,
});
2023-08-14 04:11:03 +00:00
2023-07-03 22:31:18 +00:00
var positionsOptions = {
plugins: {
legend: {
display: false,
},
},
labelStep: "3",
responsive: true,
maintainAspectRatio: false,
scales: {
y: {
stacked: true,
grid: {
display: true,
color: "#D9D9D9",
},
ticks: {
2023-08-14 04:11:03 +00:00
stepSize: 10000,
2023-07-03 22:31:18 +00:00
},
beginAtZero: true,
2023-07-03 22:31:18 +00:00
},
x: {
grid: {
display: false,
},
},
},
};
new Chart("chart-positions", {
type: "line",
data: positionsData,
options: positionsOptions,
});