Spaces:
Running
Running
pretendo poder alterar o valor da escala de acordo as minhas necessidades, e torne a aplicação mais util please
Browse files387 unmodified lines388389390391391392393394395396397398399400401402843 unmodified lines124612471248124912501251124112421243124412451246124712481249125012511252125212531254125512561257125812591260126112621263126412651266126712681269127073 unmodified lines1344134513461332133313341347134813491350135113521353135413551356387 unmodified lines <option value="logarithmic">Logarithmic</option> </select> </div> </div> <div> <label for="minYValue" class="block text-sm font-medium mb-1">Min Y Value</label> <input type="number" id="minYValue" placeholder="Auto" class="w-full px-4 py-2 border border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 bg-dark-900 text-white"> </div> <div> <label for="maxYValue" class="block text-sm font-medium mb-1">Max Y Value</label> <input type="number" id="maxYValue" placeholder="Auto" class="w-full px-4 py-2 border border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 bg-dark-900 text-white"> </div></div>
<div class="flex justify-between items-center mb-4"> <h3 class="font-medium">Chart Preview</h3>843 unmodified lines if (currentChart) { currentChart.destroy(); } // Get min/max Y values if specified const minYValue = document.getElementById('minYValue').value; const maxYValue = document.getElementById('maxYValue').value; // Create new chart currentChart = new Chart(ctx, { type: chartType, data: { labels: labels, datasets: datasets }, options: { responsive: true, maintainAspectRatio: false, plugins: { // Create new chart currentChart = new Chart(ctx, { type: chartType, data: { labels: labels, datasets: datasets }, options: { responsive: true, maintainAspectRatio: false, animation: { duration: 1000, easing: 'easeOutQuart' },plugins: { title: { display: true, text: 'Data Visualization',73 unmodified lines return new Date(value).toLocaleDateString(); } return value; } } } }, min: minYValue !== '' ? parseFloat(minYValue) : undefined, max: maxYValue !== '' ? parseFloat(maxYValue) : undefined }, min: minYValue !== '' ? parseFloat(minYValue) : undefined, max: maxYValue !== '' ? parseFloat(maxYValue) : undefined} } } });index.html+35-16