Hiding Chart Figures and Disabling Tooltips

2 posts, 0 answers
  1. David
    David avatar
    10 posts
    Member since:
    Jun 2012

    Posted 25 Apr 2016 Link to this post

    I have a RadHtmlChart on my page using the Bootstrap theme, as shown in the attached screenshot. I currently have the figures for the columns displaying, i.e. 1 and 2 in the columns Jan and Feb. Is it possible to high the figures when a 0 is returned, rather than displaying them on the x axis. But obviously keeping the values if they are greater than 0.

    Also you will notice in the screenshot that when I hover over a bar, there is a tooltip displaying the data value. Is it also possible to disable these tooltips?

  2. Stamo Gochev
    Stamo Gochev avatar
    189 posts

    Posted 28 Apr 2016 Link to this post

    Hello David,

    Straight to your questions:
    1. Hiding a series item when its value is equal to zero is not a built-in functionality - after all, there are situations when you actually want to display the item. What I can suggest here is to iterate through your data source and check if a specific value is equal to zero and if so - simply do not create a series item.

      If you are binding the chart (and not adding its items programmatically), you will need to manually filter the data source beforehand and bind the chart to the new one.
    2. You can hide the tooltips using the Visible property:
      <telerik:RadHtmlChart runat="server" ID="Chart">
                      <TooltipsAppearance Visible="false"></TooltipsAppearance>

    Stamo Gochev
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top