[英]Error occur in Visual Studio Environment
I am trying to create charts using jchartfx. 我正在尝试使用jchartfx创建图表。 I can trying with the example provided.my problem is when I run the HTML directly from the folder.
我可以尝试提供的示例。我的问题是当我直接从文件夹运行HTML时。 its working and rendering the properly.But when I add that page into visual studio and try to run the app.I am getting the runtime Js Error.
它正常工作并正确呈现。但是当我将该页面添加到Visual Studio中并尝试运行该应用程序时,出现运行时Js错误。
here is my HTML Code 这是我的HTML代码
<!DOCTYPE html>
<html>
<head>
<link href="jchartfx.css" rel="stylesheet" />
<script src="jchartfx.system.js"></script>
<script src="jchartfx.coreBasic.js"></script>
</head>
<body onload="loadChart()">
<div id="ChartDiv" style="width: 600px; height: 400px"></div>
<script type="text/javascript" lang="javascript">
var chart1;
function loadChart() {
chart1 = new cfx.Chart();
chart1.getData().setSeries(2);
chart1.getAxisY().setMin(500);
chart1.getAxisY().setMax(2000);
var series1 = chart1.getSeries().getItem(0);
var series2 = chart1.getSeries().getItem(1);
series1.setGallery(cfx.Gallery.Lines);
series2.setGallery(cfx.Gallery.Bar);
var data = [
{ "Month": "Jan", "Bikes": 1800, "Parts": 1300 },
{ "Month": "Feb", "Bikes": 1760, "Parts": 900 },
{ "Month": "Mar", "Bikes": 1740, "Parts": 970 },
{ "Month": "Apr", "Bikes": 1750, "Parts": 1010 },
{ "Month": "May", "Bikes": 1810, "Parts": 1070 },
{ "Month": "Jun", "Bikes": 1920, "Parts": 1180 }
];
chart1.setDataSource(data);
var divHolder = document.getElementById('ChartDiv');
chart1.create(divHolder);
}
</script>
</body>
</html>
Here is my tutorial link . 这是我的教程链接 。
Error : Unable to get value of the property 'call': object is null or undefined
错误:无法获取属性“ call”的值:对象为null或未定义
Any suggestion on why am getting this? 关于为什么要得到这个的任何建议?
Update: 更新:
I have added <meta content="IE=9" http-equiv="X-UA-Compatible" />
in the head section it is working fine.but it gives the same error when I try to run the view in MVC application. 我在头部添加了
<meta content="IE=9" http-equiv="X-UA-Compatible" />
,但它工作正常。但是当我尝试在MVC应用程序中运行视图时,它给出了相同的错误。
Is any meta tag will fix this? 有任何meta标签可以解决此问题吗?
尝试添加<meta http-equiv="X-UA-Compatible" content="IE=8" />
标记。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.