Pre loader

CursorModifier tooltip is getting clipped

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

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}

Drift: ${metadata.drift.toFixed(2)}
Importance: ${metadata.importance.toFixed(2)}
Weighted Score: ${metadata.weightedScore.toFixed(2)}

`);
}
});
return tooltipContent;
},

Version
3.3.560
Images
  • You must to post comments
0
0

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.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.