Update plugin annotations docs (#31808)

This commit is contained in:
Marcus Olsson
2021-03-15 10:03:44 +01:00
committed by GitHub
parent c479ca0161
commit cf929237e1

View File

@@ -14,7 +14,7 @@ This guide assumes that you're already familiar with how to [Build a data source
To enable annotation support for your data source, add the following two lines of code. Grafana uses your default query editor for editing annotation queries. To enable annotation support for your data source, add the following two lines of code. Grafana uses your default query editor for editing annotation queries.
1. Add `"annotations": true` to the [plugin.json]({{< relref "metadata.md" >}}) file. 1. Add `"annotations": true` to the [plugin.json]({{< relref "metadata.md" >}}) file to let Grafana know that your plugin supports annotations.
**plugin.json** **plugin.json**
@@ -24,7 +24,7 @@ To enable annotation support for your data source, add the following two lines o
} }
``` ```
2. In `datasource.ts`, override the `annotations` method from `DataSourceApi`. For the default behavior, you can set `annotations` to an empty object. 2. In `datasource.ts`, override the `annotations` property from `DataSourceApi`. For the default behavior, you can set `annotations` to an empty object.
**datasource.ts** **datasource.ts**