Skip to content

Commit

Permalink
docs(color_thresholds): explain resulting colors (#1058)
Browse files Browse the repository at this point in the history
  • Loading branch information
ildar170975 authored Jan 20, 2024
1 parent 0c001ee commit 0d26f7c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ color_thresholds:
- value: 4
color: "#0000ff"
```
The example above will result in the following colors of the graph: if value is
* between `0` (including this value) and `1.33333`, the color is `#ff0000`,
* between `1.33333` (including this value) and `2.666667`, the color is `#ffff00`,
* between `2.666667` (including this value) and `4`, the color is `#00ff00`,
* equal to or more than `4`, the color is `#0000ff`.

As a shorthand, you can just use a color string for the stops that you want interpolated:

Expand Down

0 comments on commit 0d26f7c

Please sign in to comment.