Percentage to Round

Hi folks,

i am using flot pie chart and the chart is showing the values in tool tip in percentage (ex 57.6%)
but i want it to be full number without percentage (ex 57)

but i am little confused on how to translate the below code. please kindly help

tooltipOpts: {
            content: \"%p.0%, %s\",
  • Edited : sorry the value is correctly showing in full number for my project. coz that original flot example only having decimal places. , but i want to get rid of that percentage sign. but i am confused since there are 3 % signs above.

try this

tooltipOpts: {
        content: \"%p.0, %s\",

(remove % after the zero)

1 Like

Worked charm !!!
Thank you megazoid :smile:

if you dont mind kindly tell me what that %s does there?

it’s hard to guess when you haven’t saw the result, but maybe in some cases %s is replaced with some string

no problem. thank you.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.