datasette-vega
datasette-vega copied to clipboard
feature: permit supplying an arbitrary vega-lite specification
Motivation
- Several features (#45, #39, #38, #26, #25, #22, #19) could be addressed without building additional UI elements if we gave users the ability to supply their own vega-lite definitions.
Proposed change
- Add a button which toggles a text box into which the existing Vega spec can be customized. Similar to how the SQL query editor stops displaying once you make a custom SQL query, if someone opts into using this "full customization" mode, they will lose the ability to use the usual field/scale selection options.
- May need to add a URL parameter to store a compressed representation of the vega spec in the URL parameters if we want these customizations to be shareable
Workarounds
- If the datasette instance is public, they can link to the current query results and customize the vega spec somewhere else, e.g.
- Default chart
- An example enhancement (being able to provide sort order): link
That would be really useful :)