simonw / django-sql-dashboard

Django app for building dashboards using raw SQL queries
https://django-sql-dashboard.datasette.io/
Apache License 2.0
437 stars 37 forks source link

Figure out a way to display a title for individual queries/charts #153

Open jimmybutton opened 2 years ago

jimmybutton commented 2 years ago

Many thanks for this great package!

When creating a dashboard with multiple queries and charts, I'd like to be able to give all or some of them (especially the charts) a title so others can understand what the graph is showing without having to look at the SQL query. So what I ended up doing is having additional queries in between charts such as select '## Users per day' as markdown. It kinda does the job, but it ends up looking a bit weird as the title is then quite far away from the chart itself.

A possible solution could be having an optional title field on the DashboardQuery object. What do you think about that?

simonw commented 2 years ago

Yeah I've been using that same trick - having queries which do select '## Users per day' as markdown - and it's not exactly elegant.

I like your suggestion of having an optional title.