update table on charts
This commit is contained in:
@@ -21,6 +21,17 @@
|
||||
|
||||
<!-- DataTables JS -->
|
||||
<script src="https://cdn.datatables.net/1.13.5/js/jquery.dataTables.min.js"></script>
|
||||
<!-- DataTables Buttons CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.3.7/css/buttons.dataTables.min.css">
|
||||
|
||||
<!-- DataTables Buttons JS -->
|
||||
<script src="https://cdn.datatables.net/buttons/2.3.7/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.3.7/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.3.7/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.3.7/js/buttons.print.min.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
@@ -167,13 +178,18 @@
|
||||
order: [
|
||||
[6, 'desc']
|
||||
], // Ordina per rating di default
|
||||
pageLength: 50, // Mostra 10 righe per pagina
|
||||
responsive: true, // Adatta il layout alla finestra
|
||||
pageLength: 50,
|
||||
responsive: true,
|
||||
dom: 'lBfrtip', // Aggiunge l'area per i pulsanti
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print' // Tipi di esportazione
|
||||
],
|
||||
initComplete: function(settings, json) {
|
||||
updateChart(json); // Aggiorna il grafico dopo aver caricato la tabella
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Funzione per calcolare i rating e aggiornare grafico e tabella
|
||||
$('#calculate-rating').on('click', function() {
|
||||
$.ajax({
|
||||
|
||||
Reference in New Issue
Block a user