Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make re-usable charts for use across tables/SQL queries of the same schema #2

Open
asg017 opened this issue Dec 21, 2023 · 3 comments

Comments

@asg017
Copy link
Collaborator

asg017 commented Dec 21, 2023

We should have some option where you can "save" a chart's configuration to re-use in other places.

For example, you have have some scatterplot/linear regression visualization that you want to re-use across your Datasette instance - say one chart per month. Currently, you'll have to re-build the chart manually for every new data source (table or SQL query), but that can get tiresome.

This will likely use Datasette's new internal database to persist chart components across restarts.

@tomsing1
Copy link

I think that applying a filter to the dataset currently resets the plot? It would be great if the plot definition could persist across changes, because then we can drill down into the dataset while being able to directly see the effect of filters on the (same) plot.

@asg017
Copy link
Collaborator Author

asg017 commented Dec 23, 2023

@tomsing1 yup, that's a current limitation! Though I think we can listen for form submissions and inject query parameters on submit, which means persisting across changes. I'll give it a shot!

@ptsefton
Copy link

ptsefton commented Jan 8, 2024

It would be good to link this to canned queries, so you can have a pre-configured plot associated with a query with an additional "plot" parameter in the config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants