diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 34c3ac04..bbdea066 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,9 +6,11 @@ Changelog x.x.x ? ======= +* Added ``tooltipSort`` parameter to PieChartv2 panel * Fix mappings for Table * Added support for AWS Cross-Account in CloudwatchMetricsTarget + 0.7.1 2024-01-12 ================ diff --git a/grafanalib/core.py b/grafanalib/core.py index a6a1ae9d..f46749f2 100644 --- a/grafanalib/core.py +++ b/grafanalib/core.py @@ -3834,6 +3834,8 @@ class PieChartv2(Panel): :param reduceOptionsValues: Calculate a single value per column or series or show each row :param tooltipMode: Tooltip mode single (Default), multi, none + :param tooltipSort: To sort the tooltips + none (Default), asc, desc :param unit: units """ @@ -3849,6 +3851,7 @@ class PieChartv2(Panel): reduceOptionsFields = attr.ib(default='', validator=instance_of(str)) reduceOptionsValues = attr.ib(default=False, validator=instance_of(bool)) tooltipMode = attr.ib(default='single', validator=instance_of(str)) + tooltipSort = attr.ib(default='none', validator=instance_of(str)) unit = attr.ib(default='', validator=instance_of(str)) def to_json_data(self): @@ -3873,7 +3876,8 @@ def to_json_data(self): }, 'pieType': self.pieType, 'tooltip': { - 'mode': self.tooltipMode + 'mode': self.tooltipMode, + 'sort': self.tooltipSort }, 'legend': { 'displayMode': self.legendDisplayMode,