cancel
Showing results for 
Search instead for 
Did you mean: 

Showing percentages in pie chart

Former Member
0 Kudos

Hi,

Is it possible to show percentage values on pie chart in design studio? By default (without using tooltip), the pie chart should show values like below chart.

Please help me how to achieve this in design studio.

Thanks,

Satyam

Accepted Solutions (1)

Accepted Solutions (1)

IngoH
Active Contributor
0 Kudos

HI,

as far as I know that is not there yet, so you would have to calculate the percentages in the source

ingo

Former Member
0 Kudos

Hi Ingo,

Thank you. We will calculate the percentages in the backend.

But, can we show those values on the pie chart (as shown in the chart in my question)?

Chart should display the values without mouseover.

Please advise.

Thanks,

Satyam

murali_balreddy2
Active Participant
0 Kudos

You might have to use SDK.

AFAIK, tooltip is the only available option in 1.1

Answers (1)

Answers (1)

former_member131154
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I absolutely agree in the statement that it is not possible in standard properties. But...

It's getting crazy now.... And only usable for a fixed number of elements.

First we create the chart and for each element a text item. These text boxes are then filled with their corresponding values via script.

And now its getting weired, and i do not really have the final code gor that 😉 We have commands to define the x- and y-position for an object.

So I'm just thinking... Of calculating the position of each text box within the chart.

But writing my thoughts down I think it might be better to wait for the SDK.

Or is someone willing to join me in finding the right code?

Dirk

murali_balreddy2
Active Participant
0 Kudos

Hi Dirk,

I thought that route before gave up after some effort. Here are some reasons

a) enabling or disabling legends adjusts the actual chart position (the actual one within the component)

b) legends do not remain at the same position. Depending on the series name, it varies

c) legend status is not available within the script

d) all positions are dynamically created by BIAL and not available within the script

e) varying number of data series

f) series can be very small (0.01 to 2%) and hard to be mentioned by a textbox without overlapping on the next series

g) only the external dimensions of the chart components are available within the script.

Considering all the above points, I just decided to wait for SAP's solution similar to tooltip. It should not be hard for them to extend tooltip into a permanent percentage proportion display.

Glad you already started to do a custom charting. If I may be of any help, I am glad to do that.

Good luck.

rama_shankar3
Active Contributor
0 Kudos

Murali,

Thanks for sharing your insights on using % within chart in DS 1.1.

Regards,

Rama Shankar

murali_balreddy2
Active Participant
0 Kudos

Moreover we need array functions to collect in the data series and MATH (cosine and sine) functions to plot the text boxes at the correct x and y coordinates.

murali_balreddy2
Active Participant
0 Kudos

Hi Dirk,

Here is a prototype with finite data series.

As I said, Array and Trigonometric functions will definitely help.

Positioning the values on the pie chart is tricky.

Thanks,

Murali

Former Member
0 Kudos

Hi Murali,

Thank you. Could you please share the Array and Trigonometric functions used for the above graph?

we are not really sure how to implement this.

Thanks,

Satyam

rama_shankar3
Active Contributor
0 Kudos

Cool Murali ! Thanks for trying out this scenario. MAN YOU ROCK!!!

It woudl be great if you can write another step-by-step blog showing the details of your POC.

Thanks,

Rama

murali_balreddy2
Active Participant
0 Kudos

Hi Rama and Satyam,

Here is the how to document http://scn.sap.com/docs/DOC-44712

Thanks,

Murali

rama_shankar3
Active Contributor
0 Kudos

Murali,

Thanks: already read it - it rocks man....thx.

Rama

Former Member
0 Kudos

Thank you Murali. It helped us.

Satyam