SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

0
0

I’ve enabled the Rollover on my chart, and I am trying to make a custom AxisLabelTemplate, which is easy to do if you are just looking to add some text/format around the AxisFormattedDataValue.

However, what i really want to do is to use the AxisInfo.DataValue to look up a specific string related to each of the Avis values, and set this as my label text;

ie, if my axis DataValues are “1, 2, 3, 4, 5″I want the rollover text to read “1 – Dog”, “2 – Cat”, “3 – Fish”, “4 – Mouse”, “5 – Aardvark”

Is this possible?

Thanks

Version
5.1.0
  • You must to post comments
0
0

OK another interesting problem 🙂

RolloverModifier obeys the CursorTextFormatting property of the Axis. You can customize the text exactly using the LabelProvider feature, and overriding the following method

public class NumericLabelProvider : LabelProviderBase  
{
    public override string FormatCursorLabel(IComparable dataValue)
    {
         // TODO: Your label overriding
    }
}

This will affect all cursors you use on the chart, but if you have just RolloverModifier then sounds like it will do the trick!

Let me know if this helps,

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.