Docs: Add more detail about mapping olhc values (#78963)

This commit is contained in:
Isabel 2023-12-11 11:50:20 -05:00 committed by GitHub
parent e6f2de51a3
commit 3d5f7a5b22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,17 +51,29 @@ The **Up color** and **Down color** options select which colors are used when th
## Open, High, Low, Close ## Open, High, Low, Close
The candlestick visualization will attempt to map fields to the appropriate dimension. The **Open**, **High**, **Low**, and **Close** options allow you to map your data to these dimensions if the panel is unable to do so. The candlestick visualization will attempt to map fields from your data to the appropriate dimension:
{{% admonition type="note" %}}
These values are hidden from the legend.
{{% /admonition %}}
- **Open** corresponds to the starting value of the given period. - **Open** corresponds to the starting value of the given period.
- **High** corresponds to the highest value of the given period. - **High** corresponds to the highest value of the given period.
- **Low** corresponds to the lowest value of the given period. - **Low** corresponds to the lowest value of the given period.
- **Close** corresponds to the final (end) value of the given period. - **Close** corresponds to the final (end) value of the given period.
- **Volume** corresponds to the sample count in the given period. (e.g. number of trades) - **Volume** corresponds to the sample count in the given period. (for example, number of trades)
{{% admonition type="note" %}}
The candlestick visualization legend doesn't display these values.
{{% /admonition %}}
To properly map these dimensions, the query results table from your data must include _at least_ the following columns:
- timestamp
- open
- high
- low
- close
If your data can't be mapped to these dimensions for some reason (for example, because the column names aren't the same), you can map them manually using the **Open**, **High**, **Low**, and **Close** fields under the **Candlestick** options in the panel editor:
![Open, High, Low, and Close fields in the panel editor](/media/docs/grafana/panels-visualizations/screenshot-olhc-options-10.3.png)
## Additional fields ## Additional fields