Spaces:
Running
Running
Jair Adair dos Soares Almeida commited on
Add 2 files
Browse filesFiles changed (2)
- index.html+306-58
- prompts.txt+2-1
21 unmodified lines222324252627210 unmodified lines238239240241242243284 unmodified lines52852953053153253387 unmodified lines6216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556562 unmodified lines65966066166266366415 unmodified lines6806816826836846856866878 unmodified lines6966976986997007014 unmodified lines7067077087097107117127137147154 unmodified lines72072172272372472572672735 unmodified lines7637647657667677687697707717727737747757767777787797807817823 unmodified lines78678778878979079179279379479579679779879980080180280380480580680780880981049 unmodified lines86086186286386486586686715 unmodified lines8838848858868878888898908918928938948958962 unmodified lines8999009019029039048 unmodified lines91391491591691791891917 unmodified lines9379389399409419429434 unmodified lines94894995095195295395434 unmodified lines98999099199299399499533 unmodified lines102910301031103210331034103521 unmodified lines</script><script src="https://cdn.jsdelivr.net/npm/chart.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"><style>:root {210 unmodified linesvisibility: visible;opacity: 1;}</style></head><body class="min-h-screen">284 unmodified lineslet columns = [];let currentChart = null;let currentFile = null;// Tab functionalitydocument.querySelectorAll('.tab-button').forEach(button => {87 unmodified linesconst reader = new FileReader();reader.onload = function(e) {const data = new Uint8Array(e.target.result);const workbook = XLSX.read(data, { type: 'array' });// Get first sheetconst firstSheet = workbook.Sheets[workbook.SheetNames[0]];// Convert to JSONrawData = XLSX.utils.sheet_to_json(firstSheet, { header: 1 });filteredData = [...rawData];// Extract headers (assuming first row is headers)columns = rawData[0] || [];rawData = rawData.slice(1); // Remove header rowfilteredData = filteredData.slice(1);// Populate column listpopulateColumnList();// Populate data tablepopulateDataTable();// Update statsupdateStats();// Initialize multiselect optionsupdateMultiselectOptions('xAxisSelect', columns);updateMultiselectOptions('yAxisSelect', columns);// Hide loading statechartLoading.style.display = 'none';};reader.onerror = function() {alert('Error reading file');2 unmodified linesreader.readAsArrayBuffer(file);}// Format file sizefunction formatFileSize(bytes) {if (bytes === 0) return '0 Bytes';15 unmodified linescolumns.forEach((column, index) => {const columnItem = document.createElement('div');columnItem.className = 'column-item p-2 hover:bg-gray-700 cursor-pointer rounded';columnItem.textContent = column;columnItem.dataset.columnIndex = index;columnItem.addEventListener('click', function() {8 unmodified lines});}// Populate data tablefunction populateDataTable() {const table = document.getElementById('dataTable');4 unmodified linesthead.innerHTML = '';tbody.innerHTML = '';// Add headerscolumns.forEach(column => {const th = document.createElement('th');th.textContent = column;thead.appendChild(th);});4 unmodified linescolumns.forEach((_, index) => {const td = document.createElement('td');td.className = 'text-gray-300';td.textContent = row[index] !== undefined ? row[index] : '';tr.appendChild(td);});35 unmodified linescolumns.forEach((col, index) => {const values = rawData.map(row => row[index]);const numericValues = values.filter(val => !isNaN(parseFloat(val))).map(Number);const uniqueValues = new Set(values.filter(val => val !== undefined && val !== '').map(String));const row = document.createElement('tr');row.className = 'hover:bg-gray-700';// Column nameconst nameCell = document.createElement('td');nameCell.textContent = col;row.appendChild(nameCell);// Typeconst typeCell = document.createElement('td');typeCell.textContent = numericValues.length > 0 ? 'Numeric' : 'Text';row.appendChild(typeCell);// Unique values3 unmodified lines// Missing valuesconst missingCell = document.createElement('td');const missingCount = values.filter(val => val === undefined || val === '').length;missingCell.textContent = missingCount;row.appendChild(missingCell);// Min (for numeric columns)const minCell = document.createElement('td');minCell.textContent = numericValues.length > 0 ? Math.min(...numericValues).toFixed(2) : '-';row.appendChild(minCell);// Max (for numeric columns)const maxCell = document.createElement('td');maxCell.textContent = numericValues.length > 0 ? Math.max(...numericValues).toFixed(2) : '-';row.appendChild(maxCell);// Mean (for numeric columns)const meanCell = document.createElement('td');if (numericValues.length > 0) {const sum = numericValues.reduce((a, b) => a + b, 0);meanCell.textContent = (sum / numericValues.length).toFixed(2);} else {meanCell.textContent = '-';}49 unmodified linesoptions.forEach((option, index) => {const optionItem = document.createElement('div');optionItem.className = 'multiselect-option-item px-4 py-2 hover:bg-gray-700 cursor-pointer';optionItem.textContent = option;optionItem.dataset.value = index;optionItem.addEventListener('click', function() {15 unmodified lines// Create selected option tagconst selectedOption = document.createElement('div');selectedOption.className = 'multiselect-option bg-indigo-900 text-indigo-100';selectedOption.dataset.value = index;const optionText = document.createElement('span');optionText.textContent = option;const removeButton = document.createElement('span');removeButton.className = 'multiselect-option-remove';removeButton.innerHTML = '×';removeButton.addEventListener('click', function(e) {2 unmodified lines});selectedOption.appendChild(optionText);selectedOption.appendChild(removeButton);selectedContainer.appendChild(selectedOption);8 unmodified linesconst selectedOptions = container.querySelectorAll('.multiselect-selected [data-value]');return Array.from(selectedOptions).map(option => ({index: parseInt(option.dataset.value),name: option.textContent.replace('×', '').trim()}));}17 unmodified linestry {// Prepare data for Chart.jsconst labels = rawData.map(row => {return xAxisOptions.map(opt => row[opt.index]).join(' - ');});const datasets = yAxisOptions.map((yOpt, i) => {4 unmodified linesreturn {label: yOpt.name,data: rawData.map(row => row[yOpt.index]),borderColor: colors[i % colors.length],backgroundColor: colors[i % colors.length],borderWidth: 2,34 unmodified linestitleColor: '#e2e8f0',bodyColor: '#e2e8f0',borderColor: '#4a5568',borderWidth: 1},legend: {position: 'bottom',33 unmodified linescolor: '#4a5568'},ticks: {color: '#a0aec0'}}}21 unmodified lines22232425262728210 unmodified lines239240241242243244245246247248249250251252253254255256284 unmodified lines54154254354454554654787 unmodified lines6356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776782 unmodified lines68168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375415 unmodified lines7707717727737747757767777787797808 unmodified lines7897907917927937947957967977987998008018028034 unmodified lines8088098108118128138148158168178188198208218224 unmodified lines82782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287335 unmodified lines9099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489493 unmodified lines95395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299349 unmodified lines1043104410451046104710481049105010511052105315 unmodified lines10691070107110721073107410751076107710781079108010811082108310841085108610872 unmodified lines10901091109210931094109510968 unmodified lines1105110611071108110911101111111217 unmodified lines1130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511564 unmodified lines11611162116311641165116611671168116911701171117211731174117511761177117834 unmodified lines121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123733 unmodified lines127112721273127412751276127712781279128012811282128321 unmodified lines</script><script src="https://cdn.jsdelivr.net/npm/chart.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"><style>:root {210 unmodified linesvisibility: visible;opacity: 1;}.date-cell {color: #68d391;}.numeric-cell {color: #63b3ed;}.text-cell {color: #f6ad55;}</style></head><body class="min-h-screen">284 unmodified lineslet columns = [];let currentChart = null;let currentFile = null;let columnTypes = [];// Tab functionalitydocument.querySelectorAll('.tab-button').forEach(button => {87 unmodified linesconst reader = new FileReader();reader.onload = function(e) {try {const data = new Uint8Array(e.target.result);const workbook = XLSX.read(data, { type: 'array', cellDates: true });// Get first sheetconst firstSheet = workbook.Sheets[workbook.SheetNames[0]];// Convert to JSON with raw values to preserve datesrawData = XLSX.utils.sheet_to_json(firstSheet, { header: 1, raw: false, defval: null });// Extract headers (assuming first row is headers)columns = rawData[0] || [];rawData = rawData.slice(1); // Remove header rowfilteredData = [...rawData];// Analyze column typesanalyzeColumnTypes();// Populate column listpopulateColumnList();// Populate data tablepopulateDataTable();// Update statsupdateStats();// Initialize multiselect optionsupdateMultiselectOptions('xAxisSelect', columns);updateMultiselectOptions('yAxisSelect', columns);} catch (error) {console.error('Error processing file:', error);alert('Error processing file: ' + error.message);} finally {// Hide loading statechartLoading.style.display = 'none';}};reader.onerror = function() {alert('Error reading file');2 unmodified linesreader.readAsArrayBuffer(file);}// Analyze column types (date, number, text)function analyzeColumnTypes() {columnTypes = [];if (columns.length === 0 || rawData.length === 0) return;// Check first 20 rows to determine typeconst sampleRows = rawData.slice(0, Math.min(20, rawData.length));columns.forEach((col, colIndex) => {let dateCount = 0;let numberCount = 0;let emptyCount = 0;sampleRows.forEach(row => {const value = row[colIndex];if (value === null || value === undefined || value === '') {emptyCount++;return;}// Check if it's a date (Excel date or string date)if (value instanceof Date) {dateCount++;} else if (typeof value === 'string') {// Try to parse as dateconst dateFormats = ['YYYY-MM-DD', 'MM/DD/YYYY', 'DD/MM/YYYY','YYYY/MM/DD', 'DD-MM-YYYY', 'MM-DD-YYYY'];for (const format of dateFormats) {if (moment(value, format, true).isValid()) {dateCount++;return;}}// Check if it's a numberif (!isNaN(value) && value.trim() !== '') {numberCount++;}} else if (typeof value === 'number') {// Excel stores dates as numbers (days since 1900)// If the number is between 0 and 100,000, it might be a dateif (value > 0 && value < 100000) {dateCount++;} else {numberCount++;}}});// Determine the most likely typeconst total = sampleRows.length - emptyCount;if (total === 0) {columnTypes[colIndex] = 'text';} else if (dateCount / total > 0.7) {columnTypes[colIndex] = 'date';} else if (numberCount / total > 0.7) {columnTypes[colIndex] = 'number';} else {columnTypes[colIndex] = 'text';}});}// Format file sizefunction formatFileSize(bytes) {if (bytes === 0) return '0 Bytes';15 unmodified linescolumns.forEach((column, index) => {const columnItem = document.createElement('div');columnItem.className = 'column-item p-2 hover:bg-gray-700 cursor-pointer rounded flex items-center justify-between';columnItem.innerHTML = `<span>${column}</span><span class="text-xs ${getTypeColorClass(columnTypes[index])}">${columnTypes[index]}</span>`;columnItem.dataset.columnIndex = index;columnItem.addEventListener('click', function() {8 unmodified lines});}// Get CSS class for type indicatorfunction getTypeColorClass(type) {switch(type) {case 'date': return 'text-green-400';case 'number': return 'text-blue-400';default: return 'text-yellow-400';}}// Populate data tablefunction populateDataTable() {const table = document.getElementById('dataTable');4 unmodified linesthead.innerHTML = '';tbody.innerHTML = '';// Add headers with type indicatorscolumns.forEach((column, index) => {const th = document.createElement('th');th.innerHTML = `<div class="flex flex-col"><span>${column}</span><span class="text-xs ${getTypeColorClass(columnTypes[index])}">${columnTypes[index]}</span></div>`;thead.appendChild(th);});4 unmodified linescolumns.forEach((_, index) => {const td = document.createElement('td');const value = row[index];// Format based on typelet displayValue = '';let cellClass = '';if (value === null || value === undefined || value === '') {displayValue = '';cellClass = 'text-gray-500 italic';} else if (columnTypes[index] === 'date') {// Format dateif (value instanceof Date) {displayValue = value.toLocaleDateString();} else if (typeof value === 'number') {// Convert Excel date number to Dateconst date = new Date((value - (25567 + 2)) * 86400 * 1000);displayValue = date.toLocaleDateString();} else {// Try to parse string as dateconst dateFormats = ['YYYY-MM-DD', 'MM/DD/YYYY', 'DD/MM/YYYY','YYYY/MM/DD', 'DD-MM-YYYY', 'MM-DD-YYYY'];const parsedDate = moment(value, dateFormats, true);displayValue = parsedDate.isValid() ? parsedDate.format('YYYY-MM-DD') : value;}cellClass = 'date-cell';} else if (columnTypes[index] === 'number') {// Format numberconst num = parseFloat(value);displayValue = isNaN(num) ? value : num.toLocaleString();cellClass = 'numeric-cell';} else {// TextdisplayValue = value.toString();cellClass = 'text-cell';}td.className = cellClass;td.textContent = displayValue;tr.appendChild(td);});35 unmodified linescolumns.forEach((col, index) => {const values = rawData.map(row => row[index]);const nonEmptyValues = values.filter(val => val !== null && val !== undefined && val !== '');// For numeric columnsconst numericValues = columnTypes[index] === 'number' || columnTypes[index] === 'date'? nonEmptyValues.map(val => {if (columnTypes[index] === 'date') {if (val instanceof Date) return val.getTime();if (typeof val === 'number') return (val - (25567 + 2)) * 86400 * 1000;const parsedDate = moment(val, ['YYYY-MM-DD', 'MM/DD/YYYY', 'DD/MM/YYYY'], true);return parsedDate.isValid() ? parsedDate.valueOf() : null;}return parseFloat(val);}).filter(val => !isNaN(val)): [];// For all columnsconst uniqueValues = new Set(nonEmptyValues.map(String));const missingCount = values.length - nonEmptyValues.length;const row = document.createElement('tr');row.className = 'hover:bg-gray-700';// Column name and typeconst nameCell = document.createElement('td');nameCell.innerHTML = `<div class="flex flex-col"><span>${col}</span><span class="text-xs ${getTypeColorClass(columnTypes[index])}">${columnTypes[index]}</span></div>`;row.appendChild(nameCell);// Typeconst typeCell = document.createElement('td');typeCell.textContent = columnTypes[index];row.appendChild(typeCell);// Unique values3 unmodified lines// Missing valuesconst missingCell = document.createElement('td');missingCell.textContent = missingCount;row.appendChild(missingCell);// Min (for numeric/date columns)const minCell = document.createElement('td');if (numericValues.length > 0) {const min = Math.min(...numericValues);minCell.textContent = columnTypes[index] === 'date'? new Date(min).toLocaleDateString(): min.toLocaleString();} else {minCell.textContent = '-';}row.appendChild(minCell);// Max (for numeric/date columns)const maxCell = document.createElement('td');if (numericValues.length > 0) {const max = Math.max(...numericValues);maxCell.textContent = columnTypes[index] === 'date'? new Date(max).toLocaleDateString(): max.toLocaleString();} else {maxCell.textContent = '-';}row.appendChild(maxCell);// Mean (for numeric/date columns)const meanCell = document.createElement('td');if (numericValues.length > 0) {const sum = numericValues.reduce((a, b) => a + b, 0);const mean = sum / numericValues.length;meanCell.textContent = columnTypes[index] === 'date'? new Date(mean).toLocaleDateString(): mean.toFixed(2);} else {meanCell.textContent = '-';}49 unmodified linesoptions.forEach((option, index) => {const optionItem = document.createElement('div');optionItem.className = 'multiselect-option-item px-4 py-2 hover:bg-gray-700 cursor-pointer flex justify-between items-center';optionItem.innerHTML = `<span>${option}</span><span class="text-xs ${getTypeColorClass(columnTypes[index])}">${columnTypes[index]}</span>`;optionItem.dataset.value = index;optionItem.addEventListener('click', function() {15 unmodified lines// Create selected option tagconst selectedOption = document.createElement('div');selectedOption.className = 'multiselect-option bg-indigo-900 text-indigo-100 flex items-center';selectedOption.dataset.value = index;selectedOption.dataset.type = columnTypes[index];const optionText = document.createElement('span');optionText.textContent = option;const typeBadge = document.createElement('span');typeBadge.className = `ml-2 text-xs ${getTypeColorClass(columnTypes[index])}`;typeBadge.textContent = columnTypes[index];const removeButton = document.createElement('span');removeButton.className = 'multiselect-option-remove ml-2';removeButton.innerHTML = '×';removeButton.addEventListener('click', function(e) {2 unmodified lines});selectedOption.appendChild(optionText);selectedOption.appendChild(typeBadge);selectedOption.appendChild(removeButton);selectedContainer.appendChild(selectedOption);8 unmodified linesconst selectedOptions = container.querySelectorAll('.multiselect-selected [data-value]');return Array.from(selectedOptions).map(option => ({index: parseInt(option.dataset.value),name: option.textContent.replace('×', '').trim(),type: option.dataset.type}));}17 unmodified linestry {// Prepare data for Chart.jsconst labels = rawData.map(row => {return xAxisOptions.map(opt => {const value = row[opt.index];if (value === null || value === undefined || value === '') return '';if (opt.type === 'date') {if (value instanceof Date) return value.toLocaleDateString();if (typeof value === 'number') {// Convert Excel date number to Dateconst date = new Date((value - (25567 + 2)) * 86400 * 1000);return date.toLocaleDateString();}// Try to parse string as dateconst dateFormats = ['YYYY-MM-DD', 'MM/DD/YYYY', 'DD/MM/YYYY','YYYY/MM/DD', 'DD-MM-YYYY', 'MM-DD-YYYY'];const parsedDate = moment(value, dateFormats, true);return parsedDate.isValid() ? parsedDate.format('YYYY-MM-DD') : value;}return value.toString();}).join(' - ');});const datasets = yAxisOptions.map((yOpt, i) => {4 unmodified linesreturn {label: yOpt.name,data: rawData.map(row => {const value = row[yOpt.index];if (value === null || value === undefined || value === '') return null;if (yOpt.type === 'date') {if (value instanceof Date) return value.getTime();if (typeof value === 'number') return (value - (25567 + 2)) * 86400 * 1000;const parsedDate = moment(value, ['YYYY-MM-DD', 'MM/DD/YYYY', 'DD/MM/YYYY'], true);return parsedDate.isValid() ? parsedDate.valueOf() : null;}return parseFloat(value);}),borderColor: colors[i % colors.length],backgroundColor: colors[i % colors.length],borderWidth: 2,34 unmodified linestitleColor: '#e2e8f0',bodyColor: '#e2e8f0',borderColor: '#4a5568',borderWidth: 1,callbacks: {label: function(context) {const dataset = context.dataset;const value = context.raw;let label = dataset.label || '';if (yAxisOptions[context.datasetIndex].type === 'date') {if (value !== null) {return label + ': ' + new Date(value).toLocaleDateString();}}if (value !== null) {return label + ': ' + value;}return label + ': N/A';}}},legend: {position: 'bottom',33 unmodified linescolor: '#4a5568'},ticks: {color: '#a0aec0',callback: function(value) {if (yAxisOptions.some(opt => opt.type === 'date')) {return new Date(value).toLocaleDateString();}return value;}}}}
1adicione o necessario para tornar a aplicação mais robusta, de salientar que a acor da aplicação deverá ser cinza escuro <!DOCTYPE html> <html lang="en"> <head><script>window.huggingface={variables:{"SPACE_CREATOR_USER_ID":"68151e9e4f1bf760cbaeb868"}};</script> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>IGR Advanced Data Analyser AI</title> <script src="https://cdn.tailwindcss.com"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> .file-input-wrapper { position: relative; overflow: hidden; display: inline-block; } .file-input-wrapper input[type=file] { position: absolute; top: 0; right: 0; min-width: 100%; min-height: 100%; font-size: 100px; text-align: right; filter: alpha(opacity=0); opacity: 0; outline: none; background: white; cursor: pointer; display: block; } .multiselect { min-height: 38px; border: 1px solid #d1d5db; border-radius: 0.375rem; padding: 0.375rem 0.75rem; } .multiselect:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 1px #3b82f6; } .multiselect-option { display: inline-block; background-color: #e5e7eb; border-radius: 0.25rem; padding: 0.25rem 0.5rem; margin-right: 0.5rem; margin-bottom: 0.5rem; } .multiselect-option-remove { margin-left: 0.5rem; cursor: pointer; color: #6b7280; } .multiselect-option-remove:hover { color: #ef4444; } .dropdown-content { max-height: 200px; overflow-y: auto; } .highlight { background-color: #f0f9ff; } </style> </head> <body class="bg-gray-50 min-h-screen"> <div class="container mx-auto px-4 py-8"> <header class="mb-8 text-center"> <h1 class="text-4xl font-bold text-blue-800 mb-2">IGR Advanced Data Analyser AI</h1> <p class="text-lg text-gray-600">Powerful data visualization and analysis tool</p> </header> <div class="bg-white rounded-lg shadow-lg p-6 mb-8"> <div class="flex flex-col md:flex-row gap-6"> <div class="w-full md:w-1/3"> <h2 class="text-xl font-semibold mb-4 text-gray-800">Upload Data</h2> <div class="file-input-wrapper mb-4"> <button class="w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition duration-200 flex items-center justify-center"> <i class="fas fa-file-excel mr-2"></i> Choose Excel File <input type="file" id="fileInput" class="hidden" accept=".xlsx, .xls, .csv"> </button> </div> <div id="fileName" class="text-sm text-gray-500 mt-2 italic"></div> <div class="mt-6"> <h3 class="font-medium text-gray-700 mb-2">Search Columns</h3> <div class="relative"> <input type="text" id="columnSearch" placeholder="Search columns..." class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> <i class="fas fa-search absolute right-3 top-3 text-gray-400"></i> </div> </div> <div class="mt-4"> <h3 class="font-medium text-gray-700 mb-2">Available Columns</h3> <div id="columnList" class="border border-gray-200 rounded-lg p-2 max-h-60 overflow-y-auto"> <p class="text-gray-500 italic">Upload a file to see available columns</p> </div> </div> </div> <div class="w-full md:w-2/3"> <h2 class="text-xl font-semibold mb-4 text-gray-800">Visualization Settings</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <div> <label for="xAxisSelect" class="block text-sm font-medium text-gray-700 mb-1">X-Axis (Multiple Selection)</label> <div class="multiselect" id="xAxisSelect"> <div class="multiselect-selected flex flex-wrap"></div> <input type="text" class="multiselect-input w-full border-0 focus:ring-0 p-0" placeholder="Select columns..."> <div class="dropdown-content hidden absolute z-10 mt-1 w-full bg-white border border-gray-300 rounded-lg shadow-lg"> <div class="multiselect-options max-h-60 overflow-y-auto"></div> </div> </div> </div> <div> <label for="yAxisSelect" class="block text-sm font-medium text-gray-700 mb-1">Y-Axis (Multiple Selection)</label> <div class="multiselect" id="yAxisSelect"> <div class="multiselect-selected flex flex-wrap"></div> <input type="text" class="multiselect-input w-full border-0 focus:ring-0 p-0" placeholder="Select columns..."> <div class="dropdown-content hidden absolute z-10 mt-1 w-full bg-white border border-gray-300 rounded-lg shadow-lg"> <div class="multiselect-options max-h-60 overflow-y-auto"></div> </div> </div> </div> </div> <div class="mb-6"> <label for="chartType" class="block text-sm font-medium text-gray-700 mb-1">Chart Type</label> <select id="chartType" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> <option value="line">Line Chart</option> <option value="bar">Bar Chart</option> <option value="scatter">Scatter Plot</option> <option value="pie">Pie Chart</option> <option value="doughnut">Doughnut Chart</option> <option value="radar">Radar Chart</option> </select> </div> <div class="flex justify-between items-center mb-4"> <h3 class="font-medium text-gray-700">Chart Preview</h3> <button id="generateChart" class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition duration-200 flex items-center"> <i class="fas fa-chart-line mr-2"></i> Generate Chart </button> </div> <div class="bg-gray-50 p-4 rounded-lg border border-gray-200"> <div class="chart-container" style="position: relative; height: 400px; width: 100%"> <canvas id="dataChart"></canvas> </div> </div> </div> </div> </div> <div class="bg-white rounded-lg shadow-lg p-6"> <h2 class="text-xl font-semibold mb-4 text-gray-800">Data Preview</h2> <div class="overflow-x-auto"> <table id="dataTable" class="min-w-full divide-y divide-gray-200"> <thead class="bg-gray-50"> <tr> <!-- Table headers will be populated dynamically --> </tr> </thead> <tbody class="bg-white divide-y divide-gray-200"> <!-- Table data will be populated dynamically --> </tbody> </table> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Global variables let rawData = []; let columns = []; let currentChart = null; // File input handler document.getElementById('fileInput').addEventListener('change', handleFileUpload); // Column search functionality document.getElementById('columnSearch').addEventListener('input', function(e) { const searchTerm = e.target.value.toLowerCase(); const columnItems = document.querySelectorAll('#columnList .column-item'); columnItems.forEach(item => { const columnName = item.textContent.toLowerCase(); if (columnName.includes(searchTerm)) { item.classList.remove('hidden'); item.classList.add('highlight'); } else { item.classList.add('hidden'); item.classList.remove('highlight'); } }); }); // Initialize multiselect components initMultiselect('xAxisSelect'); initMultiselect('yAxisSelect'); // Generate chart button document.getElementById('generateChart').addEventListener('click', generateChart); // File upload handler function handleFileUpload(e) { const file = e.target.files[0]; if (!file) return; document.getElementById('fileName').textContent = `Selected file: ${file.name}`; const reader = new FileReader(); reader.onload = function(e) { const data = new Uint8Array(e.target.result); const workbook = XLSX.read(data, { type: 'array' }); // Get first sheet const firstSheet = workbook.Sheets[workbook.SheetNames[0]]; // Convert to JSON rawData = XLSX.utils.sheet_to_json(firstSheet, { header: 1 }); // Extract headers (assuming first row is headers) columns = rawData[0] || []; rawData = rawData.slice(1); // Remove header row // Populate column list populateColumnList(); // Populate data table populateDataTable(); // Initialize multiselect options updateMultiselectOptions('xAxisSelect', columns); updateMultiselectOptions('yAxisSelect', columns); }; reader.readAsArrayBuffer(file); } // Populate column list function populateColumnList() { const columnList = document.getElementById('columnList'); columnList.innerHTML = ''; if (columns.length === 0) { columnList.innerHTML = '<p class="text-gray-500 italic">No columns found</p>'; return; } columns.forEach((column, index) => { const columnItem = document.createElement('div'); columnItem.className = 'column-item p-2 hover:bg-gray-100 cursor-pointer rounded'; columnItem.textContent = column; columnItem.dataset.columnIndex = index; columnItem.addEventListener('click', function() { // Highlight selected column document.querySelectorAll('#columnList .column-item').forEach(item => { item.classList.remove('bg-blue-100'); }); this.classList.add('bg-blue-100'); // You could add functionality here to auto-select the column for X or Y axis }); columnList.appendChild(columnItem); }); } // Populate data table function populateDataTable() { const table = document.getElementById('dataTable'); const thead = table.querySelector('thead tr'); const tbody = table.querySelector('tbody'); // Clear existing content thead.innerHTML = ''; tbody.innerHTML = ''; // Add headers columns.forEach(column => { const th = document.createElement('th'); th.className = 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider'; th.textContent = column; thead.appendChild(th); }); // Add data rows (limit to 50 for performance) const displayData = rawData.slice(0, 50); displayData.forEach(row => { const tr = document.createElement('tr'); columns.forEach((_, index) => { const td = document.createElement('td'); td.className = 'px-6 py-4 whitespace-nowrap text-sm text-gray-500'; td.textContent = row[index] !== undefined ? row[index] : ''; tr.appendChild(td); }); tbody.appendChild(tr); }); } // Initialize multiselect component function initMultiselect(id) { const container = document.getElementById(id); const selectedContainer = container.querySelector('.multiselect-selected'); const input = container.querySelector('.multiselect-input'); const dropdown = container.querySelector('.dropdown-content'); const optionsContainer = container.querySelector('.multiselect-options'); // Toggle dropdown on input focus input.addEventListener('focus', function() { dropdown.classList.remove('hidden'); input.placeholder = 'Type to search...'; }); // Close dropdown when clicking outside document.addEventListener('click', function(e) { if (!container.contains(e.target)) { dropdown.classList.add('hidden'); input.placeholder = 'Select columns...'; } }); // Search within options input.addEventListener('input', function(e) { const searchTerm = e.target.value.toLowerCase(); const options = optionsContainer.querySelectorAll('.multiselect-option-item'); options.forEach(option => { const text = option.textContent.toLowerCase(); if (text.includes(searchTerm)) { option.classList.remove('hidden'); } else { option.classList.add('hidden'); } }); }); } // Update multiselect options function updateMultiselectOptions(id, options) { const container = document.getElementById(id); const optionsContainer = container.querySelector('.multiselect-options'); optionsContainer.innerHTML = ''; options.forEach((option, index) => { const optionItem = document.createElement('div'); optionItem.className = 'multiselect-option-item px-4 py-2 hover:bg-gray-100 cursor-pointer'; optionItem.textContent = option; optionItem.dataset.value = index; optionItem.addEventListener('click', function() { addSelectedOption(id, option, index); }); optionsContainer.appendChild(optionItem); }); } // Add selected option to multiselect function addSelectedOption(id, option, index) { const container = document.getElementById(id); const selectedContainer = container.querySelector('.multiselect-selected'); // Check if option is already selected const existingOption = selectedContainer.querySelector(`[data-value="${index}"]`); if (existingOption) return; // Create selected option tag const selectedOption = document.createElement('div'); selectedOption.className = 'multiselect-option bg-blue-100 text-blue-800'; selectedOption.dataset.value = index; const optionText = document.createElement('span'); optionText.textContent = option; const removeButton = document.createElement('span'); removeButton.className = 'multiselect-option-remove'; removeButton.innerHTML = '×'; removeButton.addEventListener('click', function(e) { e.stopPropagation(); selectedOption.remove(); }); selectedOption.appendChild(optionText); selectedOption.appendChild(removeButton); selectedContainer.appendChild(selectedOption); // Clear input and hide dropdown container.querySelector('.multiselect-input').value = ''; container.querySelector('.dropdown-content').classList.add('hidden'); } // Get selected options from multiselect function getSelectedOptions(id) { const container = document.getElementById(id); const selectedOptions = container.querySelectorAll('.multiselect-selected [data-value]'); return Array.from(selectedOptions).map(option => ({ index: parseInt(option.dataset.value), name: option.textContent.replace('×', '').trim() })); } // Generate chart based on selected options function generateChart() { const xAxisOptions = getSelectedOptions('xAxisSelect'); const yAxisOptions = getSelectedOptions('yAxisSelect'); const chartType = document.getElementById('chartType').value; if (xAxisOptions.length === 0 || yAxisOptions.length === 0) { alert('Please select at least one column for both X and Y axes'); return; } // Prepare data for Chart.js const labels = rawData.map(row => { return xAxisOptions.map(opt => row[opt.index]).join(' - '); }); const datasets = yAxisOptions.map((yOpt, i) => { const colors = [ '#3b82f6', '#ef4444', '#10b981', '#f59e0b', '#8b5cf6', '#ec4899', '#14b8a6', '#f97316', '#64748b', '#84cc16' ]; return { label: yOpt.name, data: rawData.map(row => row[yOpt.index]), borderColor: colors[i % colors.length], backgroundColor: colors[i % colors.length], borderWidth: 2, tension: 0.1, fill: false }; }); // Get chart canvas and destroy previous chart if exists const ctx = document.getElementById('dataChart').getContext('2d'); if (currentChart) { currentChart.destroy(); } // Create new chart currentChart = new Chart(ctx, { type: chartType, data: { labels: labels, datasets: datasets }, options: { responsive: true, maintainAspectRatio: false, plugins: { title: { display: true, text: 'Data Visualization', font: { size: 16 } }, tooltip: { mode: 'index', intersect: false }, legend: { position: 'bottom', labels: { boxWidth: 12 } } }, scales: { x: { title: { display: true, text: xAxisOptions.map(opt => opt.name).join(' + '), font: { weight: 'bold' } } }, y: { title: { display: true, text: yAxisOptions.length === 1 ? yAxisOptions[0].name : 'Multiple Values', font: { weight: 'bold' } } } } } }); } }); </script> <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=jair2323/resmonit-1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> </html>12adicione o necessario para tornar a aplicação mais robusta, de salientar que a acor da aplicação deverá ser cinza escuro <!DOCTYPE html> <html lang="en"> <head><script>window.huggingface={variables:{"SPACE_CREATOR_USER_ID":"68151e9e4f1bf760cbaeb868"}};</script> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>IGR Advanced Data Analyser AI</title> <script src="https://cdn.tailwindcss.com"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> .file-input-wrapper { position: relative; overflow: hidden; display: inline-block; } .file-input-wrapper input[type=file] { position: absolute; top: 0; right: 0; min-width: 100%; min-height: 100%; font-size: 100px; text-align: right; filter: alpha(opacity=0); opacity: 0; outline: none; background: white; cursor: pointer; display: block; } .multiselect { min-height: 38px; border: 1px solid #d1d5db; border-radius: 0.375rem; padding: 0.375rem 0.75rem; } .multiselect:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 1px #3b82f6; } .multiselect-option { display: inline-block; background-color: #e5e7eb; border-radius: 0.25rem; padding: 0.25rem 0.5rem; margin-right: 0.5rem; margin-bottom: 0.5rem; } .multiselect-option-remove { margin-left: 0.5rem; cursor: pointer; color: #6b7280; } .multiselect-option-remove:hover { color: #ef4444; } .dropdown-content { max-height: 200px; overflow-y: auto; } .highlight { background-color: #f0f9ff; } </style> </head> <body class="bg-gray-50 min-h-screen"> <div class="container mx-auto px-4 py-8"> <header class="mb-8 text-center"> <h1 class="text-4xl font-bold text-blue-800 mb-2">IGR Advanced Data Analyser AI</h1> <p class="text-lg text-gray-600">Powerful data visualization and analysis tool</p> </header> <div class="bg-white rounded-lg shadow-lg p-6 mb-8"> <div class="flex flex-col md:flex-row gap-6"> <div class="w-full md:w-1/3"> <h2 class="text-xl font-semibold mb-4 text-gray-800">Upload Data</h2> <div class="file-input-wrapper mb-4"> <button class="w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition duration-200 flex items-center justify-center"> <i class="fas fa-file-excel mr-2"></i> Choose Excel File <input type="file" id="fileInput" class="hidden" accept=".xlsx, .xls, .csv"> </button> </div> <div id="fileName" class="text-sm text-gray-500 mt-2 italic"></div> <div class="mt-6"> <h3 class="font-medium text-gray-700 mb-2">Search Columns</h3> <div class="relative"> <input type="text" id="columnSearch" placeholder="Search columns..." class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> <i class="fas fa-search absolute right-3 top-3 text-gray-400"></i> </div> </div> <div class="mt-4"> <h3 class="font-medium text-gray-700 mb-2">Available Columns</h3> <div id="columnList" class="border border-gray-200 rounded-lg p-2 max-h-60 overflow-y-auto"> <p class="text-gray-500 italic">Upload a file to see available columns</p> </div> </div> </div> <div class="w-full md:w-2/3"> <h2 class="text-xl font-semibold mb-4 text-gray-800">Visualization Settings</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <div> <label for="xAxisSelect" class="block text-sm font-medium text-gray-700 mb-1">X-Axis (Multiple Selection)</label> <div class="multiselect" id="xAxisSelect"> <div class="multiselect-selected flex flex-wrap"></div> <input type="text" class="multiselect-input w-full border-0 focus:ring-0 p-0" placeholder="Select columns..."> <div class="dropdown-content hidden absolute z-10 mt-1 w-full bg-white border border-gray-300 rounded-lg shadow-lg"> <div class="multiselect-options max-h-60 overflow-y-auto"></div> </div> </div> </div> <div> <label for="yAxisSelect" class="block text-sm font-medium text-gray-700 mb-1">Y-Axis (Multiple Selection)</label> <div class="multiselect" id="yAxisSelect"> <div class="multiselect-selected flex flex-wrap"></div> <input type="text" class="multiselect-input w-full border-0 focus:ring-0 p-0" placeholder="Select columns..."> <div class="dropdown-content hidden absolute z-10 mt-1 w-full bg-white border border-gray-300 rounded-lg shadow-lg"> <div class="multiselect-options max-h-60 overflow-y-auto"></div> </div> </div> </div> </div> <div class="mb-6"> <label for="chartType" class="block text-sm font-medium text-gray-700 mb-1">Chart Type</label> <select id="chartType" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> <option value="line">Line Chart</option> <option value="bar">Bar Chart</option> <option value="scatter">Scatter Plot</option> <option value="pie">Pie Chart</option> <option value="doughnut">Doughnut Chart</option> <option value="radar">Radar Chart</option> </select> </div> <div class="flex justify-between items-center mb-4"> <h3 class="font-medium text-gray-700">Chart Preview</h3> <button id="generateChart" class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition duration-200 flex items-center"> <i class="fas fa-chart-line mr-2"></i> Generate Chart </button> </div> <div class="bg-gray-50 p-4 rounded-lg border border-gray-200"> <div class="chart-container" style="position: relative; height: 400px; width: 100%"> <canvas id="dataChart"></canvas> </div> </div> </div> </div> </div> <div class="bg-white rounded-lg shadow-lg p-6"> <h2 class="text-xl font-semibold mb-4 text-gray-800">Data Preview</h2> <div class="overflow-x-auto"> <table id="dataTable" class="min-w-full divide-y divide-gray-200"> <thead class="bg-gray-50"> <tr> <!-- Table headers will be populated dynamically --> </tr> </thead> <tbody class="bg-white divide-y divide-gray-200"> <!-- Table data will be populated dynamically --> </tbody> </table> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Global variables let rawData = []; let columns = []; let currentChart = null; // File input handler document.getElementById('fileInput').addEventListener('change', handleFileUpload); // Column search functionality document.getElementById('columnSearch').addEventListener('input', function(e) { const searchTerm = e.target.value.toLowerCase(); const columnItems = document.querySelectorAll('#columnList .column-item'); columnItems.forEach(item => { const columnName = item.textContent.toLowerCase(); if (columnName.includes(searchTerm)) { item.classList.remove('hidden'); item.classList.add('highlight'); } else { item.classList.add('hidden'); item.classList.remove('highlight'); } }); }); // Initialize multiselect components initMultiselect('xAxisSelect'); initMultiselect('yAxisSelect'); // Generate chart button document.getElementById('generateChart').addEventListener('click', generateChart); // File upload handler function handleFileUpload(e) { const file = e.target.files[0]; if (!file) return; document.getElementById('fileName').textContent = `Selected file: ${file.name}`; const reader = new FileReader(); reader.onload = function(e) { const data = new Uint8Array(e.target.result); const workbook = XLSX.read(data, { type: 'array' }); // Get first sheet const firstSheet = workbook.Sheets[workbook.SheetNames[0]]; // Convert to JSON rawData = XLSX.utils.sheet_to_json(firstSheet, { header: 1 }); // Extract headers (assuming first row is headers) columns = rawData[0] || []; rawData = rawData.slice(1); // Remove header row // Populate column list populateColumnList(); // Populate data table populateDataTable(); // Initialize multiselect options updateMultiselectOptions('xAxisSelect', columns); updateMultiselectOptions('yAxisSelect', columns); }; reader.readAsArrayBuffer(file); } // Populate column list function populateColumnList() { const columnList = document.getElementById('columnList'); columnList.innerHTML = ''; if (columns.length === 0) { columnList.innerHTML = '<p class="text-gray-500 italic">No columns found</p>'; return; } columns.forEach((column, index) => { const columnItem = document.createElement('div'); columnItem.className = 'column-item p-2 hover:bg-gray-100 cursor-pointer rounded'; columnItem.textContent = column; columnItem.dataset.columnIndex = index; columnItem.addEventListener('click', function() { // Highlight selected column document.querySelectorAll('#columnList .column-item').forEach(item => { item.classList.remove('bg-blue-100'); }); this.classList.add('bg-blue-100'); // You could add functionality here to auto-select the column for X or Y axis }); columnList.appendChild(columnItem); }); } // Populate data table function populateDataTable() { const table = document.getElementById('dataTable'); const thead = table.querySelector('thead tr'); const tbody = table.querySelector('tbody'); // Clear existing content thead.innerHTML = ''; tbody.innerHTML = ''; // Add headers columns.forEach(column => { const th = document.createElement('th'); th.className = 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider'; th.textContent = column; thead.appendChild(th); }); // Add data rows (limit to 50 for performance) const displayData = rawData.slice(0, 50); displayData.forEach(row => { const tr = document.createElement('tr'); columns.forEach((_, index) => { const td = document.createElement('td'); td.className = 'px-6 py-4 whitespace-nowrap text-sm text-gray-500'; td.textContent = row[index] !== undefined ? row[index] : ''; tr.appendChild(td); }); tbody.appendChild(tr); }); } // Initialize multiselect component function initMultiselect(id) { const container = document.getElementById(id); const selectedContainer = container.querySelector('.multiselect-selected'); const input = container.querySelector('.multiselect-input'); const dropdown = container.querySelector('.dropdown-content'); const optionsContainer = container.querySelector('.multiselect-options'); // Toggle dropdown on input focus input.addEventListener('focus', function() { dropdown.classList.remove('hidden'); input.placeholder = 'Type to search...'; }); // Close dropdown when clicking outside document.addEventListener('click', function(e) { if (!container.contains(e.target)) { dropdown.classList.add('hidden'); input.placeholder = 'Select columns...'; } }); // Search within options input.addEventListener('input', function(e) { const searchTerm = e.target.value.toLowerCase(); const options = optionsContainer.querySelectorAll('.multiselect-option-item'); options.forEach(option => { const text = option.textContent.toLowerCase(); if (text.includes(searchTerm)) { option.classList.remove('hidden'); } else { option.classList.add('hidden'); } }); }); } // Update multiselect options function updateMultiselectOptions(id, options) { const container = document.getElementById(id); const optionsContainer = container.querySelector('.multiselect-options'); optionsContainer.innerHTML = ''; options.forEach((option, index) => { const optionItem = document.createElement('div'); optionItem.className = 'multiselect-option-item px-4 py-2 hover:bg-gray-100 cursor-pointer'; optionItem.textContent = option; optionItem.dataset.value = index; optionItem.addEventListener('click', function() { addSelectedOption(id, option, index); }); optionsContainer.appendChild(optionItem); }); } // Add selected option to multiselect function addSelectedOption(id, option, index) { const container = document.getElementById(id); const selectedContainer = container.querySelector('.multiselect-selected'); // Check if option is already selected const existingOption = selectedContainer.querySelector(`[data-value="${index}"]`); if (existingOption) return; // Create selected option tag const selectedOption = document.createElement('div'); selectedOption.className = 'multiselect-option bg-blue-100 text-blue-800'; selectedOption.dataset.value = index; const optionText = document.createElement('span'); optionText.textContent = option; const removeButton = document.createElement('span'); removeButton.className = 'multiselect-option-remove'; removeButton.innerHTML = '×'; removeButton.addEventListener('click', function(e) { e.stopPropagation(); selectedOption.remove(); }); selectedOption.appendChild(optionText); selectedOption.appendChild(removeButton); selectedContainer.appendChild(selectedOption); // Clear input and hide dropdown container.querySelector('.multiselect-input').value = ''; container.querySelector('.dropdown-content').classList.add('hidden'); } // Get selected options from multiselect function getSelectedOptions(id) { const container = document.getElementById(id); const selectedOptions = container.querySelectorAll('.multiselect-selected [data-value]'); return Array.from(selectedOptions).map(option => ({ index: parseInt(option.dataset.value), name: option.textContent.replace('×', '').trim() })); } // Generate chart based on selected options function generateChart() { const xAxisOptions = getSelectedOptions('xAxisSelect'); const yAxisOptions = getSelectedOptions('yAxisSelect'); const chartType = document.getElementById('chartType').value; if (xAxisOptions.length === 0 || yAxisOptions.length === 0) { alert('Please select at least one column for both X and Y axes'); return; } // Prepare data for Chart.js const labels = rawData.map(row => { return xAxisOptions.map(opt => row[opt.index]).join(' - '); }); const datasets = yAxisOptions.map((yOpt, i) => { const colors = [ '#3b82f6', '#ef4444', '#10b981', '#f59e0b', '#8b5cf6', '#ec4899', '#14b8a6', '#f97316', '#64748b', '#84cc16' ]; return { label: yOpt.name, data: rawData.map(row => row[yOpt.index]), borderColor: colors[i % colors.length], backgroundColor: colors[i % colors.length], borderWidth: 2, tension: 0.1, fill: false }; }); // Get chart canvas and destroy previous chart if exists const ctx = document.getElementById('dataChart').getContext('2d'); if (currentChart) { currentChart.destroy(); } // Create new chart currentChart = new Chart(ctx, { type: chartType, data: { labels: labels, datasets: datasets }, options: { responsive: true, maintainAspectRatio: false, plugins: { title: { display: true, text: 'Data Visualization', font: { size: 16 } }, tooltip: { mode: 'index', intersect: false }, legend: { position: 'bottom', labels: { boxWidth: 12 } } }, scales: { x: { title: { display: true, text: xAxisOptions.map(opt => opt.name).join(' + '), font: { weight: 'bold' } } }, y: { title: { display: true, text: yAxisOptions.length === 1 ? yAxisOptions[0].name : 'Multiple Values', font: { weight: 'bold' } } } } } }); } }); </script> <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=jair2323/resmonit-1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> </html>a aplicação deve reconhecer o formato das datas no ficheiro excel
index.html+306-58
prompts.txt+2-1