RadCartesianChart -- serie-specific tooltips?

2 posts, 0 answers
  1. Anders
    Anders avatar
    80 posts
    Member since:
    Dec 2010

    Posted 25 Apr 2012 Link to this post

    Hi telerik,

    We are plotting ScatterlineSeries on a RadCartesianChart. Works well.

    However, as we plot several series in same chart, our users request a tooltip with the name of series to distinguish them.

    I've tried to set the TooltipTemplate of the chart in which case I can get the tooltip for *points* and thought I could use that as a workaround and place Curve Name on each point. However, when I try to bind to an 'enriched' Datapoint I get an error as the points in the serie are ScatterDataPoints (though I've tried to add my 'customized' points, see below).

    So I guess I'm missing the point here - or quite a few ;)

    First of all, what is the recommended way of providing a serie-specific text on each curve as a tooltip?

    And if my approach is not to far off, can you see what I do wrong?


    Anders, Denmark

    itemsSource.Add(new Rap1DDataPoint(valuesX[i], valuesY[i],curve.CurveName));

    public class Rap1DDataPoint : DataPoint
        public string CurveName { get; set; }
        public Rap1DDataPoint(double x, double y, string curveName):base(x,y)
            CurveName = curveName;

    var lineSeries = new ScatterLineSeries
                             ShowLabels = true,
                             ToolTip = legendHeader,
                             Stroke = serieColor,
                             StrokeThickness = 2,
                             //LegendLabel = legendHeader,
                             //SeriesDefinition = splineSeriesDefinition,
                             ItemsSource = itemsSource,
                             XValueBinding = new PropertyNameDataPointBinding("XValue"),
                             YValueBinding = new PropertyNameDataPointBinding("YValue"),
                             PointTemplate = pointTemplate                                   

  2. Giuseppe
    Giuseppe avatar
    2363 posts

    Posted 27 Apr 2012 Link to this post

    Hello Anders,

    We have attached a sample application that demonstrates how you can use the ChartSeries.DisplayName property and bind it in a custom tooltip template to achieve the desired functionality.

    Hope this helps.

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
Back to Top