Docs: New doc pages for panels Stat, Gauge & Bar Gauge (#22335)

* Initial take

* inital gauge docs

* Updated and added bar gauge docs

* Updated based on feedback
This commit is contained in:
Torkel Ödegaard
2020-02-21 15:23:20 +01:00
committed by GitHub
parent d6ca781c49
commit 8c2107cd35
6 changed files with 279 additions and 65 deletions
+3 -56
View File
@@ -189,62 +189,9 @@ The time range tab allows you to override the dashboard time range and specify a
Either through a relative from now time option or through a timeshift.
Panel time overrides and timeshift are described in more detail [here]({{< relref "../../reference/timerange.md#panel-time-overrides-timeshift" >}}).
### Data link
### Data links
> Only available in Grafana v6.3+.
{{< docs-imagebox img="/img/docs/v66/datalinks_graph.png" max-width="1025px" caption="Data links" >}}
Data link allows adding dynamic links to the visualization. Those links can link to either other dashboard or to an external URL.
Data links allow you add dynamic URL links to your visualizations, [read more on data links]({{< relref "../../reference/datalinks.md" >}}).
{{< docs-imagebox img="/img/docs/data_link.png" max-width= "800px" >}}
Data link is defined by title, URL and a setting whether or not it should be opened in a new window.
**Title** is a human readable label for the link that will be displayed in the UI. The link itself is accessible in the graph's context menu when user **clicks on a single data point**:
{{< docs-imagebox img="/img/docs/data_link_tooltip.png" max-width= "800px" >}}
**URL** field allows the URL configuration for a given link. Apart from regular query params it also supports built-in variables and dashboard variables that you can choose from
available suggestions:
{{< docs-imagebox img="/img/docs/data_link_typeahead.png" max-width= "800px" >}}
#### Built-in variables
> These variables changed in 6.4 so if you have an older version of Grafana please use the version picker to select
docs for an older version of Grafana.
``__url_time_range`` - current dashboard's time range (i.e. ``?from=now-6h&to=now``)
``__from`` - current dashboard's time range from value
``__to`` - current dashboard's time range to value
#### Series variables
Series specific variables are available under ``__series`` namespace:
``__series.name`` - series name to the URL
``__series.labels.<LABEL>`` - label's value to the URL. If your label contains dots use ``__series.labels["<LABEL>"]`` syntax
#### Field variables
Field specific variables are available under ``__field`` namespace:
``__field.name`` - field name to the URL
#### Value variables
Value specific variables are available under ``__value`` namespace:
``__value.time`` - value's timestamp (Unix ms epoch) to the URL (i.e. ``?time=1560268814105``)
``__value.raw`` - raw value
``__value.numeric`` - numeric representation of a value
``__value.text`` - text representation of a value
``__value.calc`` - calculation name if the value is result of calculation
#### Template variables
When linking to another dashboard that uses template variables, you can use ``var-myvar=${myvar}`` syntax (where ``myvar`` is a name of template variable)
to use current dashboard's variable value. If you want to add all of the current dashboard's variables to the URL use ``__all_variables`` variable.