I have a page that clients can upload their csv files, save it to the server, then ajax will pass the location of the csv.
Question is I can't find a way for zingchart to reload with a new csv url, tried many ways in the document, below is my uncomplete code, don't know if there is any method in zingchart.exec can achieve this. Thanks for any suggestions or help
$.ajax({
type: 'POST',
url: '/upload_csv',
data: form_data,
contentType: false,
cache: false,
processData: false,
success: function(data) {
zingchart.exec('chartjs-line', 'modifyplot', {
data:{
csv: {
url: data.csv_url,
verticalLabels: true,
}
};
}
});
});
You should be able to do this with the
modifyfunction, the same way you have it set up currently.modifyplottargets theplotobject within yourgraphobject;csvshould be a member of yourgraphobject.If you have any other issues, the fastest way to get support is emailing [email protected] or starting a chat with us on our site!