Skip to Content

Show "No Data" for data label in vizframe stacked bar chart

Hello Experts,

I would like to show "No Data" as text if the value is 0 for a dataLabel in a stacked bar chart using vizframe. The data coming from backend is such that the graph is formed with values ranging from 0 to 1.

For example, in the above graph, instead of displaying 0% I want to display "No Data". I have taken the above example from this link -

I have used Chart Formatter to do this. But its not working.


plotArea: {
dataLabel: {
visible: true,



function(value) {
var percentage = sap.ui.core.format.NumberFormat.getFloatInstance({
style: 'Standard',
maxFractionDigits: 2
if (value == 0){
return "NO DATA";
return percentage.format(value) + " %";

Appreciate all your help.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Feb 20 at 10:04 AM

    Hi Filip Perisic Could you please help me over here? I'm having a similar problem as you had.

    Thanks a lot in advance.

    - Prerana

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 26 at 03:01 AM

    You could try define a call back function in plotArea.dataLabel.renderer. Please check this sample,output

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Chapman,

      Thanks a lot for the reply and apologize for the late reply. I tried your solution but it didn't help. I am able to see the text "No Data" during run time but after the app has finished rendering it disappears. Our customer has escalated this requirement at the moment. If I find another solution, I'll surely share it here. Thanks again!