Bar chart based on ets with backend integration and vertical table scrolling (Original Work)

Add-ons
2026-07-26 04:38 5 次浏览 • 0 次下载 2.9KB
Bar chart based on ets with backend integration and vertical table scrolling (Original Work)

Last Updated: 2020-02-29 23:31:48

Usage

This is my own API key (ak). You can replace it with yours.

1

These two echarts themes are optional.

1
2
3
<!-- Import theme -->
<script src="js/chalk.js"></script>
<script src="js/purple-passion.js"></script>

This is the bar chart's automatic tooltip display. I set the interval to 3 seconds.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
var app = {
currentIndex: -1,
};
setInterval(function() {
var dataLen = option.series[0].data.length;
// Cancel highlighting of the previously highlighted graphic
myChart.dispatchAction({
type: 'downplay',
seriesIndex: 0,
dataIndex: app.currentIndex
});
app.currentIndex = (app.currentIndex + 1) % dataLen;
//console.log(app.currentIndex);
// Highlight the current graphic
myChart.dispatchAction({
type: 'highlight',
seriesIndex: 0,
dataIndex: app.currentIndex,
});
// Display tooltip
myChart.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: app.currentIndex
});
}, 3000);
// Table scrolling method
// Parameter 1: tableID; Parameter 2: div height; Parameter 3: speed; Parameter 4: minimum number of tr elements in tbody before scrolling
tableScroll('tableId', 200, 60, 5)
星河码客

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

关于本站

联系我们

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

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

Powered by Nuxt · Deployed on Cloudflare