Chart Tooltips

Thread is closed for posting
3 posts, 0 answers
  1. ASG
    ASG avatar
    9 posts
    Member since:
    Jul 2012

    Posted 27 Feb 2011 Link to this post

    I'd like to add a tooltip while making the chart series item and then concatenate onto that tooltip the percent of the pie chart it is ("#%").  Is this possible?

    So my tooltip is created as so:
    csi.ActiveRegion.Tooltip = datarow["table_name"].ToString();

    I would like to add on to the above the percent of the pie chart the item utilizes.  I imagine this would have to happen after all the items have been added (so that it can calculate the percent), but I don't see any method for adding to a tooltip at that point...

    Thanks for your time
  2. ASG
    ASG avatar
    9 posts
    Member since:
    Jul 2012

    Posted 27 Feb 2011 Link to this post

    Ahh... So if you give your series item a name, you can then set ActiveRegionToolTip to #ITEM, #% and get the item's name with the percent it takes up in the pie chart.  As so:
    ChartSeries tableRowsSeries = new ChartSeries();
    tableRowsSeries.Name = "Table Rows";
    tableRowsSeries.Type = ChartSeriesType.Pie;
    tableRowsSeries.Appearance.LabelAppearance.Visible = false;
    tableRowsSeries.ActiveRegionToolTip = "#ITEM : #%";
    foreach (DataRow dr in dt.Rows)
      dataRows = Convert.ToInt32(dr["Rows"]);
      ChartSeriesItem csi = new ChartSeriesItem();
      csi.YValue = dataRows;
      csi.Name = dr["Table Name"].ToString();
  3. Evgenia
    Evgenia avatar
    1437 posts

    Posted 02 Mar 2011 Link to this post


    We are glad that the issue you were facing is now resolved. Let us know if anything else arises.
    All the best,
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top