Spaces:
Running
Running
Download index.html from pushkaruttarwar/data: direct link, hf CLI and curl.
- Browser
- Download file 7.74 kB
-
https://huggingface.co/spaces/pushkaruttarwar/data/resolve/main/index.html
- Command line
-
hf download hf://spaces/pushkaruttarwar/data/index.html
-
curl -L -o index.html https://huggingface.co/spaces/pushkaruttarwar/data/resolve/main/index.html
7.74 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Sales Data Visualization</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| </head> | |
| <body class="bg-gray-50"> | |
| <div class="container mx-auto px-4 py-8"> | |
| <h1 class="text-3xl font-bold text-center mb-8">Sales Data Visualization</h1> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-8"> | |
| <!-- Sales by Region --> | |
| <div class="bg-white p-6 rounded-lg shadow"> | |
| <h2 class="text-xl font-semibold mb-4">Sales by Region</h2> | |
| <canvas id="regionChart" height="300"></canvas> | |
| </div> | |
| <!-- Top Products by Revenue --> | |
| <div class="bg-white p-6 rounded-lg shadow"> | |
| <h2 class="text-xl font-semibold mb-4">Top Products by Revenue</h2> | |
| <canvas id="productChart" height="300"></canvas> | |
| </div> | |
| <!-- Sales Trend Over Time --> | |
| <div class="bg-white p-6 rounded-lg shadow col-span-1 md:col-span-2"> | |
| <h2 class="text-xl font-semibold mb-4">Sales Trend Over Time</h2> | |
| <canvas id="timeChart" height="300"></canvas> | |
| </div> | |
| <!-- Sales by Employee --> | |
| <div class="bg-white p-6 rounded-lg shadow col-span-1 md:col-span-2"> | |
| <h2 class="text-xl font-semibold mb-4">Sales by Employee</h2> | |
| <canvas id="employeeChart" height="300"></canvas> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| feather.replace(); | |
| // Sales by Region | |
| const regionCtx = document.getElementById('regionChart').getContext('2d'); | |
| new Chart(regionCtx, { | |
| type: 'doughnut', | |
| data: { | |
| labels: ['Pune', 'Sangali', 'Amravati', 'Nashik', 'Nagar', 'zm'], | |
| datasets: [{ | |
| data: [816295, 642130, 234300, 153265, 119893.75, 187840], | |
| backgroundColor: [ | |
| '#3B82F6', | |
| '#10B981', | |
| '#F59E0B', | |
| '#EF4444', | |
| '#8B5CF6', | |
| '#EC4899' | |
| ], | |
| borderWidth: 1 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| plugins: { | |
| legend: { | |
| position: 'right', | |
| }, | |
| tooltip: { | |
| callbacks: { | |
| label: function(context) { | |
| return `${context.label}: ₹${context.raw.toLocaleString()}`; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Top Products by Revenue | |
| const productCtx = document.getElementById('productChart').getContext('2d'); | |
| new Chart(productCtx, { | |
| type: 'bar', | |
| data: { | |
| labels: ['Colikil-R', 'Immon', 'Hepatotox-Es', 'Thermogard', 'Mantox'], | |
| datasets: [{ | |
| label: 'Revenue (₹)', | |
| data: [570965, 1041300, 283560, 158668.75, 129010], | |
| backgroundColor: '#3B82F6', | |
| borderWidth: 1 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| scales: { | |
| y: { | |
| beginAtZero: true, | |
| ticks: { | |
| callback: function(value) { | |
| return '₹' + value.toLocaleString(); | |
| } | |
| } | |
| } | |
| }, | |
| plugins: { | |
| tooltip: { | |
| callbacks: { | |
| label: function(context) { | |
| return `Revenue: ₹${context.raw.toLocaleString()}`; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Sales Trend Over Time | |
| const timeCtx = document.getElementById('timeChart').getContext('2d'); | |
| new Chart(timeCtx, { | |
| type: 'line', | |
| data: { | |
| labels: ['Apr 1-7', 'Apr 8-14', 'Apr 15-21', 'Apr 22-30'], | |
| datasets: [{ | |
| label: 'Weekly Sales (₹)', | |
| data: [500000, 700000, 800000, 707223.75], | |
| borderColor: '#3B82F6', | |
| backgroundColor: 'rgba(59, 130, 246, 0.1)', | |
| fill: true, | |
| tension: 0.3 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| scales: { | |
| y: { | |
| beginAtZero: true, | |
| ticks: { | |
| callback: function(value) { | |
| return '₹' + value.toLocaleString(); | |
| } | |
| } | |
| } | |
| }, | |
| plugins: { | |
| tooltip: { | |
| callbacks: { | |
| label: function(context) { | |
| return `Sales: ₹${context.raw.toLocaleString()}`; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Sales by Employee | |
| const employeeCtx = document.getElementById('employeeChart').getContext('2d'); | |
| new Chart(employeeCtx, { | |
| type: 'polarArea', | |
| data: { | |
| labels: ['Mr.Ganesh T.', 'Mr.Pramod P.', 'Mr.Vaibhav', 'Mr.Dongre', 'Dr.Uttarwar', 'vacant'], | |
| datasets: [{ | |
| data: [900000, 700000, 300000, 200000, 150000, 250000], | |
| backgroundColor: [ | |
| '#3B82F6', | |
| '#10B981', | |
| '#F59E0B', | |
| '#EF4444', | |
| '#8B5CF6', | |
| '#EC4899' | |
| ], | |
| borderWidth: 1 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| plugins: { | |
| legend: { | |
| position: 'right', | |
| }, | |
| tooltip: { | |
| callbacks: { | |
| label: function(context) { | |
| return `${context.label}: ₹${context.raw.toLocaleString()}`; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| }); | |
| </script> | |
| </body> | |
| </html> |