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

RadHtmlChart Stacked Barchart shows labels when the value is zero

3 Answers 227 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Ryan Johnson
Top achievements
Rank 1
Ryan Johnson asked on 04 Jul 2012, 06:23 PM
When creating a stacked bar chart with the labels on each colored section, the label should not be displayed if the value is zero.

I have attached an example of how Excel would create this chart and the result that I get using RadHtmlChart. Is there at least a workaround that I could do to clear out the zero labels?

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 06 Jul 2012, 08:37 AM
Hi Ryan,

How is your RadHtmlChart configured? I tried setting 0 for some values in a stacked chart and things seem to be working properly with me as you can see in the attached screen capture and the page that produces it. It uses this online demo as base. Can you compare it with your setup and try to find the difference that causes the issue on your end and to apply the configuration from my example to your case?


Kind regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Goh
Top achievements
Rank 1
answered on 03 Nov 2014, 05:01 AM
I've encountered the same issue using the attached sample. (See my screenshot).
This happens in both Firefox and Chrome.
I am using the Telerik 2014 Q3.
0
Danail Vasilev
Telerik team
answered on 04 Nov 2014, 09:09 AM
Hello Goh,

You can use the following template for labels in order to display values that are different than zero and undefined:
ASPX:
<LabelsAppearance>
    <ClientTemplate>
#if(value != undefined && value != 0){# #=kendo.format(\'{0:N2}\',value)# #}#
    </ClientTemplate>
</LabelsAppearance>

You may also find useful the following resources:

Regards,
Danail Vasilev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Chart (HTML5)
Asked by
Ryan Johnson
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Goh
Top achievements
Rank 1
Danail Vasilev
Telerik team
Share this question
or