奢侈品销量上涨的原因
```html
body {
fontfamily: Arial, sansserif;
margin: 20px;
}
h1 {
textalign: center;
}
.chartcontainer {
width: 80%;
margin: 0 auto;
}
canvas {
mozuserselect: none;
webkituserselect: none;
msuserselect: none;
}
Luxury Goods Sales Decline Chart
// Sample data replace with actual data
const years = ["2019", "2020", "2021", "2022", "2023", "2024"];
const salesData = [120000, 110000, 100000, 95000, 90000, 85000]; // Sales figures in millions
// Create chart
const ctx = document.getElementById('salesChart').getContext('2d');
const salesChart = new Chart(ctx, {
type: 'line',
{
labels: years,
datasets: [{
label: 'Luxury Goods Sales (Millions)',
salesData,
backgroundColor: 'rgba(54, 162, 235, 0.2)',
borderColor: 'rgba(54, 162, 235, 1)',
borderWidth: 2,
pointRadius: 5,
pointBackgroundColor: 'rgba(54, 162, 235, 1)',
pointBorderColor: 'fff',
pointHoverRadius: 8,
pointHoverBackgroundColor: 'fff',
pointHoverBorderColor: 'rgba(54, 162, 235, 1)',
pointHitRadius: 10,
pointBorderWidth: 2,
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
callback: function(value, index, values) {
return value.toLocaleString(); // Add thousands separator
}
}
}]
},
tooltips: {
callbacks: {
label: function(tooltipItem, data) {
return 'Sales: $' tooltipItem.yLabel.toLocaleString();
}
}
}
}
});