yabdev commited on
Commit
67916d4
·
verified ·
1 Parent(s): dc0d70c

create beautiful charts

Browse files
Files changed (2) hide show
  1. README.md +8 -5
  2. index.html +407 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Chartvista Magic
3
- emoji: 😻
4
- colorFrom: blue
5
- colorTo: green
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: ChartVista Magic
3
+ colorFrom: red
4
+ colorTo: red
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://deepsite.hf.co).
index.html CHANGED
@@ -1,19 +1,408 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>ChartVista - Beautiful Data Visualization</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
12
+ <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js"></script>
13
+ <style>
14
+ .chart-container {
15
+ backdrop-filter: blur(8px);
16
+ background-color: rgba(255, 255, 255, 0.15);
17
+ border-radius: 20px;
18
+ padding: 2rem;
19
+ transition: all 0.3s ease;
20
+ }
21
+ .chart-container:hover {
22
+ transform: translateY(-5px);
23
+ box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
24
+ }
25
+ .gradient-heading {
26
+ background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899);
27
+ -webkit-background-clip: text;
28
+ background-clip: text;
29
+ color: transparent;
30
+ }
31
+ </style>
32
+ </head>
33
+ <body class="bg-gray-100 min-h-screen">
34
+ <div id="vanta-bg" class="fixed inset-0 z-0"></div>
35
+
36
+ <div class="relative z-10">
37
+ <!-- Header -->
38
+ <header class="py-8 px-4 sm:px-6 lg:px-8">
39
+ <div class="max-w-7xl mx-auto">
40
+ <div class="flex justify-between items-center">
41
+ <div class="flex items-center space-x-2">
42
+ <i data-feather="bar-chart-2" class="text-indigo-500 w-8 h-8"></i>
43
+ <h1 class="text-3xl font-bold text-gray-900 gradient-heading">ChartVista</h1>
44
+ </div>
45
+ <nav class="hidden md:flex space-x-8">
46
+ <a href="#" class="text-gray-900 hover:text-indigo-600 font-medium">Home</a>
47
+ <a href="#" class="text-gray-900 hover:text-indigo-600 font-medium">Features</a>
48
+ <a href="#" class="text-gray-900 hover:text-indigo-600 font-medium">Gallery</a>
49
+ <a href="#" class="text-gray-900 hover:text-indigo-600 font-medium">About</a>
50
+ </nav>
51
+ <button class="md:hidden text-gray-900">
52
+ <i data-feather="menu"></i>
53
+ </button>
54
+ </div>
55
+ </div>
56
+ </header>
57
+
58
+ <!-- Hero Section -->
59
+ <section class="py-16 px-4 sm:px-6 lg:px-8 text-center">
60
+ <div class="max-w-4xl mx-auto">
61
+ <h1 class="text-4xl md:text-6xl font-bold text-gray-900 mb-6">Transform Data Into <span class="gradient-heading">Beautiful Stories</span></h1>
62
+ <p class="text-xl text-gray-700 mb-10">Create stunning, interactive charts that captivate your audience and make your data shine.</p>
63
+ <div class="flex justify-center space-x-4">
64
+ <button class="bg-indigo-600 hover:bg-indigo-700 text-white px-6 py-3 rounded-full font-medium transition-all shadow-lg hover:shadow-xl">
65
+ Get Started
66
+ </button>
67
+ <button class="border-2 border-indigo-600 text-indigo-600 hover:bg-indigo-50 px-6 py-3 rounded-full font-medium transition-all">
68
+ Learn More
69
+ </button>
70
+ </div>
71
+ </div>
72
+ </section>
73
+
74
+ <!-- Chart Showcase -->
75
+ <section class="py-16 px-4 sm:px-6 lg:px-8">
76
+ <div class="max-w-7xl mx-auto">
77
+ <h2 class="text-3xl font-bold text-center text-gray-900 mb-12">Chart <span class="gradient-heading">Showcase</span></h2>
78
+
79
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
80
+ <!-- Line Chart -->
81
+ <div class="chart-container">
82
+ <h3 class="text-xl font-semibold text-gray-800 mb-4">Sales Trend</h3>
83
+ <canvas id="lineChart" height="250"></canvas>
84
+ </div>
85
+
86
+ <!-- Bar Chart -->
87
+ <div class="chart-container">
88
+ <h3 class="text-xl font-semibold text-gray-800 mb-4">Revenue by Product</h3>
89
+ <canvas id="barChart" height="250"></canvas>
90
+ </div>
91
+
92
+ <!-- Pie Chart -->
93
+ <div class="chart-container">
94
+ <h3 class="text-xl font-semibold text-gray-800 mb-4">Market Share</h3>
95
+ <canvas id="pieChart" height="250"></canvas>
96
+ </div>
97
+
98
+ <!-- Doughnut Chart -->
99
+ <div class="chart-container">
100
+ <h3 class="text-xl font-semibold text-gray-800 mb-4">Budget Allocation</h3>
101
+ <canvas id="doughnutChart" height="250"></canvas>
102
+ </div>
103
+
104
+ <!-- Radar Chart -->
105
+ <div class="chart-container">
106
+ <h3 class="text-xl font-semibold text-gray-800 mb-4">Skill Assessment</h3>
107
+ <canvas id="radarChart" height="250"></canvas>
108
+ </div>
109
+
110
+ <!-- Polar Area Chart -->
111
+ <div class="chart-container">
112
+ <h3 class="text-xl font-semibold text-gray-800 mb-4">User Preferences</h3>
113
+ <canvas id="polarChart" height="250"></canvas>
114
+ </div>
115
+ </div>
116
+ </div>
117
+ </section>
118
+
119
+ <!-- Features -->
120
+ <section class="py-16 px-4 sm:px-6 lg:px-8 bg-white bg-opacity-80 backdrop-blur-md">
121
+ <div class="max-w-7xl mx-auto">
122
+ <h2 class="text-3xl font-bold text-center text-gray-900 mb-12">Why Choose <span class="gradient-heading">ChartVista</span></h2>
123
+
124
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
125
+ <div class="bg-white p-8 rounded-xl shadow-lg hover:shadow-xl transition-all">
126
+ <div class="w-12 h-12 bg-indigo-100 rounded-full flex items-center justify-center mb-4">
127
+ <i data-feather="eye" class="text-indigo-600"></i>
128
+ </div>
129
+ <h3 class="text-xl font-semibold text-gray-800 mb-3">Visual Appeal</h3>
130
+ <p class="text-gray-600">Stunning, customizable designs that make your data pop and engage your audience.</p>
131
+ </div>
132
+
133
+ <div class="bg-white p-8 rounded-xl shadow-lg hover:shadow-xl transition-all">
134
+ <div class="w-12 h-12 bg-pink-100 rounded-full flex items-center justify-center mb-4">
135
+ <i data-feather="cpu" class="text-pink-600"></i>
136
+ </div>
137
+ <h3 class="text-xl font-semibold text-gray-800 mb-3">Interactive</h3>
138
+ <p class="text-gray-600">Hover effects, animations, and click interactions to explore your data in depth.</p>
139
+ </div>
140
+
141
+ <div class="bg-white p-8 rounded-xl shadow-lg hover:shadow-xl transition-all">
142
+ <div class="w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mb-4">
143
+ <i data-feather="smartphone" class="text-blue-600"></i>
144
+ </div>
145
+ <h3 class="text-xl font-semibold text-gray-800 mb-3">Responsive</h3>
146
+ <p class="text-gray-600">Perfectly scales across all devices from desktop to mobile without losing clarity.</p>
147
+ </div>
148
+ </div>
149
+ </div>
150
+ </section>
151
+
152
+ <!-- Footer -->
153
+ <footer class="py-12 px-4 sm:px-6 lg:px-8 bg-gray-900 text-white">
154
+ <div class="max-w-7xl mx-auto">
155
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
156
+ <div>
157
+ <div class="flex items-center space-x-2 mb-4">
158
+ <i data-feather="bar-chart-2" class="text-indigo-400"></i>
159
+ <span class="text-xl font-bold">ChartVista</span>
160
+ </div>
161
+ <p class="text-gray-400">Making data beautiful since 2023.</p>
162
+ </div>
163
+ <div>
164
+ <h4 class="text-lg font-semibold mb-4">Product</h4>
165
+ <ul class="space-y-2">
166
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Features</a></li>
167
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Pricing</a></li>
168
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Examples</a></li>
169
+ </ul>
170
+ </div>
171
+ <div>
172
+ <h4 class="text-lg font-semibold mb-4">Resources</h4>
173
+ <ul class="space-y-2">
174
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Documentation</a></li>
175
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Tutorials</a></li>
176
+ <li><a href="#" class="text-gray-400 hover:text-white transition">API</a></li>
177
+ </ul>
178
+ </div>
179
+ <div>
180
+ <h4 class="text-lg font-semibold mb-4">Connect</h4>
181
+ <div class="flex space-x-4">
182
+ <a href="#" class="text-gray-400 hover:text-white transition"><i data-feather="twitter"></i></a>
183
+ <a href="#" class="text-gray-400 hover:text-white transition"><i data-feather="github"></i></a>
184
+ <a href="#" class="text-gray-400 hover:text-white transition"><i data-feather="linkedin"></i></a>
185
+ <a href="#" class="text-gray-400 hover:text-white transition"><i data-feather="instagram"></i></a>
186
+ </div>
187
+ </div>
188
+ </div>
189
+ <div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-500">
190
+ <p>© 2023 ChartVista. All rights reserved.</p>
191
+ </div>
192
+ </div>
193
+ </footer>
194
+ </div>
195
+
196
+ <script>
197
+ // Initialize Vanta.js background
198
+ VANTA.WAVES({
199
+ el: "#vanta-bg",
200
+ mouseControls: true,
201
+ touchControls: true,
202
+ gyroControls: false,
203
+ minHeight: 200.00,
204
+ minWidth: 200.00,
205
+ scale: 1.00,
206
+ scaleMobile: 1.00,
207
+ color: 0x3b82f6,
208
+ shininess: 50.00,
209
+ waveHeight: 20.00,
210
+ waveSpeed: 0.50,
211
+ zoom: 0.65
212
+ });
213
+
214
+ // Initialize Charts
215
+ document.addEventListener('DOMContentLoaded', function() {
216
+ feather.replace();
217
+
218
+ // Line Chart
219
+ const lineCtx = document.getElementById('lineChart').getContext('2d');
220
+ new Chart(lineCtx, {
221
+ type: 'line',
222
+ data: {
223
+ labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
224
+ datasets: [{
225
+ label: 'Sales',
226
+ data: [65, 59, 80, 81, 56, 72],
227
+ borderColor: '#3b82f6',
228
+ backgroundColor: 'rgba(59, 130, 246, 0.1)',
229
+ tension: 0.3,
230
+ fill: true,
231
+ borderWidth: 2
232
+ }]
233
+ },
234
+ options: {
235
+ responsive: true,
236
+ maintainAspectRatio: false,
237
+ plugins: {
238
+ legend: {
239
+ display: false
240
+ }
241
+ }
242
+ }
243
+ });
244
+
245
+ // Bar Chart
246
+ const barCtx = document.getElementById('barChart').getContext('2d');
247
+ new Chart(barCtx, {
248
+ type: 'bar',
249
+ data: {
250
+ labels: ['Product A', 'Product B', 'Product C', 'Product D', 'Product E'],
251
+ datasets: [{
252
+ label: 'Revenue',
253
+ data: [12000, 19000, 3000, 5000, 2000],
254
+ backgroundColor: [
255
+ 'rgba(99, 102, 241, 0.7)',
256
+ 'rgba(168, 85, 247, 0.7)',
257
+ 'rgba(236, 72, 153, 0.7)',
258
+ 'rgba(249, 115, 22, 0.7)',
259
+ 'rgba(16, 185, 129, 0.7)'
260
+ ],
261
+ borderColor: [
262
+ 'rgba(99, 102, 241, 1)',
263
+ 'rgba(168, 85, 247, 1)',
264
+ 'rgba(236, 72, 153, 1)',
265
+ 'rgba(249, 115, 22, 1)',
266
+ 'rgba(16, 185, 129, 1)'
267
+ ],
268
+ borderWidth: 1
269
+ }]
270
+ },
271
+ options: {
272
+ responsive: true,
273
+ maintainAspectRatio: false,
274
+ plugins: {
275
+ legend: {
276
+ display: false
277
+ }
278
+ }
279
+ }
280
+ });
281
+
282
+ // Pie Chart
283
+ const pieCtx = document.getElementById('pieChart').getContext('2d');
284
+ new Chart(pieCtx, {
285
+ type: 'pie',
286
+ data: {
287
+ labels: ['Apple', 'Samsung', 'Google', 'Huawei', 'Other'],
288
+ datasets: [{
289
+ data: [40, 25, 15, 10, 10],
290
+ backgroundColor: [
291
+ 'rgba(59, 130, 246, 0.7)',
292
+ 'rgba(139, 92, 246, 0.7)',
293
+ 'rgba(16, 185, 129, 0.7)',
294
+ 'rgba(245, 158, 11, 0.7)',
295
+ 'rgba(239, 68, 68, 0.7)'
296
+ ],
297
+ borderColor: [
298
+ 'rgba(59, 130, 246, 1)',
299
+ 'rgba(139, 92, 246, 1)',
300
+ 'rgba(16, 185, 129, 1)',
301
+ 'rgba(245, 158, 11, 1)',
302
+ 'rgba(239, 68, 68, 1)'
303
+ ],
304
+ borderWidth: 1
305
+ }]
306
+ },
307
+ options: {
308
+ responsive: true,
309
+ maintainAspectRatio: false,
310
+ plugins: {
311
+ legend: {
312
+ position: 'right'
313
+ }
314
+ }
315
+ }
316
+ });
317
+
318
+ // Doughnut Chart
319
+ const doughnutCtx = document.getElementById('doughnutChart').getContext('2d');
320
+ new Chart(doughnutCtx, {
321
+ type: 'doughnut',
322
+ data: {
323
+ labels: ['Marketing', 'Product', 'R&D', 'HR', 'Operations'],
324
+ datasets: [{
325
+ data: [30, 25, 20, 15, 10],
326
+ backgroundColor: [
327
+ 'rgba(59, 130, 246, 0.7)',
328
+ 'rgba(139, 92, 246, 0.7)',
329
+ 'rgba(16, 185, 129, 0.7)',
330
+ 'rgba(245, 158, 11, 0.7)',
331
+ 'rgba(239, 68, 68, 0.7)'
332
+ ],
333
+ borderColor: '#ffffff',
334
+ borderWidth: 2
335
+ }]
336
+ },
337
+ options: {
338
+ responsive: true,
339
+ maintainAspectRatio: false,
340
+ cutout: '70%',
341
+ plugins: {
342
+ legend: {
343
+ position: 'right'
344
+ }
345
+ }
346
+ }
347
+ });
348
+
349
+ // Radar Chart
350
+ const radarCtx = document.getElementById('radarChart').getContext('2d');
351
+ new Chart(radarCtx, {
352
+ type: 'radar',
353
+ data: {
354
+ labels: ['Design', 'Development', 'Marketing', 'Sales', 'Support', 'Strategy'],
355
+ datasets: [{
356
+ label: 'Employee A',
357
+ data: [65, 59, 90, 81, 56, 55],
358
+ backgroundColor: 'rgba(59, 130, 246, 0.2)',
359
+ borderColor: 'rgba(59, 130, 246, 1)',
360
+ pointBackgroundColor: 'rgba(59, 130, 246, 1)',
361
+ pointBorderColor: '#fff',
362
+ pointHoverBackgroundColor: '#fff',
363
+ pointHoverBorderColor: 'rgba(59, 130, 246, 1)'
364
+ }, {
365
+ label: 'Employee B',
366
+ data: [28, 48, 40, 19, 96, 27],
367
+ backgroundColor: 'rgba(236, 72, 153, 0.2)',
368
+ borderColor: 'rgba(236, 72, 153, 1)',
369
+ pointBackgroundColor: 'rgba(236, 72, 153, 1)',
370
+ pointBorderColor: '#fff',
371
+ pointHoverBackgroundColor: '#fff',
372
+ pointHoverBorderColor: 'rgba(236, 72, 153, 1)'
373
+ }]
374
+ },
375
+ options: {
376
+ responsive: true,
377
+ maintainAspectRatio: false
378
+ }
379
+ });
380
+
381
+ // Polar Area Chart
382
+ const polarCtx = document.getElementById('polarChart').getContext('2d');
383
+ new Chart(polarCtx, {
384
+ type: 'polarArea',
385
+ data: {
386
+ labels: ['Red', 'Green', 'Yellow', 'Grey', 'Blue'],
387
+ datasets: [{
388
+ data: [11, 16, 7, 3, 14],
389
+ backgroundColor: [
390
+ 'rgba(239, 68, 68, 0.7)',
391
+ 'rgba(16, 185, 129, 0.7)',
392
+ 'rgba(245, 158, 11, 0.7)',
393
+ 'rgba(156, 163, 175, 0.7)',
394
+ 'rgba(59, 130, 246, 0.7)'
395
+ ],
396
+ borderColor: '#ffffff',
397
+ borderWidth: 2
398
+ }]
399
+ },
400
+ options: {
401
+ responsive: true,
402
+ maintainAspectRatio: false
403
+ }
404
+ });
405
+ });
406
+ </script>
407
+ </body>
408
  </html>