I want to display a tooltip on my scatter plot when the user hovers over a data point. However, the tooltip is getting clipped if the text is too long, even when there’s sufficient space within the chart (see attached image). Is there a way to ensure the tooltip can use the full width of the chart?
tooltipDataTemplate: (seriesInfo: SeriesInfo[]) => {
const tooltipContent: string[] = [];
seriesInfo.forEach(info => {
const metadata = info.pointMetadata as {
drift: number;
importance: number;
name: string;
weightedScore: number;
};
if (info?.isHit) {
const name = dialog ? metadata.name : metadata.name.length > 17 ? ${metadata.name.substring(0, 17)}...
: metadata.name;
tooltipContent.push(
name,
Drift: ${metadata.drift.toFixed(2)}
,
Importance: ${metadata.importance.toFixed(2)}
,
Weighted Score: ${metadata.weightedScore.toFixed(2)}
,
);
}
});
return tooltipContent;
},
I also tried to customize it using html and css, but no luck so far.
tooltipDataTemplate: (seriesInfo: SeriesInfo[]) => {
const tooltipContent: string[] = [];
seriesInfo.forEach(info => {
const metadata = info.pointMetadata as {
drift: number;
importance: number;
name: string;
weightedScore: number;
};
if (info?.isHit) {
tooltipContent.push(`
${metadata.name}
`);
}
});
return tooltipContent;
},
- Joseph Deng asked 2 months ago
- last edited 2 months ago
- You must login to post comments
Hello,
We are working on clipping improvements for annotations that will be available in the next major release – v4.
There may be a workaround you can apply now, but I imagine it would be too complicated.
Anyway, let us know if it is crtical for you and whether you want to try customizing the tooltip positioning logic, so then we can suggest some ideas.
- Jim Risen answered 1 month ago
- You must login to post comments
Please login first to submit.