Pre loader

How to avoid Tooltips from being cut off

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

1
0

The chart is only showing 3 of 4 Tooltips, is there a way to avoid this?

Version
3.2.446
Images
  • You must to post comments
0
0

Hi Jhonatan,

I’m assuming this is a small chart, and the number of tooltips from RolloverModifier are getting clipped at the chart top and bottom.

Note: RolloverModifier cannot draw outside its chart bounds.

Perhaps what you need is a single combined tooltip. Or to reformat the tooltip container

Instead of having this for each tooltip item:

%Series_Name%
%Value%

You could have this

%Series_Name, %Value$

To find out how to template the Rollover Tooltip contents, see this documentation page

Customizing the Tooltip Content
The Tooltip Content can be customised in the RolloverModifier. There are two levels of this. You can customise just the content for the tooltip, or you can supply your own svg to customise the appearance as well.

To customise the content, create a tooltipDataTemplate. This is a function which takes a seriesInfo (which is the results of the hit-test) and returns an array of strings which are the lines that will appear in the tooltip.

e.g. some code like this:

const tooltipDataTemplate: TRolloverTooltipDataTemplate = (seriesInfo: XySeriesInfo): string[] => {
    const valuesWithLabels: string[] = [];
    valuesWithLabels.push(`${seriesInfo.seriesName}: ${seriesInfo.formattedYValue}`);
    return valuesWithLabels;
};
renderableSeries.rolloverModifierProps.tooltipDataTemplate = tooltipDataTemplate;

will return all the information for a tooltip on a single line of text.

If you require further support on this, I suggest opening a support ticket and uploading code to reproduce the problem. Our team can discuss and come back with a solution.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.