FusionCharts 中文

前台:
View Code
  < script language = " Javascript "  src = " ../FusionCharts/FusionCharts.js " >< / script>
     < script language = " Javascript "  src = " ../Scripts/jquery.js " >< / script>
     < script type = " text/javascript " >

        $.ajax({
            url: 
" farm.aspx " ,
            data: { 
' nocache ' : Math.random() },
            timeout: 
50000 ,
            success: 
function (text) {
                
var  myChart1  =   new  FusionCharts( " ../FusionCharts/Column3D.swf " " myChartId " " 600 " " 350 " );

                myChart1.setDataXML(text);
                myChart1.render(
" chartDiv " );
            }
        });
    
< / script>
View Code
  protected   void  Page_Load( object  sender, EventArgs e)
        {
            Response.Clear();
            
string  ds  =  File.ReadAllText(Server.MapPath( " ./data.xml " ), Encoding.GetEncoding( " gb2312 " ));
           

            Response.Write(ds);
            Response.End();

        }
data.xml
 < chart  caption ='Monthly Unit Sales'   xAxisName ='Month'  yAxisName ='飞'  showValues ='0'
    formatNumberScale
='0'  showBorder ='1' >
    
< set  label ='公告'  value ='462'  link ="n-http://www.baidu.com"   />
    
< set  label ='Feb'  value ='857'   />
    
< set  label ='Mar'  value ='671'   />
    
< set  label ='Apr'  value ='494'   />
    
</ chart >
 

你可能感兴趣的:(FusionCharts)