update data of datatables
$('#upload-new-data').on('click', function () {
datatable.clear().draw(); // first clear the data and draw
datatable.rows.add(NewlyCreatedData); // Add new data
datatable.columns.adjust().draw(); // Redraw the DataTable after adjust columns
});
update the data of apexcharts
use updateSeries() to update data, use updateOptions to update data, labels and more
chart.updateSeries([{
name: 'a',
data: a_data
}, {
name: 'b',
data: b_data
}])