Spaces:
Running
Running
Add Columns Selection | Fix bugs
Browse files- files/css/main.css +18 -0
- files/js/analytics.js +127 -37
- static/analytics.html +38 -75
files/css/main.css
CHANGED
@@ -737,6 +737,10 @@ select {
|
|
737 |
height: 8rem
|
738 |
}
|
739 |
|
|
|
|
|
|
|
|
|
740 |
.h-8 {
|
741 |
height: 2rem
|
742 |
}
|
@@ -1423,6 +1427,10 @@ select {
|
|
1423 |
padding-left: .75rem
|
1424 |
}
|
1425 |
|
|
|
|
|
|
|
|
|
1426 |
.pl-10 {
|
1427 |
padding-left: 2.5rem
|
1428 |
}
|
@@ -2424,6 +2432,16 @@ select {
|
|
2424 |
box-shadow: 0 0 5px 2px rgb(255, 188, 87);
|
2425 |
}
|
2426 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2427 |
.dark {
|
2428 |
filter: invert(92%);
|
2429 |
}
|
|
|
737 |
height: 8rem
|
738 |
}
|
739 |
|
740 |
+
.h-48 {
|
741 |
+
height: 12rem
|
742 |
+
}
|
743 |
+
|
744 |
.h-8 {
|
745 |
height: 2rem
|
746 |
}
|
|
|
1427 |
padding-left: .75rem
|
1428 |
}
|
1429 |
|
1430 |
+
.pl-5 {
|
1431 |
+
padding-left: 1.25rem
|
1432 |
+
}
|
1433 |
+
|
1434 |
.pl-10 {
|
1435 |
padding-left: 2.5rem
|
1436 |
}
|
|
|
2432 |
box-shadow: 0 0 5px 2px rgb(255, 188, 87);
|
2433 |
}
|
2434 |
|
2435 |
+
#apply {
|
2436 |
+
background-color: #ffa116;
|
2437 |
+
}
|
2438 |
+
#apply:hover {
|
2439 |
+
background-color: #fcb140;
|
2440 |
+
}
|
2441 |
+
#apply:focus {
|
2442 |
+
box-shadow: 0 0 5px 2px rgb(255, 188, 87);
|
2443 |
+
}
|
2444 |
+
|
2445 |
.dark {
|
2446 |
filter: invert(92%);
|
2447 |
}
|
files/js/analytics.js
CHANGED
@@ -208,6 +208,7 @@ const charts = document.getElementById('my-charts');
|
|
208 |
const color = d3.scaleOrdinal().range(d3.schemeSet3);
|
209 |
|
210 |
const MAX_CATS = 10;
|
|
|
211 |
|
212 |
const cache_df = {is_empty: true, dataset: []};
|
213 |
|
@@ -248,7 +249,7 @@ function _handle_column(data, col) {
|
|
248 |
}
|
249 |
|
250 |
type = maybe_cats ? 'cat' : type == 'num' ? type : 'object';
|
251 |
-
console.log(col, type);
|
252 |
|
253 |
let nan_count = data.length - cols.length;
|
254 |
if (type == 'cat') {
|
@@ -277,6 +278,80 @@ function _update_cache(data) {
|
|
277 |
cache_df.dataset.push(col_data);
|
278 |
}
|
279 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
}
|
281 |
|
282 |
function addChart(chartID, name, info) {
|
@@ -287,7 +362,8 @@ function addChart(chartID, name, info) {
|
|
287 |
}
|
288 |
|
289 |
const newChartDiv = document.createElement('div');
|
290 |
-
newChartDiv.
|
|
|
291 |
newChartDiv.innerHTML = `
|
292 |
<div class="w-full p-4 bg-white rounded-lg xl:p-6">
|
293 |
<h1 class="text-lg font-medium text-gray-700 capitalize sm:text-xl md:text-2xl">${name}</h1>
|
@@ -336,8 +412,12 @@ fileInput.addEventListener('change', function() {
|
|
336 |
|
337 |
function render() {
|
338 |
if (fileInput.files.length > 0) {
|
339 |
-
|
|
|
|
|
|
|
340 |
|
|
|
341 |
var selectedFile = fileInput.files[0];
|
342 |
var reader = new FileReader();
|
343 |
|
@@ -346,49 +426,59 @@ function render() {
|
|
346 |
var data = d3.csvParse(fileContent);
|
347 |
|
348 |
if (cache_df.is_empty) {
|
|
|
349 |
_update_cache(data);
|
350 |
} else {
|
351 |
console.log('We already have cache!');
|
352 |
}
|
353 |
|
354 |
-
|
355 |
-
|
356 |
-
if (
|
357 |
-
|
358 |
-
} else if (values.type == 'num') {
|
359 |
-
plot_hist(values.col, i);
|
360 |
-
}
|
361 |
}
|
362 |
-
|
363 |
-
// let cols = [];
|
364 |
-
// for (let col of data.columns) {
|
365 |
-
// if (!isNaN(parseFloat(data[0][col]))) {
|
366 |
-
// cols.push(['num', col]);
|
367 |
-
// } else {
|
368 |
-
// const cats = new Set();
|
369 |
-
// for (let value of data) {
|
370 |
-
// cats.add(value[col]);
|
371 |
-
// if (cats.size > 100) {
|
372 |
-
// break;
|
373 |
-
// }
|
374 |
-
// }
|
375 |
-
// if (cats.size <= 100) {
|
376 |
-
// cols.push(['cat', col]);
|
377 |
-
// }
|
378 |
-
// }
|
379 |
-
// }
|
380 |
-
|
381 |
-
// for (let i = 0; i < cols.length; i++) {
|
382 |
-
// if (cols[i][0] == 'num') {
|
383 |
-
// plot_hist(data, cols[i][1], i);
|
384 |
-
// } else if (cols[i][0] == 'cat') {
|
385 |
-
// plot_pie(data, cols[i][1], i);
|
386 |
-
// }
|
387 |
-
// }
|
388 |
};
|
389 |
-
|
390 |
reader.readAsText(selectedFile);
|
391 |
} else {
|
392 |
console.warn('There is no file!');
|
393 |
}
|
394 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
const color = d3.scaleOrdinal().range(d3.schemeSet3);
|
209 |
|
210 |
const MAX_CATS = 10;
|
211 |
+
const MAX_CHARTS = 5; // temporary
|
212 |
|
213 |
const cache_df = {is_empty: true, dataset: []};
|
214 |
|
|
|
249 |
}
|
250 |
|
251 |
type = maybe_cats ? 'cat' : type == 'num' ? type : 'object';
|
252 |
+
// console.log(col, type);
|
253 |
|
254 |
let nan_count = data.length - cols.length;
|
255 |
if (type == 'cat') {
|
|
|
278 |
cache_df.dataset.push(col_data);
|
279 |
}
|
280 |
}
|
281 |
+
_update_options();
|
282 |
+
}
|
283 |
+
|
284 |
+
function _update_options() {
|
285 |
+
for (let i = 0; i < cache_df.dataset.length; i++) {
|
286 |
+
const name = cache_df.dataset[i].col;
|
287 |
+
const newColumnOption = document.createElement('li');
|
288 |
+
newColumnOption.innerHTML = `
|
289 |
+
<div class="pl-5 flex items-center p-2 rounded hover:bg-gray-100 dark:hover:bg-gray-600">
|
290 |
+
<input id="checkbox-item-${i}" type="checkbox" class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500">
|
291 |
+
<label for="checkbox-item-${i}" class="w-full pl-3 text-sm font-medium text-gray-900 rounded dark:text-gray-300 capitalized">${name}</label>
|
292 |
+
<a href="#col-${i}">jump</a>
|
293 |
+
</div>`;
|
294 |
+
ulColumns.appendChild(newColumnOption);
|
295 |
+
}
|
296 |
+
|
297 |
+
const inputs = ulColumns.querySelectorAll('input');
|
298 |
+
const total = inputs.length - 1;
|
299 |
+
|
300 |
+
inputs[0].addEventListener('click', function(_) {
|
301 |
+
const count = inputs[0].checked * total;
|
302 |
+
_update_dropdown_text(count, total);
|
303 |
+
for (let i = 1; i < inputs.length; i++) {
|
304 |
+
inputs[i].checked = inputs[0].checked;
|
305 |
+
}
|
306 |
+
})
|
307 |
+
|
308 |
+
let count = 0;
|
309 |
+
for (let i = 1; i < inputs.length; i++) {
|
310 |
+
inputs[i].addEventListener('click', function(_) {
|
311 |
+
inputs[0].checked = false;
|
312 |
+
|
313 |
+
let count = 0;
|
314 |
+
let total = inputs.length - 1;
|
315 |
+
for (let input of inputs) {
|
316 |
+
count += input.checked;
|
317 |
+
}
|
318 |
+
_update_dropdown_text(count, total);
|
319 |
+
})
|
320 |
+
if (i <= MAX_CHARTS) {
|
321 |
+
inputs[i].checked = true;
|
322 |
+
count += 1;
|
323 |
+
}
|
324 |
+
}
|
325 |
+
|
326 |
+
document.getElementById('dropdown').classList.remove('hidden');
|
327 |
+
_update_dropdown_text(count, total);
|
328 |
+
}
|
329 |
+
|
330 |
+
function _update_dropdown_text(count, total) {
|
331 |
+
showDropdownButton.innerHTML = `Select Columns (${count} of ${total})<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 15.41l-4.29-4.29a1.01 1.01 0 0 0-1.42 0 1.01 1.01 0 0 0 0 1.42l5 5a1.01 1.01 0 0 0 1.42 0l5-5a1.01 1.01 0 0 0 0-1.42 1.01 1.01 0 0 0-1.42 0L12 15.41z"/></svg>`
|
332 |
+
}
|
333 |
+
|
334 |
+
function _plot(col_id) {
|
335 |
+
values = cache_df.dataset[col_id];
|
336 |
+
if (values.type == 'cat') {
|
337 |
+
plot_pie(values.col, col_id);
|
338 |
+
} else if (values.type == 'num') {
|
339 |
+
plot_hist(values.col, col_id);
|
340 |
+
}
|
341 |
+
}
|
342 |
+
|
343 |
+
function _toggle_column(col_id, is_open=true) {
|
344 |
+
let chart_div = document.getElementById(`col-${col_id}`);
|
345 |
+
if (!chart_div) {
|
346 |
+
_plot(col_id);
|
347 |
+
chart_div = document.getElementById(`col-${col_id}`);
|
348 |
+
}
|
349 |
+
|
350 |
+
if (is_open) {
|
351 |
+
chart_div.classList.remove('hidden');
|
352 |
+
} else {
|
353 |
+
chart_div.classList.add('hidden');
|
354 |
+
}
|
355 |
}
|
356 |
|
357 |
function addChart(chartID, name, info) {
|
|
|
362 |
}
|
363 |
|
364 |
const newChartDiv = document.createElement('div');
|
365 |
+
newChartDiv.id = `col-${chartID}`;
|
366 |
+
newChartDiv.className = 'cols p-4 mt-4 w-full overflow-hidden bg-white rounded-lg';
|
367 |
newChartDiv.innerHTML = `
|
368 |
<div class="w-full p-4 bg-white rounded-lg xl:p-6">
|
369 |
<h1 class="text-lg font-medium text-gray-700 capitalize sm:text-xl md:text-2xl">${name}</h1>
|
|
|
412 |
|
413 |
function render() {
|
414 |
if (fileInput.files.length > 0) {
|
415 |
+
if (!fileInput.files[0].name.endsWith('.csv')) {
|
416 |
+
console.warn('Invalid Format!');
|
417 |
+
return;
|
418 |
+
}
|
419 |
|
420 |
+
charts.innerHTML = '';
|
421 |
var selectedFile = fileInput.files[0];
|
422 |
var reader = new FileReader();
|
423 |
|
|
|
426 |
var data = d3.csvParse(fileContent);
|
427 |
|
428 |
if (cache_df.is_empty) {
|
429 |
+
ulColumns.innerHTML = '<li><div class="flex items-center p-2 rounded hover:bg-gray-100 dark:hover:bg-gray-600"><input id="checkbox-item-main" type="checkbox" value="" class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500"><label for="checkbox-item-main" class="w-full pl-3 text-sm font-medium text-gray-900 rounded dark:text-gray-300">All Columns</label></div></li>';
|
430 |
_update_cache(data);
|
431 |
} else {
|
432 |
console.log('We already have cache!');
|
433 |
}
|
434 |
|
435 |
+
inputs = ulColumns.querySelectorAll('input');
|
436 |
+
for (let i = 1; i < inputs.length; i++) {
|
437 |
+
if (!inputs[i].checked) continue;
|
438 |
+
_plot(i-1);
|
|
|
|
|
|
|
439 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
440 |
};
|
|
|
441 |
reader.readAsText(selectedFile);
|
442 |
} else {
|
443 |
console.warn('There is no file!');
|
444 |
}
|
445 |
}
|
446 |
+
|
447 |
+
function _comeback_options() {
|
448 |
+
dropdownSearch.style.display = 'none';
|
449 |
+
let ids = new Set();
|
450 |
+
for (let chart of charts.getElementsByClassName('cols')) {
|
451 |
+
ids.add(+chart.id.split('-')[1]);
|
452 |
+
}
|
453 |
+
|
454 |
+
const inputs = ulColumns.querySelectorAll('input');
|
455 |
+
inputs[0].checked = false;
|
456 |
+
for (let i = 1; i < inputs.length; i++) {
|
457 |
+
inputs[i].checked = ids.has(i-1);
|
458 |
+
}
|
459 |
+
|
460 |
+
_update_dropdown_text(ids.size, inputs.length-1);
|
461 |
+
}
|
462 |
+
|
463 |
+
function _apply_options() {
|
464 |
+
dropdownSearch.style.display = 'none';
|
465 |
+
const inputs = ulColumns.querySelectorAll('input');
|
466 |
+
for (let i = 1; i < inputs.length; i++) {
|
467 |
+
_toggle_column(i-1, inputs[i].checked);
|
468 |
+
}
|
469 |
+
}
|
470 |
+
|
471 |
+
const showDropdownButton = document.getElementById('showDropdown');
|
472 |
+
const dropdownSearch = document.getElementById('dropdownSearch');
|
473 |
+
const ulColumns = document.getElementById('ul-columns');
|
474 |
+
|
475 |
+
showDropdownButton.addEventListener('click', function() {
|
476 |
+
if (dropdownSearch.style.display === 'none' || dropdownSearch.style.display === '') {
|
477 |
+
dropdownSearch.style.display = 'block';
|
478 |
+
} else {
|
479 |
+
dropdownSearch.style.display = 'none';
|
480 |
+
}
|
481 |
+
});
|
482 |
+
|
483 |
+
document.getElementById('cancel').addEventListener('click', _comeback_options);
|
484 |
+
document.getElementById('apply').addEventListener('click', _apply_options);
|
static/analytics.html
CHANGED
@@ -76,7 +76,7 @@
|
|
76 |
</a>
|
77 |
|
78 |
<a class="flex items-center px-4 py-2 text-gray-600 transition-colors duration-300 transform bg-gray-200 rounded-lg bg-opacity-40"
|
79 |
-
href="
|
80 |
<svg fill="currentColor" width="24px" height="24px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
81 |
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
|
82 |
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
|
@@ -174,7 +174,7 @@
|
|
174 |
</a>
|
175 |
|
176 |
<a class="block px-5 py-2 text-sm text-gray-700 capitalize transition-colors duration-200 transform sm:px-12 hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
|
177 |
-
href="
|
178 |
Analytics
|
179 |
</a>
|
180 |
|
@@ -225,7 +225,7 @@
|
|
225 |
<div class="hidden mt-3 overflow-y-auto text-sm lg:items-center lg:flex whitespace-nowrap">
|
226 |
<a class="text-gray-600">Pages</a>
|
227 |
<span class="mx-1 text-gray-500">/</span>
|
228 |
-
<a href="" class="text-indigo-600 hover:underline no-invert">Analytics</a>
|
229 |
</div>
|
230 |
</div>
|
231 |
|
@@ -239,7 +239,7 @@
|
|
239 |
</svg>
|
240 |
|
241 |
<span class="mt-4">Import Data</span>
|
242 |
-
<input id="data" type="file" class="hidden" accept=".csv
|
243 |
</label>
|
244 |
</div>
|
245 |
<div class="mt-4 flex justify-between no-invert">
|
@@ -249,82 +249,45 @@
|
|
249 |
</div>
|
250 |
</div>
|
251 |
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
<div class="grid gap-12 mt-8 sm:grid-cols-2">
|
259 |
-
<div class="flex items-center capitalize">
|
260 |
-
<svg width="284" height="300"><g class="x-axis" transform="translate(0,280)" fill="none" font-size="10" font-family="sans-serif" text-anchor="middle" style="font: 12px arial;"><path class="domain" stroke="currentColor" d="M20,6V0H264V6"></path><g class="tick" opacity="1" transform="translate(20,0)"><line stroke="currentColor" y2="6"></line><text fill="currentColor" y="9" dy="0.71em">8</text></g><g class="tick" opacity="1" transform="translate(264,0)"><line stroke="currentColor" y2="6"></line><text fill="currentColor" y="9" dy="0.71em">96</text></g></g><rect x="20" y="271.6860465116279" width="4.545454545454547" height="8.313953488372078" fill="#ffa116" class="no-invert"></rect><rect x="25.545454545454547" y="37.383720930232556" width="26.727272727272727" height="242.61627906976744" fill="#ffa116" class="no-invert"></rect><rect x="53.27272727272727" y="20" width="26.727272727272727" height="260" fill="#ffa116" class="no-invert"></rect><rect x="81" y="77.44186046511626" width="26.72727272727272" height="202.55813953488374" fill="#ffa116" class="no-invert"></rect><rect x="108.72727272727272" y="146.97674418604652" width="26.72727272727272" height="133.02325581395348" fill="#ffa116" class="no-invert"></rect><rect x="136.45454545454544" y="242.20930232558138" width="26.727272727272748" height="37.790697674418624" fill="#ffa116" class="no-invert"></rect><rect x="164.1818181818182" y="265.6395348837209" width="26.72727272727272" height="14.360465116279101" fill="#ffa116" class="no-invert"></rect><rect x="191.9090909090909" y="278.4883720930232" width="26.72727272727272" height="1.5116279069767984" fill="#ffa116" class="no-invert"></rect><rect x="219.63636363636363" y="258.0813953488372" width="26.727272727272748" height="21.91860465116281" fill="#ffa116" class="no-invert"></rect><rect x="247.36363636363637" y="268.6627906976744" width="15.636363636363626" height="11.337209302325618" fill="#ffa116" class="no-invert"></rect></svg>
|
261 |
-
</div>
|
262 |
-
<div class="flow-root mt-6">
|
263 |
-
<ul>
|
264 |
-
<li>
|
265 |
-
<span class="absolute top-4 left-4 rtl:right-4 rtl:left-auto -ml-px h-full w-0.5 bg-gray-200" aria-hidden="true"></span>
|
266 |
-
<div class="relative flex">
|
267 |
-
<span class="flex items-center justify-center w-8 h-8 bg-white rounded-full ring-8 ring-white">
|
268 |
-
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 no-invert text-indigo-600" viewBox="0 0 20 20" fill="currentColor">
|
269 |
-
<path d="M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zM10 18a3 3 0 01-3-3h6a3 3 0 01-3 3z"></path>
|
270 |
-
</svg>
|
271 |
-
</span>
|
272 |
-
|
273 |
-
<div class="min-w-0 flex-1 pt-1.5 mx-3">
|
274 |
-
<p class="text-sm font-medium text-gray-700">General Info:</p>
|
275 |
-
<p class="mt-1 text-sm text-gray-500 truncate sm:w-auto"><b>DataType:</b> Quantitative</p>
|
276 |
-
<p class="mt-1 text-sm text-gray-500 truncate sm:w-auto"><b>Mean:</b> 15.3k</p>
|
277 |
-
<p class="mt-1 text-sm text-gray-500 truncate sm:w-auto"><b>Median:</b> 1.32k</p>
|
278 |
-
<p class="mt-1 text-sm text-gray-500 truncate sm:w-auto"><b>Std. Deviation:</b> 10.4</p>
|
279 |
-
<p class="mt-1 text-sm text-gray-500 truncate sm:w-auto"><b>Missing Values:</b> 100 (4.5%)</p>
|
280 |
-
<p class="mt-1 text-sm text-gray-500 truncate sm:w-auto"><b>Total Values:</b> 12.5k (95.5%)</p>
|
281 |
-
</div>
|
282 |
-
</div>
|
283 |
-
</li>
|
284 |
-
</ul>
|
285 |
-
</div>
|
286 |
-
</div>
|
287 |
-
</div> -->
|
288 |
-
</div>
|
289 |
-
|
290 |
-
<!-- <div class="2xl:-mx-3 2xl:flex">
|
291 |
-
<div class="w-full p-4 bg-white rounded-lg 2xl:mx-3 2xl:w-1/2 xl:p-6">
|
292 |
-
<h1 class="text-lg font-medium text-gray-700 capitalize sm:text-xl md:text-2xl">
|
293 |
-
Projects Activity</h1>
|
294 |
-
|
295 |
-
<p class="mt-2 text-gray-500">
|
296 |
-
<span class="text-green-500 no-invert">(+29)</span> than last month
|
297 |
-
</p>
|
298 |
-
|
299 |
-
<canvas id="line2Chart" height="150" class="no-invert"></canvas>
|
300 |
</div>
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
</div>
|
313 |
</div>
|
314 |
</div>
|
315 |
|
316 |
-
<div
|
317 |
-
<div class="mb-2">
|
318 |
-
<h1 class="text-lg font-medium text-gray-700 capitalize sm:text-xl md:text-2xl">
|
319 |
-
sales overview</h1>
|
320 |
-
|
321 |
-
<p class="mt-2 text-gray-500">
|
322 |
-
<span class="text-green-500 no-invert">(+5) more</span> in 2022
|
323 |
-
</p>
|
324 |
-
</div>
|
325 |
-
|
326 |
-
<canvas id="lineChart" height="80"></canvas>
|
327 |
-
</div> -->
|
328 |
</section>
|
329 |
</div>
|
330 |
</div>
|
|
|
76 |
</a>
|
77 |
|
78 |
<a class="flex items-center px-4 py-2 text-gray-600 transition-colors duration-300 transform bg-gray-200 rounded-lg bg-opacity-40"
|
79 |
+
href="javascript:void 0">
|
80 |
<svg fill="currentColor" width="24px" height="24px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
81 |
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
|
82 |
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
|
|
|
174 |
</a>
|
175 |
|
176 |
<a class="block px-5 py-2 text-sm text-gray-700 capitalize transition-colors duration-200 transform sm:px-12 hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
|
177 |
+
href="javascript:void 0">
|
178 |
Analytics
|
179 |
</a>
|
180 |
|
|
|
225 |
<div class="hidden mt-3 overflow-y-auto text-sm lg:items-center lg:flex whitespace-nowrap">
|
226 |
<a class="text-gray-600">Pages</a>
|
227 |
<span class="mx-1 text-gray-500">/</span>
|
228 |
+
<a href="javascript:void 0" class="text-indigo-600 hover:underline no-invert">Analytics</a>
|
229 |
</div>
|
230 |
</div>
|
231 |
|
|
|
239 |
</svg>
|
240 |
|
241 |
<span class="mt-4">Import Data</span>
|
242 |
+
<input id="data" type="file" class="hidden" accept=".csv">
|
243 |
</label>
|
244 |
</div>
|
245 |
<div class="mt-4 flex justify-between no-invert">
|
|
|
249 |
</div>
|
250 |
</div>
|
251 |
|
252 |
+
<div id="dropdown" class="hidden p-4 z-10 bg-white rounded-lg shadow w-full">
|
253 |
+
<div class="p-3">
|
254 |
+
<button id="showDropdown" class="font-medium text-gray-700 text-lg inline-flex items-center">
|
255 |
+
Select Columns (0 of 0)
|
256 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 15.41l-4.29-4.29a1.01 1.01 0 0 0-1.42 0 1.01 1.01 0 0 0 0 1.42l5 5a1.01 1.01 0 0 0 1.42 0l5-5a1.01 1.01 0 0 0 0-1.42 1.01 1.01 0 0 0-1.42 0L12 15.41z"/></svg>
|
257 |
+
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
</div>
|
259 |
+
<div id="dropdownSearch" style="display: none;">
|
260 |
+
<!-- <div class="p-3">
|
261 |
+
<label for="input-group-search text-lg"></label>
|
262 |
+
<div class="relative mt-3">
|
263 |
+
<div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none">
|
264 |
+
<svg class="w-4 h-4 text-gray-500 dark:text-gray-400" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
|
265 |
+
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"/>
|
266 |
+
</svg>
|
267 |
+
</div>
|
268 |
+
<input type="text" id="input-group-search" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pl-10 p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Search">
|
269 |
+
</div>
|
270 |
+
</div> -->
|
271 |
+
<ul id="ul-columns" class="h-48 px-3 pb-3 overflow-y-auto text-sm text-gray-700 dark:text-gray-200" aria-labelledby="dropdownSearchButton">
|
272 |
+
<li>
|
273 |
+
<div class="flex items-center p-2 rounded hover:bg-gray-100 dark:hover:bg-gray-600">
|
274 |
+
<input id="checkbox-item-main" type="checkbox" value="" class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500">
|
275 |
+
<label for="checkbox-item-main" class="w-full pl-3 text-sm font-medium text-gray-900 rounded dark:text-gray-300">All Columns</label>
|
276 |
+
</div>
|
277 |
+
</li>
|
278 |
+
</ul>
|
279 |
+
<div class="mt-4 flex justify-between no-invert">
|
280 |
+
<button id="cancel" class="w-32 sm:w-80 flex items-center justify-center py-2 px-4 rounded font-medium text-white rounded-full border-gray-100" style="background-color: white; color: black; border: 1px solid gray; max-height: 2.5rem;">
|
281 |
+
Cancel
|
282 |
+
</button>
|
283 |
+
<button id="apply" class="w-32 sm:w-80 flex items-center justify-center py-2 px-4 rounded font-medium text-white rounded-full" style="max-height: 2.5rem;">
|
284 |
+
Apply
|
285 |
+
</button>
|
286 |
</div>
|
287 |
</div>
|
288 |
</div>
|
289 |
|
290 |
+
<div id="my-charts"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
</section>
|
292 |
</div>
|
293 |
</div>
|