
济宁小程序开发哪家好_jQuery插件FusionWidgets完成的
2021-01-12 12:45
本文实例讲述了jQuery插件FusionWidgets实现的AngularGauge图效果。分享给大家供大家参考,具体如下:
1、设置AngularGauge图的数据源
AngularGauge.xml:
xml version="1.0" encoding="UTF-8" chart lowerLimit="0" upperLimit="100" lowerLimitDisplay="差" upperLimitDisplay="好" numberSuffix="%" showValue="1" baseFontSize="16" showBorder="1" colorRange color minValue="0" maxValue="60" code="FF0000"/ color minValue="60" maxValue="70" code="00FF00"/ color minValue="70" maxValue="80" code="0000FF"/ color minValue="80" maxValue="90" code="FF654F"/ color minValue="90" maxValue="100" code="8BBA00"/ /colorRange dials dial value="60"/ /dials /chart<页面:
!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "TR/html4/loose.dtd" html head meta http-equiv="Content-Type" content="text/html; charset=UTF-8" title FusionWidgets AngularGauge图 /title script type="text/javascript" src="jquery-1.7.2.min.js" /script script type="text/javascript" src="FusionCharts/FusionCharts.js" /script script type="text/javascript" $(function(){ var angularGauge = new FusionCharts( "FusionCharts/AngularGauge.swf", "angularGaugeId", "100%", "580", "0" ); angularGauge.setXMLUrl("AngularGauge.xml"); angularGauge.render("angularGaugeDiv"); }); /script /head body div id="angularGaugeDiv" /div /body /html
3、运行效果图如下:
附:完整实例代码点击此处。
注:该源码需要放到服务器环境下运行!否则无法加载xml文件数据。
更多关于jQuery相关内容感兴趣的读者可查看本站专题:《》、《》、《》、《》、《》及《》
希望本文所述对大家jQuery程序设计有所帮助。
扫描二维码分享到微信