GraphNG: Fixes Tooltip mode 'All' for XYChart (#30921) (#31260)

This commit is contained in:
Alec Posney
2021-03-05 15:59:48 +11:00
committed by GitHub
parent 991c5d16ba
commit 56ce068a91

View File

@@ -82,8 +82,8 @@ export const TooltipPlugin: React.FC<TooltipPluginProps> = ({ mode = 'single', t
for (let i = 0; i < otherProps.data.length; i++) {
series = series.concat(
otherProps.data[i].fields.reduce<SeriesTableRowProps[]>((agg, f, j) => {
// skipping time field and non-numeric fields
if (f.type === FieldType.time || f.type !== FieldType.number) {
// skipping xField, time fields, and non-numeric fields
if (f === xField || f.type === FieldType.time || f.type !== FieldType.number) {
return agg;
}