mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 13:09:22 -06:00
Barchart: Fix tooltip for normal/percentage stacking(2) (#69956)
This commit is contained in:
parent
feb2b5878b
commit
9e198ba745
@ -493,13 +493,15 @@ export function getConfig(opts: BarsOptions, theme: GrafanaTheme2) {
|
|||||||
let heightReduce = 0;
|
let heightReduce = 0;
|
||||||
let widthReduce = 0;
|
let widthReduce = 0;
|
||||||
|
|
||||||
const rect = hRect && findRect(qt, hRect.sidx - 1, hRect.didx);
|
|
||||||
// get height of bar rect at same index of the series below the hovered one
|
// get height of bar rect at same index of the series below the hovered one
|
||||||
if (isStacked && isHovered && hRect!.sidx > 1 && rect) {
|
if (isStacked && isHovered) {
|
||||||
if (isXHorizontal) {
|
const rect = hRect && hRect.sidx > 1 && findRect(qt, hRect.sidx - 1, hRect.didx);
|
||||||
heightReduce = rect.h;
|
if (rect) {
|
||||||
} else {
|
if (isXHorizontal) {
|
||||||
widthReduce = rect.w;
|
heightReduce = rect.h;
|
||||||
|
} else {
|
||||||
|
widthReduce = rect.w;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user