怎么样将从数据库里查询到的数据显示在fusioncharts 饼图上
varcolxml="<chartcaption=''xAxisName=''yAxisName=''showValues='1'decimals='0'formatNu...
var colxml="<chart caption='' xAxisName='' yAxisName='' showValues='1' decimals='0' formatNumberScale='0'>";
var str="";
var sql="select create_unit,count(*) a from lt_plan_more_dd where app_begin_time>=to_date('"+text1.value+"','yyyy-mm-dd hh24-mi-ss') and app_begin_time<=to_date('"+text2.value+"','yyyy-mm-dd hh24-mi-ss') group by create_unit";
var xml=new PieChartXmlDataProvider().getXmlData(sql,"dataURL");
cloxml=colxml+sql+"</chart>";
var Chart1=new FusionCharts("../../fceformext/flash/pie3D.sqf","myChartId1","460","327",0,0);
Chart1.setDataXML(colxml);
Chart1.render("div1");
能在此基础上修改吗?还是必须用xml文件或xml字符串? 展开
var str="";
var sql="select create_unit,count(*) a from lt_plan_more_dd where app_begin_time>=to_date('"+text1.value+"','yyyy-mm-dd hh24-mi-ss') and app_begin_time<=to_date('"+text2.value+"','yyyy-mm-dd hh24-mi-ss') group by create_unit";
var xml=new PieChartXmlDataProvider().getXmlData(sql,"dataURL");
cloxml=colxml+sql+"</chart>";
var Chart1=new FusionCharts("../../fceformext/flash/pie3D.sqf","myChartId1","460","327",0,0);
Chart1.setDataXML(colxml);
Chart1.render("div1");
能在此基础上修改吗?还是必须用xml文件或xml字符串? 展开
1个回答
展开全部
开什么玩笑啊,你的Chart1.setDataXML(colxml); 这里的colxml=“<chart caption='' xAxisName='' yAxisName='' showValues='1' decimals='0' formatNumberScale='0'>select create_unit,count(*) a from lt_plan_more_dd where app_begin_time>=to_date('"+text1.value+"','yyyy-mm-dd hh24-mi-ss') and app_begin_time<=to_date('"+text2.value+"','yyyy-mm-dd hh24-mi-ss') group by create_unit </chart>”这是什么东西啊,一.sql不会被执行,二,这个xml=“<graph caption='' xAxisName='' yAxisName='' showValues='1' decimals='0' formatNumberScale='0'>
<set name='"+?+"' value='"+?+"' hoverText='"+?+"' /> // 查询出数据循环拼这个
</graph>” 这这个是正式版的吗;
<set name='"+?+"' value='"+?+"' hoverText='"+?+"' /> // 查询出数据循环拼这个
</graph>” 这这个是正式版的吗;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询