Skip to content

Commit

Permalink
FEATURE: Add support for tooltip sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
danzika committed May 10, 2023
1 parent 77f4cb4 commit a20678c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions grafana_dashboards/components/panels.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def gen_json_from_data(self, data, context):
panel_json['tooltip'] = {
'value_type': self.data['tooltip'].get('value_type', 'individual'),
'shared': self.data['tooltip'].get('shared', False),
'sort': self.data['tooltip'].get('sort', 0),
}
if 'seriesOverrides' in self.data:
overrides = []
Expand Down
3 changes: 2 additions & 1 deletion tests/grafana_dashboards/components/graph/full.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
},
"tooltip": {
"value_type": "cumulative",
"shared": true
"shared": true,
"sort": 0
},
"seriesOverrides": [
{
Expand Down

0 comments on commit a20678c

Please sign in to comment.