FusionCharts-2D圆盘

图片展示:

js:

var colors = ["ffac59","ffe65a","99cc33","50b9f0","45a5e6"];
   //酬金支付模块(主盘)
   function initRemunerations(){
      $.ajax({
     type: "POST",
     url: "<%=path%>/userInfoAction/findRemunerations.do",
        data: {"":""},
        dataType:"json",
        success: function(data){
          var a = data.rows;
          if(a!=null && a.length>0){
           var c = 0;
           var lis = "";
           var strXML = "<graph showPercentageValues='0' subCaption='' showNames='0' showValues='0' "+
                "baseFontSize='11' showhovercap='1' formatNumber='1'  numberPrefix='' "+
                "numberSuffix='¥' thousandSeparator=' ' decimalPrecision='2' formatNumberScale='0'>";
           titleNames = new Array(a.lentgth);
           for(var i=0;i<a.length;i++){
            titleNames[i] = a[i].NAME;
            strXML += "<set name='"+a[i].NAME+"' value='"+a[i].REWARD+"'"+
                 " color='"+colors[i]+"' />";
            lis +='<li>';
            lis +='<span style="background-color: #'+colors[i]+';"></span>';
            lis +=a[i].NAME;
            lis +='</li>';
           }
           strXML += "</graph>";
           var myChart = new FusionCharts("../../createFlash/Charts/FC_2_3_Pie2D.swf", "FusionCharts_1", "150", "160", "0", "0"); 
       myChart.addParam("wmode","Opaque");
       myChart.setDataXML(strXML);  
           myChart.render("remunerationsDiv");
           $("#showValuesUl").empty().html(lis);
          }else{
           $("#remunerationsDiv").html("<h1>&nbsp;&nbsp;暂无数据!</>");
          }
        },
        error:function(){
        }
    });       
   }

html:

<div id="m_right">
    <div class="midtab_font_g">
     <%=time%>账期佣金构成
    </div>
    <div class="m_leftcontent">
     <div style="display: block;height: 220px;" >
      <div id="remunerationsDiv" style="display: inline;margin-left: 40px; "></div>
      <div id="showValuesDiv" style="width:190px;height: 220px;display: inline; position: absolute;">
       <div style="margin-top: 100px;margin-left: 40px;">
        <ul id="showValuesUl">
        </ul>
       </div>
      </div>
     </div>
    </div>
   </div>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值