Skip to content

Commit

Permalink
Add color support in Stat(panel) (#602)
Browse files Browse the repository at this point in the history
* add color in Stat(Panel)

* add color in Stat(Panel)
  • Loading branch information
joewangprc authored Jul 12, 2023
1 parent 407a34c commit 9660005
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions grafanalib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2711,6 +2711,7 @@ class Stat(Panel):
"""

alignment = attr.ib(default='auto')
color = attr.ib(default=None)
colorMode = attr.ib(default='value')
decimals = attr.ib(default=None)
format = attr.ib(default='none')
Expand All @@ -2729,6 +2730,7 @@ def to_json_data(self):
{
'fieldConfig': {
'defaults': {
'color': self.color,
'custom': {},
'decimals': self.decimals,
'mappings': self.mappings,
Expand Down

0 comments on commit 9660005

Please sign in to comment.