Toggle navigation
tooltip 怎么嵌入 用bootstrap写的div容器,使提示框显示指定内容?
By
master1151
2017-06-30 05:49:38
脚本
16
21
作品使用的第三方脚本
数据管理
上传数据
支持小于 5M 任意格式(csv, xlsx, json, xml, ...)的数据文件
上传后可以通过生成的文件链接异步获取托管的数据。
历史数据
0 条
无历史数据
代码修改记录
信息提示
保存作品
对当前截图不满意?你还可以
上传本地截图
重新截图
作品名称
作品描述
标签
geo
grid
legend
markLine
markPoint
bar
effectScatter
line
lines
map
timeline
title
toolbox
tooltip
visualMap
作品默认版本
最新
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
20:11:45
图表已生成
整理代码
刷新
代码
option = { tooltip : { show : true, //默认显示 trigger : 'item', //触发类型,默认数据项触发 showContent : true, //是否显示提示框浮层 alwaysShowContent : true, //默认离开提示框区域隐藏,true为一直显示 triggerOn : 'click', //提示触发条件,mousemove鼠标移至触发,还有click点击触发 showDelay : 0, //浮层显示的延迟,单位为 ms,默认没有延迟,也不建议设置。在 triggerOn 为 'mousemove' 时有效。 hideDelay : 200, //浮层隐藏的延迟,单位为 ms,在 alwaysShowContent 为 true 的时候无效。 enterable : true, //鼠标是否可进入提示框浮层中,默认为false,如需详情内交互,如添加链接,按钮,可设置为 true。 position : 'right', //提示框浮层的位置,默认不设置时位置会跟随鼠标的位置。只在 trigger 为'item'的时候有效。 confine : false,//是否将 tooltip 框限制在图表的区域内。外层的 dom 被设置为 'overflow: hidden',或者移动端窄屏,导致 tooltip 超出外界被截断时,此配置比较有用。 transitionDuration : 0.4, //提示框浮层的移动动画过渡时间,单位是 s,设置为 0 的时候会紧跟着鼠标移动。 position: function (point, params, dom, rect, size) { $(dom).html('
Order Details
Edit
Order #:
12313232
Email confirmation was sent
Order Status:
Activity
Grand Total:
$175.25
Web design
55%
development
80%
查看详情
'); // $('div[id=toptip]').show(); }, // formatter: function (params, ticket, callback) { // }, backgroundColor : 'rgba(50,50,50,0.7)', //提示框浮层的背景颜色。 borderColor : '#333', //提示框浮层的边框颜色。 borderWidth : 0, //提示框浮层的边框宽。 padding : [ 0, // 上 0, // 右 0, // 下 0, // 左 ], textStyle : { color:'#ffffff' }, extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' }, };