update main graphs, live properties

This commit is contained in:
Ivan
2023-08-14 07:11:03 +03:00
parent 1b5fa033f8
commit 4ef2fe7735
5 changed files with 193 additions and 67 deletions

View File

@ -2,40 +2,7 @@ Chart.defaults.color = "rgba(0, 0, 0, 0.4)";
Chart.defaults.font.size = 15;
Chart.defaults.font.weight = 400;
var warningsData = {
labels: [
"9.03",
"10.03",
"11.03",
"12.03",
"13.03",
"14.03",
"15.03",
"16.03",
"17.03",
"18.03",
"19.03",
],
datasets: [
{
label: "Актуальный период",
backgroundColor: "rgba(235, 146, 139, 1)",
borderWidth: 0,
borderRadius: 9,
hoverBackgroundColor: "rgba(235, 146, 139, 0.8)",
data: [1150, 1400, 2100, 900, 1200, 400, 950, 1400, 1250, 1150, 1650],
grouped: false,
},
{
label: "Предыдущий период",
backgroundColor: "rgba(235, 146, 139, 0.5)",
borderWidth: 0,
borderRadius: 9,
hoverBackgroundColor: "rgba(235, 146, 139, 0.3)",
data: [2700, 1850, 1100, 1550, 2300, 2200, 1650, 1200, 1500, 1850, 800],
},
],
};
var warningsOptions = {
plugins: {
@ -66,36 +33,7 @@ new Chart("chart-warnings", {
data: warningsData,
});
var positionsData = {
labels: [
"9.03",
"10.03",
"11.03",
"12.03",
"13.03",
"14.03",
"15.03",
"16.03",
"17.03",
"18.03",
"19.03",
],
datasets: [
{
label: "Позиционирование",
borderColor: "#8086F9",
fill: false,
data: [
480000, 390000, 407000, 400000, 435000, 460000, 385000, 410000, 380000,
410000, 410000,
],
pointStyle: false,
pointRadius: 25,
pointHoverRadius: 25,
tension: 0.4,
},
],
};
var positionsOptions = {
plugins: {
@ -114,7 +52,7 @@ var positionsOptions = {
color: "#D9D9D9",
},
ticks: {
stepSize: 50000,
stepSize: 10000,
},
},
x: {