FusionCharts 中怎么做一个饼图 然后在饼图的某一个区域实现单击事件,查看详细数据
1个回答
展开全部
fusioncharts Pie3D.swf(Pie2D.swf)基于xml(或者自己拼装字符串)
xml:
<?xml version="1.0" encoding="GBK"?>
<chart ShowAboutMenuItem='0' caption='销售图表' xAxisName='月份' yAxisName='销售金额' numberPrefix='%A5'
exportEnabled='1' exportShowMenuItem='1' exportAtClient='1' exportHandler='fcExporter1'
baseFont='宋体' baseFontSize='14' bgColor='FFFFFF' shadowAlpha='100'
exportFormats='JPEG=导出为JPG图片|PNG=导出为PNG图片|PDF=导出为PDF文件'
canvasBgColor='FFFFFF' >
<set name='一月' value='462' />
<set name='二月' value='857' />
<set name='三月' value='671' />
<set name='四月' value='494' />
<set name='五月' value='761' />
<set name='六月' value='960' isSliced = '1'/>
<set name='七月' value='629' link='javascript:showFusinValue("650")'/>
<set name='八月' value='622' link='javascript:showFusinValue(622)'/>
<set name='九月' value='376' />
<set name='十月' value='494' />
<set name='十一月' value='761'/>
<set name='十二月' value='960' />
</chart>
js:
function showFusinValue(v){
alert("值 "+v);
}
xml:
<?xml version="1.0" encoding="GBK"?>
<chart ShowAboutMenuItem='0' caption='销售图表' xAxisName='月份' yAxisName='销售金额' numberPrefix='%A5'
exportEnabled='1' exportShowMenuItem='1' exportAtClient='1' exportHandler='fcExporter1'
baseFont='宋体' baseFontSize='14' bgColor='FFFFFF' shadowAlpha='100'
exportFormats='JPEG=导出为JPG图片|PNG=导出为PNG图片|PDF=导出为PDF文件'
canvasBgColor='FFFFFF' >
<set name='一月' value='462' />
<set name='二月' value='857' />
<set name='三月' value='671' />
<set name='四月' value='494' />
<set name='五月' value='761' />
<set name='六月' value='960' isSliced = '1'/>
<set name='七月' value='629' link='javascript:showFusinValue("650")'/>
<set name='八月' value='622' link='javascript:showFusinValue(622)'/>
<set name='九月' value='376' />
<set name='十月' value='494' />
<set name='十一月' value='761'/>
<set name='十二月' value='960' />
</chart>
js:
function showFusinValue(v){
alert("值 "+v);
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询