How to show percentage in dashboard designer in column chart

Dear All,

Greetings, I’m using Dashboard designer, I Would like to show the percentage in the management dashboard. For example, the value of completed is 50 out of 100. so the result should say 50/100*100 = 50% in my graphical view in the each column bar. Please let me know if anything needs and thanks in advance. It will be helpful if you tell in detailed step.

Best Regards
Ram

Hello,

Place the following code into the template section of the tooltip or label section (whichever you use to display the value) in Dashboard->Style:

#= kendo.format("{0:p2}", value / 100) #
Where value is the name of the field where the value is contained and 100 can either stay 100, or be replaced with the name of the field where the total is contained (depends on what you want to do).

Hi,

Thanks for your reply… I tried to use the same code to get the percentage of field… but unfortunately I’m getting the error message.

I have used to replace the “value” in the code as “ID” like below:

#= kendo.format("{0:p2}", ID / 100) #

but am getting error as “Undefined ID”.

I have tried to modify in some other formats as well, but it didn’t help me out. can you please let me know what exactly should I use to get percentage… Thanks in advance.

Best Regards
Ram

Sorry, I’m actually wrong! Please use the following template:

#= kendo.format("{0:p2}", dataItem.ID / 100) #

Note that ID must be available as a field selection in Dashboard -> Chart for this to work.

Hi,

It is exactly works fine… But one thing is that, the value which is mentioned here as 100 should get dynamically updated, It means the count of item. so that the exact percentage matches the scenario

#= kendo.format("{0:p2}", dataItem.ID / 100) #

Please let me know any other alternatives which i can use it.

And also where can i study the coding standard for this plumsail chart, any documentation plz it will be helpful for us.

Best Regards
Ram

Documentation you can find here: http://www.spchart.com/demo. You can read Documentation or check out various demo charts together with their configurations.

This will work if you’re using the “aggregate over category” option. If that’s not what you want, please describe your use case in more detail.

  1. In Dashboard->Advanced add the following piece of code to the preRender function:

$.each(config.series, function(){ var series = this; $.each(series.data, function(){ this.count = series.data.length; }); });

Then your template will look like this:

#= kendo.format("{0:p2}", dataItem.ID / dataItem.count) #

Although, to be fair, I don’t quite understand why you want to divide the ID by the total count of items.