GSS-Cogs / chart-builder

The Chart Builder is a proof-of-concept app to understand the feasibility of using a CSV file (or SPARQL query) to generate and customise a chart or data visualisation
https://chart-builder-no4vxskx7a-nw.a.run.app
2 stars 0 forks source link

Publish chart feature #39

Closed charlesons closed 2 years ago

charlesons commented 2 years ago

Created a publish chart component that uses the dom-to-image library to convert the chart preview element to a blob for saving. The actual saving is done by the library file-saver. The image format is png.

The filename for the saved image is the chart title if specified or defaults to 'published-chart'.

Function toSafeFilename created to convert a string to a safe filename string.