Added download image to the chart element in SVG format (line/bar graphs).
Once image is clicked, exportCSV(ele) is executed. A simple function gets chart data from memory using an existing function in monkshu components and calls utils.exportCSV().
Created a file utils.mjs in chart-box/lib - to maintain common utility functions.
exportCSV() in utils, simply takes contents and filename as parameters, then process the data from JSON to CSV format and - download it within the function itself.
Papaparse library added to parse data with commas and newline character(delimiters).
Added blob to the link element and removed it at the end of the function call.
PS: @TekMonksGitHub sir, Included export csv image from the theme.json to the component.
Implemented Export CSV feature
PS: @TekMonksGitHub sir, Included export csv image from the theme.json to the component.