您的位置:首页 > Web前端 > AngularJS

FusionWidgets之AngularGauge图

2014-03-01 21:17 267 查看
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>


2、JSP页面

AngularGauge.jsp:

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/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="../Chart/JS/jquery-2.1.0.js"></script>
<script type="text/javascript" src="../Chart/JS/FusionCharts.js"></script>
<script type="text/javascript">
    $(function(){
    	var angularGauge = new FusionCharts( "../Chart/SWF/AngularGauge.swf", "angularGaugeId", "100%", "580", "0"     );
    	angularGauge.setXMLUrl("xml/AngularGauge.xml");
    	angularGauge.render("angularGaugeDiv");
    });
</script>
</head>
<body>
   <div id="angularGaugeDiv"></div>
</body>
</html>


3、设计结果

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: