This is a migrated thread and some comments may be shown as answers.

Hiding Chart Figures and Disabling Tooltips

1 Answer 235 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 2
David asked on 25 Apr 2016, 10:25 AM

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?

1 Answer, 1 is accepted

Sort by
0
Stamo Gochev
Telerik team
answered on 28 Apr 2016, 05:15 AM
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">
        <PlotArea>
            <Series>
                <telerik:ColumnSeries>
                    <TooltipsAppearance Visible="false"></TooltipsAppearance>
                </telerik:ColumnSeries>
            </Series>
        </PlotArea>
    </telerik:RadHtmlChart>

Regards,
Stamo Gochev
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Chart (HTML5)
Asked by
David
Top achievements
Rank 2
Answers by
Stamo Gochev
Telerik team
Share this question
or