Add tooltips to Polar Chart

2 posts, 1 answers
  1. Alberto
    Alberto avatar
    26 posts
    Member since:
    Nov 2012

    Posted 18 Sep 2013 Link to this post

    Hi,

    I am testing some controls including the polar chart, I load some data from a database into a DataTable like this:

    DataTable dtData = new DataTable();
    dtData.Columns.Add(new DataColumn("Name", typeof(string)));
    dtData.Columns.Add(new DataColumn("Value", typeof(double)));

    DataRow drCost;

    RadarLineSeries rs = new RadarLineSeries();

    foreach (DataRow dr in dtData.Rows)
    {
    CategoricalDataPoint dp = new CategoricalDataPoint();
    dp.Category = dr["Name"].ToString();
    dp.Value = double.Parse(dr["Value"].ToString());

    rs.DataPoints.Add(dp);
    }

    rs.Stroke = new SolidColorBrush(Color.FromRgb(37, 160, 219));

    RadarChartDemo.Series.Add(rs);

    And the result is something like the attached image.

    I would like to add tooltips to each point to see the values, does anyone knows how can I do this?

    Thanks,

    Alberto
  2. Answer
    Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 20 Sep 2013 Link to this post

    Hi Alberto,

    In order to add a tooltip, you will need to add a ChartTooltipBehavior to the RadPolarChart.Behaviors collection. Note that, if you are using Line, Spline (applicable only to RadCartesianChart) or Area series, you will need to have defined a PointTemplate which you can hover, in order to get a tooltip.  Here you can learn more about this. 

    If you want to learn how to bind your chart to a DataTable, you can check this article.
     
    Regards,
    Petar Kirov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top