XYChart2: Fix tooltip mode (#87147)

This commit is contained in:
Adela Almasan 2024-04-30 12:19:37 -06:00 committed by GitHub
parent a54df47976
commit 4312f2accd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ export const XYChartPanel2 = (props: Props2) => {
let { builder, prepData } = useMemo(
() => prepConfig(series, config.theme2),
// eslint-disable-next-line react-hooks/exhaustive-deps
[mapping, mappedSeries, props.data.structureRev, props.fieldConfig]
[mapping, mappedSeries, props.data.structureRev, props.fieldConfig, props.options.tooltip]
);
// generate data struct for uPlot mode: 2

View File

@ -24,7 +24,7 @@ export interface Props {
}
function stripSeriesName(fieldName: string, seriesName: string) {
if (fieldName.includes(' ')) {
if (fieldName !== seriesName && fieldName.includes(' ')) {
fieldName = fieldName.replace(seriesName, '').trim();
}