新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)ECharts教程:顯示和隱藏ECharts提示框
action.tooltip | *
提示框組件相關(guān)的行為,必須引入提示框組件后才能使用。

action.tooltip.showTip | Action
顯示提示框。
有下面兩種使用方式。
1 指定在相對容器的位置處顯示提示框,如果指定的位置無法顯示則無效。
dispatchAction({
type: 'showTip',
// 屏幕上的 x 坐標
x: number,
// 屏幕上的 y 坐標
y: number,
// 本次顯示 tooltip 的位置。只在本次 action 中生效。
// 缺省則使用 option 中定義的 tooltip 位置。
position: Array.|string|Function
})
2 指定數(shù)據(jù)圖形,根據(jù) tooltip 的配置項顯示提示框。
dispatchAction({
type: 'showTip',
// 系列的 index,在 tooltip 的 trigger 為 axis 的時候可選。
seriesIndex?: number,
// 數(shù)據(jù)的 index,如果不指定也可以通過 name 屬性根據(jù)名稱指定數(shù)據(jù)
dataIndex?: number,
// 可選,數(shù)據(jù)名稱,在有 dataIndex 的時候忽略
name?: string,
// 本次顯示 tooltip 的位置。只在本次 action 中生效。
// 缺省則使用 option 中定義的 tooltip 位置。
position: Array.|string|Function,
})
參數(shù)position同tooltip.position相同。
action.tooltip.hideTip | Action
隱藏提示框。
dispatchAction({
type: 'hideTip'
}) 本文題目:創(chuàng)新互聯(lián)ECharts教程:顯示和隱藏ECharts提示框
瀏覽路徑:http://m.5511xx.com/article/coccdsj.html


咨詢
建站咨詢
