FVANCOP / ChartNew.js

MIT License
420 stars 143 forks source link

Hi, I want to know how to remove the 100% #496

Closed mabdulul closed 7 years ago

mabdulul commented 7 years ago

Hi, I wanted to know how to remove the 100% from the end and just have the percent ?

screen shot 2017-01-27 at 3 03 00 pm

FVANCOP commented 7 years ago

Hi,

You just have to change the value of option annotateLabel.

Default value is : annotateLabel: "<%=(v1 == '' ? '' : v1) + (v1!='' && v2 !='' ? ' - ' : '')+(v2 == '' ? '' : v2)+(v1!='' || v2 !='' ? ':' : '') + v3 + ' (' + v6 + ' %)'%>"

if you want to have only the percentage : annotateLabel: "<%=v6+' %'>"

if you want to have only the real value : annotateLabel: "<%=v3+' %'>"

Regards, François

See sample: Samples/annotateVars.html

See documentation :

https://github.com/FVANCOP/ChartNew.js/wiki/100_020_Annotations#annotatelabel https://github.com/FVANCOP/ChartNew.js/wiki/110_Templates https://github.com/FVANCOP/ChartNew.js/wiki/120_Template_variables

mabdulul commented 7 years ago

Thank you