Open dabreegster opened 5 months ago
If it's helpful, I have a few other uses of charting in Svelte from more recent work:
https://github.com/acteng/inspectorate_tools/blob/3030ec8320e62ba56a3c59c7a2654b46eef12cc6/src/routes/route_check/results_summary/LevelOfServiceTable.svelte#L77 Chartjs svelte wrapper is pretty great, though registering is a bit boilerplatey
https://github.com/Urban-Analytics-Technology-Platform/od2net/blob/main/viewer/src/TradeoffRadar.svelte An interactive radar chart, using a plugin
Notes from discussion today:
svelte-chartjs
(see DemoLand for an example too, e.g. callbacks just updating the data of chart)Next step: add initial version with random data/geojson data directly to main app template with interactive features, then consider refactoring into a component/utils if lots of code
Using plotly directly with Svelte was tedious as of a year ago: https://github.com/alan-turing-institute/uatk-spc/blob/6a5f1e772310422b254c048cc13b01f92e48bcf3/web/components/Plots.svelte#L109