Labels on column chart with different values other than datapoints
Service Studio Version
11.10.11 (Build 39018)

I have a stacked column chart with values as 100,200,300 but on columns i need to display the percentage as 16.6%,33.33%,50% as labels on columns.Can you please help me how i will be able to do this.


Hello Rajya,

you can reach to this by passing the following JSON string to the AdvancedFormat->HighChartsJSON parameter

"{
  'plotOptions': {
    'series': {
      'stacking': 'normal',
      'dataLabels': {
        'enabled': true,
        'formatter': function () {
                            return (100.0 * this.y / this.total).toFixed(1)+'%';
                        }
      },
      'animation': false
    }
  }
}"

as you can see in the following screenshots:

and the results should be like the following


please tell me if this helped you.


Champion

I am not sure if posting answer on the post 2 months ago would help. It will Just come in latest and disturb others to look into this. 

Hi Sherif,

Your reply might be too late for original poster, but I have just learned something from it.

Thanks for answering,

Dorine


Helping others even it's late is much better than being unhelpful at all.

Thank you.

Hello @Sherif Diab  I agree with you, is better later that never. I think some people ask things on the forums and forget them, because they dont reply do good answers as ours.

Champion

Yeah, could be. I was only thinking will it actually help the questioner who asked 2 months ago! Will they still be stuck on same situation!!! 

Well, I agree that contribution should always welcomed indeed. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.