在使用chart绘制图表时可以在chorme和FireFox中 正常的显示 但是在IE9中却无法显示 只是显示出一个图表的标题
这个是在chorme中显示的效果
以下是在FireFox中显示的效果
以下是在IE9中显示的效果 (只显示出图表的标题 以及X轴的标题)
一下是源代码
Ext.onReady(function(){ var dataStore = new Ext.data.JsonStore({ fields:['name','percentAge','xxoo'], data:[ {name:'A',percentAge:3,xxoo:9}, {name:'B',percentAge:3,xxoo:6}, {name:'C',percentAge:2,xxoo:4}, {name:'D',percentAge:2,xxoo:3} ] }); Ext.create('Ext.panel.Panel',{ title:'XXOO图', height:'600', width:'600', renderTo:Ext.getBody(), layout:'fit', animate:true, shadow: true, items:[{ xtype:'chart', store:dataStore, legend:{ position:'right' }, axes:[{ type:'Numeric', fields:['percentAge','xxoo'], title:'百分比', position:'left', minimum:0, maximum:10 }, { type:'Category', position:'bottom', fields:['name'], title:'XXOO' }], series:[{ type:'line', xField:'name', yField:'percentAge' },{ type:'line', xField:'name', yField:'xxoo' }] }] }) })
jsp页面
写道
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript" src="ext-4.0.7/resources/css/ext-all.css"></script>
<script type="text/javascript" src="ext-4.0.7/ext-all.js"></script>
<script type="text/javascript" src="ext-4.0.7/bootstrap.js"></script>
<script type="text/javascript" src="chart.js" charset="utf-8"></script>
</head>
<body>
</body>
</html>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript" src="ext-4.0.7/resources/css/ext-all.css"></script>
<script type="text/javascript" src="ext-4.0.7/ext-all.js"></script>
<script type="text/javascript" src="ext-4.0.7/bootstrap.js"></script>
<script type="text/javascript" src="chart.js" charset="utf-8"></script>
</head>
<body>
</body>
</html>