docs(dashboard): add docs for named and index colors (#30445)

This commit is contained in:
Ville Brofeldt 2024-10-01 10:50:41 -07:00 committed by GitHub
parent 9f476b2ce2
commit d1d9011f4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 3 deletions

View File

@ -174,13 +174,16 @@ You can take a look at this Flask-AppBuilder
## Is there a way to force the dashboard to use specific colors?
It is possible on a per-dashboard basis by providing a mapping of labels to colors in the JSON
Metadata attribute using the `label_colors` key.
Metadata attribute using the `label_colors` key. You can use either the full hex color, a named color,
like `red`, `coral` or `lightblue`, or the index in the current color palette (0 for first color, 1 for
second etc). Example:
```json
{
"label_colors": {
"Girls": "#FF69B4",
"Boys": "#ADD8E6"
"foo": "#FF69B4",
"bar": "lightblue",
"baz": 0
}
}
```