mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
fix: Drill to detail blocked by tooltip (#22082)
Co-authored-by: Ville Brofeldt <ville.brofeldt@apple.com>
This commit is contained in:
committed by
GitHub
parent
1809d2b957
commit
3bc0865d90
@@ -44,6 +44,8 @@ import {
|
||||
FONT_SIZE_MULTIPLIERS,
|
||||
} from './constants';
|
||||
import { OpacityEnum } from '../constants';
|
||||
import { getDefaultPosition } from '../utils/tooltip';
|
||||
import { Refs } from '../types';
|
||||
|
||||
const setIntervalBoundsAndColors = (
|
||||
intervals: string,
|
||||
@@ -118,6 +120,7 @@ export default function transformProps(
|
||||
emitFilter,
|
||||
sliceId,
|
||||
}: EchartsGaugeFormData = { ...DEFAULT_GAUGE_FORM_DATA, ...formData };
|
||||
const refs: Refs = {};
|
||||
const data = (queriesData[0]?.data || []) as DataRecord[];
|
||||
const numberFormatter = getNumberFormatter(numberFormat);
|
||||
const colorFn = CategoricalColorNamespace.getScale(colorScheme as string);
|
||||
@@ -258,6 +261,7 @@ export default function transformProps(
|
||||
color: gaugeSeriesOptions.detail?.color,
|
||||
};
|
||||
const tooltip = {
|
||||
position: getDefaultPosition(refs),
|
||||
formatter: (params: CallbackDataParams) => {
|
||||
const { name, value } = params;
|
||||
return `${name} : ${formatValue(value as number)}`;
|
||||
@@ -300,6 +304,7 @@ export default function transformProps(
|
||||
axisTick,
|
||||
pointer,
|
||||
detail,
|
||||
// @ts-ignore
|
||||
tooltip,
|
||||
radius:
|
||||
Math.min(width, height) / 2 - axisLabelDistance - axisTickDistance,
|
||||
@@ -327,5 +332,6 @@ export default function transformProps(
|
||||
groupby,
|
||||
selectedValues: filterState.selectedValues || [],
|
||||
onContextMenu,
|
||||
refs,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user