Pre loader

Using RolloverModifier with series containing NaN's as Y Values


Hi There,

As per the title I’ve got a RolloverModifier on my chart in order to utilise the snap-to-point facilities of that control. However, there is undesired behaviour when the dataseries contains points that have a Not-a-Number as a Y value as the line will still snap to the X position but the tooltip vanishes when it can’t deal with the Y value.

Could someone tell me how to either:
A/ Make the modifier jump to the next X position that isn’t a NaN


B/ Force the ToolTip to display some default text when the Y value cannot be evaluated

(or both if people are keen – I like to have options 🙂 )

All ideas are welcome

  • You must to post comments
Best Answer

Hi Stuart,

Unfortunately, it isn’t possible with the current implementation of RolloverModifier (neither option). With a little overriding, it is possible to hide the line at all where Y values are NaNs. You need to override the TryUpdateOverlays method and check whether the hit-test was successful inside. Then set DrawVerticalLine to “False” if it wasn’t and to “True” otherwise.

Another option could be implementation of a custom Rollover. There is the article on this topic in our Knowledgebase:—part-1—creating-a-custom-rollover-modifier

Please let us know if you need further assistance with this,

  • Stuart McCullough
    Hi Yuriy Thanks for that, custom route it is by the looks of it. /Stuart
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies