66 lines
1.9 KiB
JavaScript
66 lines
1.9 KiB
JavaScript
if (document.getElementById("visitChart")) {
|
|
var visitChart = document.getElementById("visitChart").getContext("2d");
|
|
var myChart = new Chart(visitChart, {
|
|
type: "LineWithShadow",
|
|
options: {
|
|
plugins: {
|
|
datalabels: {
|
|
display: false
|
|
}
|
|
},
|
|
responsive: true,
|
|
maintainAspectRatio: false,
|
|
scales: {
|
|
yAxes: [
|
|
{
|
|
gridLines: {
|
|
display: true,
|
|
lineWidth: 1,
|
|
color: "rgba(0,0,0,0.1)",
|
|
drawBorder: false
|
|
},
|
|
ticks: {
|
|
beginAtZero: true,
|
|
stepSize: 5,
|
|
min: 0,
|
|
max: 70,
|
|
padding: 0
|
|
}
|
|
}
|
|
],
|
|
xAxes: [
|
|
{
|
|
gridLines: {
|
|
display: false
|
|
}
|
|
}
|
|
]
|
|
},
|
|
legend: {
|
|
display: false
|
|
},
|
|
tooltips: chartTooltip
|
|
},
|
|
data: {
|
|
labels: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
|
datasets: [
|
|
{
|
|
label: "",
|
|
data: [5, 6, 6, 65, 60, 68, 0],
|
|
borderColor: themeColor1,
|
|
pointBackgroundColor: foregroundColor,
|
|
pointBorderColor: themeColor1,
|
|
pointHoverBackgroundColor: themeColor1,
|
|
pointHoverBorderColor: foregroundColor,
|
|
pointRadius: 4,
|
|
pointBorderWidth: 2,
|
|
pointHoverRadius: 5,
|
|
fill: true,
|
|
borderWidth: 2,
|
|
backgroundColor: themeColor1_10
|
|
}
|
|
]
|
|
}
|
|
});
|
|
}
|