[v9.4.x] Fix scenario where tooltip shows wrong value (#64199)
Fix scenario where tooltip shows wrong value (#64025)
* Fix scenario where tooltip shows wrong value
* refactor
(cherry picked from commit 211a999a2a)
Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
This commit is contained in:
co-authored by
Victor Marin
parent
c48ca77815
commit
c5583207ee
@@ -13,6 +13,7 @@ import {
|
||||
VizOrientation,
|
||||
} from '@grafana/data';
|
||||
import { PanelDataErrorView } from '@grafana/runtime';
|
||||
import { SortOrder } from '@grafana/schema';
|
||||
import {
|
||||
GraphGradientMode,
|
||||
GraphNG,
|
||||
@@ -172,6 +173,8 @@ export const BarChartPanel: React.FunctionComponent<Props> = ({
|
||||
const tooltipMode =
|
||||
options.fullHighlight && options.stacking !== StackingMode.None ? TooltipDisplayMode.Multi : options.tooltip.mode;
|
||||
|
||||
const tooltipSort = options.tooltip.mode === TooltipDisplayMode.Multi ? options.tooltip.sort : SortOrder.None;
|
||||
|
||||
return (
|
||||
<>
|
||||
{shouldDisplayCloseButton && (
|
||||
@@ -197,7 +200,7 @@ export const BarChartPanel: React.FunctionComponent<Props> = ({
|
||||
data={info.aligned}
|
||||
rowIndex={datapointIdx}
|
||||
columnIndex={seriesIdx}
|
||||
sortOrder={options.tooltip.sort}
|
||||
sortOrder={tooltipSort}
|
||||
mode={tooltipMode}
|
||||
/>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user