Mudanza de repo
This commit is contained in:
24
templates/admin/dashboard_admin.html
Normal file
24
templates/admin/dashboard_admin.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{% load static %}
|
||||
<div>
|
||||
<canvas id="myChart" width="400" height="200"></canvas>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script>
|
||||
const ctx = document.getElementById('myChart').getContext('2d');
|
||||
const chart = new Chart(ctx, {
|
||||
type: 'bar', // Puedes cambiar a 'line', 'pie', etc.
|
||||
data: {
|
||||
labels: ['Ene', 'Feb', 'Mar', 'Abr', 'May'],
|
||||
datasets: [{
|
||||
label: 'Ventas',
|
||||
data: [10, 20, 30, 40, 50],
|
||||
backgroundColor: 'rgba(54, 162, 235, 0.6)',
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user