тест
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Доход по отелям</title>
<!-- Chart.js -->
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
body {
font-family: Arial, sans-serif;
margin: 40px;
}
.chart-container {
max-width: 1200px;
margin-bottom: 60px;
}
h2 {
text-align: center;
margin-bottom: 20px;
}
</style>
</head>
<body>
<!-- ===== Chart 1 ===== -->
<div class="chart-container">
<h2>Доход по отелям 2024 / 2025</h2>
<canvas id="incomeChart"></canvas>
</div>
<!-- ===== Chart 2 ===== -->
<div class="chart-container">
<h2>Сезонность дохода по месяцам (все отели)</h2>
<canvas id="seasonChart"></canvas>
</div>
<script>
/* ===== Chart 1: Bar chart ===== */
const incomeCtx = document.getElementById('incomeChart').getContext('2d');
new Chart(incomeCtx, {
type: 'bar',
data: {
labels: [
"VALO Network (5 корпус)",
"VALO Mercure",
"iZZZi у Гостиного двора",
"iZZZi на Владимирской",
"iZZZi на Банковском",
"Port Comfort by Moyka-1",
"Port Comfort on Ligovskiy",
"Port Comfort by Sennaya Square",
"YES на Марата",
"Best Western Zoom Hotel",
"IN2IT",
"Ярд Резиденс",
"АРТСТУДИО Невский",
"АРТСТУДИО Московский",
"АРТСТУДИО М-103"
],
datasets: [
{
label: "2024",
data: [
1300,1299,3064,2546,2604,4048,3044,3280,
2550,1722,1028,2429,2318,1526,null
]
},
{
label: "2025",
data: [
1376,1390,3422,2475,2993,3795,3126,3214,
2197,1895,1147,2184,2403,1329,1526
]
}
]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'top'
}
},
scales: {
x: {
ticks: {
maxRotation: 45,
minRotation: 45
}
}
}
}
});
/* ===== Chart 2: Seasonality ===== */
const seasonCtx = document.getElementById('seasonChart').getContext('2d');
new Chart(seasonCtx, {
type: 'line',
data: {
labels: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],
datasets: [
{
label: "2024",
data: [0.4,0.3,0.5,0.8,1.0,1.5,1.6,1.5,1.2,0.9,0.7,0.6],
tension: 0.3
},
{
label: "2025",
data: [0.6,0.5,0.6,0.9,1.2,1.7,1.8,1.6,1.3,1.0,0.8,0.7],
tension: 0.3
}
]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'top'
}
},
scales: {
y: {
title: {
display: true,
text: 'Относительный уровень'
}
}
}
}
});
</script>
</body>
</html>