Baidu Ets Dynamic Data Addition

Add-ons
2026-07-26 03:55 5 次浏览 • 0 次下载 135.1KB
Baidu Ets Dynamic Data Addition

Note: This plugin must run in a server environment. Previewing it locally will cause cross-origin issues!

Usage

1. Include the required jQuery and echarts JavaScript files.

1
2
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/echarts.js"></script>

Note: The following are the main JavaScript files. If you do not want to include too many JavaScript files, you can also place the code directly in your own HTML page.

1
<script src="js/echartsOne.js"></script>

2. Add two buttons and one div in the HTML. The div is used to contain the charts.

1
2
3
4
5
<h3>
<button id="qxfl" data-index="1">First echarts</button>
<button id="gfzr" data-index="2">Second echarts</button>
</h3>
<div id="main" style="width: 600px;height:400px;"></div>

3. Call the methods in echartsOne.js on the page.

1
2
3
4
5
6
7
8
9
<script type="text/javascript">
$(function() {
// Initially display the first one
qxfl('#qxfl');
$("h3 button").click(function() {
qxfl(this);
})
});
</script>

*** The requested data is echartsOne.json

星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare