ChartView Tooltip Text

8 posts, 1 answers
  1. Rafael
    Rafael avatar
    12 posts
    Member since:
    Jan 2011

    Posted 27 Nov 2015 Link to this post

    Hi,

     I need to change the tooltip TEXT showed in my RadChartView serie but I have no idea of how to do this.

     

    Could anyone help?

     

    Thank you.

  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1551 posts

    Posted 30 Nov 2015 Link to this post

    Hi Rafael,

    Thank you for writing.

    You can use the DataPointTooltipTextNeeded event to change the default text:
    public RadForm1()
    {
        InitializeComponent();
         
      
        var tooltipController = new ChartTooltipController();
        tooltipController.DataPointTooltipTextNeeded += tooltipController_DataPointTooltipTextNeeded;
        radChartView1.Controllers.Add(tooltipController);
    }
      
    void tooltipController_DataPointTooltipTextNeeded(object sender, DataPointTooltipTextNeededEventArgs e)
    {
        e.Text = "MyText";
    }

    Please let me know if there is something else I can help you with. 
     
    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Rafael
    Rafael avatar
    12 posts
    Member since:
    Jan 2011

    Posted 30 Nov 2015 in reply to Dimitar Link to this post

    That is it! ;)

     

    Thank you!

  4. William
    William avatar
    32 posts
    Member since:
    Sep 2016

    Posted 03 Feb in reply to Dimitar Link to this post

    This tooltip capability works with radChartView - does it work with radCartesianChart?
  5. Dimitar
    Admin
    Dimitar avatar
    1551 posts

    Posted 06 Feb Link to this post

    Hello William,

    Yes, it does. If you are using line series, you may need to set the size of the data point:
    LineSeries lineSeries2 = new LineSeries();
    lineSeries2.PointSize = new SizeF(20, 20);

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  6. William
    William avatar
    32 posts
    Member since:
    Sep 2016

    Posted 06 Feb in reply to Dimitar Link to this post

    Thank you - that worked. How do I change the content of the tooltip? I need to be able to format the date, as I have done with the Trackball object (using OnTrackInfoUpdated).
  7. William
    William avatar
    32 posts
    Member since:
    Sep 2016

    Posted 06 Feb in reply to Dimitar Link to this post

    Second question - I have been able to show the tooltip when I put entries into the XAML. How do I put the tooltip capability into the C# for columns that are added to the plot in the code?
  8. Dimitar
    Admin
    Dimitar avatar
    1551 posts

    Posted 07 Feb Link to this post

    Hello William,

    It appears that you are using the WPF chart, however, this forum is for the WinForms chart. This is why I want to kindly ask you to post your questions in the appropriate forum section: UI for WPF Forums - Telerik Community.

    Thank you for your understanding.
      
    Regards,
    Dimitar
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top