Update apexcharts data and datatable

linkaiyi
Follow

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
          }])
Object has 0 attachments

Was this article helpful?

This article is viewed 22 times!

0 Comments

Leave a Comment

Support