七星落幕
2018-12-12 05:16【echarts示例】jQuery引入json文件后,网页显示不了数据?
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title> scatter3D</title>
<script src="echarts.js"></script>
<script src="http://echarts.baidu.com/dist/echarts-gl.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
</head>
<body>
<div id="main" style="width:600px;height:500px;"></div>
<script >
var myChart = echarts.init(document.getElementById('main'));
$.get('expectancy-table.json', function (data) {
myChart.setOption({
grid3D: {},
xAxis3D: {},
yAxis3D: {},
zAxis3D: {},
dataset: {
source: data
},
series: [
{
type: 'scatter3D',
symbolSize: 2.5
}
]
})
});
myChart.setOption(Option);
</script>
</body>
</html>
小白刚学习echarts,在用$.get方法引入json文件后,运行时网页无法显示数据(空白的),想请教大家这是什么原因?(在VS2012上编写的)
以下是网页的错误提示:
- 点赞
- 回答
- 收藏
- 复制链接分享
3条回答
为你推荐
- Golang:json Unmarshal无法解压缩简单示例
- it技术
- 互联网问答
- IT行业问题
- 计算机技术
- 编程语言问答
- 2个回答
- 使用PHP的jQuery Ajax POST示例
- ajax
- post
- php
- jquery
- javascript
- 13个回答
- 如何在docblock评论中显示代码示例?
- comments
- php
- 1个回答
- web前端动态图表无法刷新数据,请教问题在哪?
- html5
- javascript
- jquery
- vue.js
- 2个回答
- SpringSide2的HelloWorld示例不能显示
- spring
- 0个回答
换一换