使用方法
这个的ak是我自己的你们可以换成你们的
1
<scripttype="text/javascript"src="
https://api.map.baidu.com/api?v=2.0&ak=0xdI6Lq0agqBHUtthykRldY7gMTM378p"></script>
这两个echarts主题可用可不用
1
2
3
<!--引入主题-->
<scriptsrc="js/chalk.js"></script>
<scriptsrc="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
varapp={
currentIndex:-1,
};
setInterval(function(){
vardataLen=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滚动方法
//参数1tableID,参数2div高度,参数3速度,参数4tbody中tr几条以上滚动
tableScroll('tableId',200,60,5)
如果您觉得本文的内容对您的学习有所帮助:
关键字:
div