echars自定义提示框位置

tooltip: {
    trigger: 'item',
    formatter: "{a} <br/>{b}: {c} ({d}%)",
    position:function(p){ //其中p为当前鼠标的位置
        return [p[0] + 10, p[1] - 10];
    },
    extraCssText:'width:160px;height:40px;background:red;'

}

 

posted @ 2018-07-13 09:50  杨不凡  阅读(118)  评论(0编辑  收藏  举报