Skip to content

Commit 5157d88

Browse files
committed
Screenshots and demo links for widgets, closes #96
1 parent e31e954 commit 5157d88

5 files changed

Lines changed: 17 additions & 1 deletion

File tree

docs/bar_label-bar_quantity.png

20.3 KB
Loading

docs/big_number-label.png

25.3 KB
Loading
10 KB
Loading

docs/widgets.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ SQL queries default to displaying as a table. Other forms of display - called wi
66

77
A query that returns columns called `bar_label` and `bar_quantity` will be rendered as a simple bar chart, using [Vega-Lite](https://vega.github.io/vega-lite/).
88

9-
For example:
9+
![A bar chart produced by this widget](bar_label-bar_quantity.png)
10+
11+
Bar chart live demo: [simonwillison.net/dashboard/by-month/](https://simonwillison.net/dashboard/by-month/)
12+
13+
SQL example:
1014

1115
```sql
1216
select
@@ -34,6 +38,10 @@ If you want to display the results as a big number accompanied by a label, you c
3438
select 'Number of states' as label, count(*) as big_number from states;
3539
```
3640

41+
![Output of the big number widget](big_number-label.png)
42+
43+
Big number live demo: [simonwillison.net/dashboard/big-numbers-demo/](https://simonwillison.net/dashboard/big-numbers-demo/)
44+
3745
## Progress bar: total_count, completed_count
3846

3947
To display a progress bar, return columns `total_count` and `completed_count`.
@@ -42,6 +50,10 @@ To display a progress bar, return columns `total_count` and `completed_count`.
4250
select 1203 as total_count, 755 as completed_count;
4351
```
4452

53+
![Output of the progress bar widget](completed_count-total_count.png)
54+
55+
Progress bar live demo: [simonwillison.net/dashboard/progress-bar-demo/](https://simonwillison.net/dashboard/progress-bar-demo/)
56+
4557
## Word cloud: wordcloud_word, wordcloud_count
4658

4759
To display a word cloud, return a column `wordcloud_word` containing words with a corresponding `wordcloud_count` column with the frequency of those words.
@@ -89,6 +101,10 @@ order by
89101
count(*) desc
90102
```
91103

104+
![Output of the word cloud widget](wordcloud_count-wordcloud_word.png)
105+
106+
Word cloud live demo: [simonwillison.net/dashboard/tag-cloud/](https://simonwillison.net/dashboard/tag-cloud/)
107+
92108
## markdown
93109

94110
Return a single column called `markdown` to render the contents as Markdown, for example:
112 KB
Loading

0 commit comments

Comments
 (0)