`
xiaosheng12345
  • 浏览: 12810 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

Fusionchart 柱状折线数据是百分比数据时

阅读更多

今天遇到一个问题,有几个页面的图表,数据传递过来的是百分比的,比如 9.60%  25.05%.

解决办法是js中xml形式组装数据时,将百分号substring(0,colData.length-1);

然后<chart numberSuffix="%" decimals="2" >......,<set数据...此处略> </chart>

第一个参数是让数字之后有百分号.

第二个参数是官网上查的.

  if you had data as 0.12352, 0.134 and 0.13, and you set decimals as 3, FusionCharts XT will output 0.124, 0.134 and 0.13

 

if you want your numbers on the chart to have trailing zeroes too, you can set <chart ... forceDecimals='1' > and now the numbers will show as 0.124, 0.134 and 0.130 respectively. 

 

 

 

  • 大小: 47 KB
  • 大小: 50.4 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics