基于ets柱状图后台和表格上下滚动(原创)

插件特效
2026-07-26 04:38 4 次浏览 • 0 次下载 2.9KB
基于ets柱状图后台和表格上下滚动(原创)

更新时间:2020-02-29 23:31:48

使用方法

这个的ak是我自己的 你们可以换成你们的

1

这两个echarts主题可用可不用

1
2
3
<!-- 引入主题 -->
<script src="js/chalk.js"></script>
<script src="js/purple-passion.js"></script>

这里是柱状图自动显示tooltip的 我设置的3秒

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;
// 取消之前高亮的图形
myChart.dispatchAction({
type: 'downplay',
seriesIndex: 0,
dataIndex: app.currentIndex
});
app.currentIndex = (app.currentIndex + 1) % dataLen;
//console.log(app.currentIndex);
// 高亮当前图形
myChart.dispatchAction({
type: 'highlight',
seriesIndex: 0,
dataIndex: app.currentIndex,
});
// 显示 tooltip
myChart.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: app.currentIndex
});
}, 3000);
//table滚动方法
// 参数1 tableID,参数2 div高度,参数3 速度,参数4 tbody中tr几条以上滚动
tableScroll('tableId', 200, 60, 5)