cancel
Showing results for 
Search instead for 
Did you mean: 

How to format datalabel in SAP UI5 Pie Chart

vinay_kumar313
Explorer


Hi Experts,


I want to format the data label in viz pie chart. My purpose is to avoid legend names on pie chart and only want to show percentages. Is it possible? can anyone help me on this.


For example : I want to show only 27.27%, instead of 0-30 Days (27.27%).

Thanks Vinay

Accepted Solutions (0)

Answers (3)

Answers (3)

catano
Participant
0 Kudos

Hi,

Use vizProperties:

{
    plotArea: {
        dataLabel: {
            type: 'percentage'
        }
    }
}

See Chart Property Reference - Pie Chart

plotArea.dataLabel.type:

  • Supported Value Type: String
  • Supported Values: color, value, percentage, colorAndPercentage
  • Readonly: false
  • Serializable: true
  • Default value: "colorAndPercentage"
  • Description: Sets data label text source.
Former Member
0 Kudos

hi

hope this may help you.

this link u can see different charts

Chart Demo

former_member182470
Active Contributor
0 Kudos

Hi Vinay,

There must be a setting to disable legends on your Pie chart global settings. You may explore all settings.

Regards,

Suman

0 Kudos

Hi Vinay,

Hope this may help you,

oVizFrameL.setVizProperties({

           

                plotArea: {

                             dataLabel: {

                                 visible: true,

                                type:"percentage",

                                 hideWhenOverlap:false

                             }

                         },

         });

Thanks,

Chandran