Skip to content

Commit 50775c9

Browse files
committed
Update docs
1 parent 2d75184 commit 50775c9

File tree

5 files changed

+41
-0
lines changed

5 files changed

+41
-0
lines changed

website/docs/annotations.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
id: annotations
3+
title: Annotations
4+
---
5+
6+
![Annotations](../static/img/annotations.png)
7+
8+
[Annotations](https://grafana.com/docs/grafana/latest/dashboards/annotations) let you extract data from a data source and use it to annotate a dashboard.
9+
10+
To use the JSON API data source for annotations, follow the instructions on [Querying other data sources](https://grafana.com/docs/grafana/latest/dashboards/annotations/#querying-other-data-sources). Make sure to select the JSON API from the list of data sources.
11+
12+
Configure a query with _at least_ two fields:
13+
14+
- A **String** field for the annotation text
15+
- A **Time** field for the annotation time
16+
17+
If you want to add titles or tags to the annotations, you can add additional **Fields** with the appropriate types.
18+
19+
For more information on how to configure a query, refer to [Query editor](query-editor.md).

website/docs/variables.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
id: variables
3+
title: Variables
4+
---
5+
6+
![Variables](../static/img/variable.png)
7+
8+
[Query variables](https://grafana.com/docs/grafana/latest/variables/variable-types/add-query-variable) let you extract data from a data source and use it to populate a dashboard variable.
9+
10+
To query the JSON API data source for variables, follow the instructions on how to [Add a query variable](https://grafana.com/docs/grafana/latest/variables/variable-types/add-query-variable). Make sure to select the JSON API from the list of data sources.
11+
12+
You can edit the query for the variable in the same way as the default query editor except that you can only define one field.
13+
14+
For more information on how to configure a query, refer to [Query editor](query-editor.md).

website/sidebars.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ module.exports = {
1313
type: 'doc',
1414
id: 'query-editor',
1515
},
16+
{
17+
type: 'doc',
18+
id: 'variables',
19+
},
20+
{
21+
type: 'doc',
22+
id: 'annotations',
23+
},
1624
{
1725
type: 'doc',
1826
id: 'macros',

website/static/img/annotations.png

379 KB
Loading

website/static/img/variable.png

388 KB
Loading

0 commit comments

Comments
 (0)