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


In addition to vaquita50’s post just now on RolloverModifier, I also want to output the x value (once for all series) in the rollover summary (but I don’t want to hijack that thread).

I also want to apply custom number formatting for each series. So series 0 number format might be “{N:3}”, series 1 might be “{0}g”, etc. Is such an example available or easy enough to produce?

Also, how do I force the box to exist, even when not over a valid x value? In the example, the box almost disappears to an empty (but still there!) border… ???


  • You must to post comments

Hi Andy,

The RolloverModifier samples demonstrate that the RolloverModifier is simply a data-source, which gives you an ObservableCollection<SeriesInfo> to bind to.

There is a long explanation in the answer RolloverLabelTemplate show X and Y Value Separated which shows how to get the X Value in the Rollover legend output, and how to apply a custom string format to the X or Y Value.

Hope this helps,

  • You must to post comments

Hi Andrew,

Already seen the examples, browsed through the definitions, not managed to make it work, hence here! I saw the XValue, but my output-x-value solution is all rather hacky. Not to worry – it works at least.

And in case anyone else needs to know, after much hacking around I came up with this to display something if there is no data…

                &lt;Style TargetType=&quot;{x:Type ItemsControl}&quot;&gt;
                        &lt;DataTrigger Binding=&quot;{Binding Path=RolloverData.SeriesInfo,Converter={StaticResource EmptyCollectionConverter}}&quot; Value=&quot;True&quot;&gt;
                            &lt;Setter Property=&quot;Template&quot;&gt;
                                    &lt;ControlTemplate TargetType=&quot;{x:Type ItemsControl}&quot;&gt;
                                        &lt;TextBlock Text=&quot;No data selected&quot; Margin=&quot;5,0&quot; HorizontalAlignment=&quot;Center&quot; /&gt;

public class EmptyCollectionConverter : IValueConverter
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        var collection = value as ICollection;

        if (collection == null)
            return null;

        return collection.Count == 0;

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        throw new NotImplementedException();

Hope it helps someone!

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.