日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
創(chuàng)新互聯(lián)ECharts教程:設(shè)置ECharts坐標(biāo)軸指示器的文本標(biāo)簽

axisPointer.label   |   Object

坐標(biāo)軸指示器的文本標(biāo)簽。

成都創(chuàng)新互聯(lián)公司專注于博樂企業(yè)網(wǎng)站建設(shè),成都響應(yīng)式網(wǎng)站建設(shè)公司,商城網(wǎng)站制作。博樂網(wǎng)站建設(shè)公司,為博樂等地區(qū)提供建站服務(wù)。全流程按需網(wǎng)站設(shè)計(jì),專業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,成都創(chuàng)新互聯(lián)公司專業(yè)和態(tài)度為您提供的服務(wù)

axisPointer.label.show   |   boolean

[ default: false ]

是否顯示坐標(biāo)軸指示器的文本標(biāo)簽。如果 tooltip.axisPointer.type 設(shè)置為 'cross' 則默認(rèn)顯示標(biāo)簽,否則默認(rèn)不顯示。

axisPointer.label.precision   |   number, string

[ default: 'auto' ]

坐標(biāo)軸指示器文本標(biāo)簽中數(shù)值的小數(shù)點(diǎn)精度。默認(rèn)根據(jù)當(dāng)前軸的值自動(dòng)判斷。也可以指定如 2 表示保留兩位小數(shù)。

axisPointer.label.formatter   |   string, Function

[ default: null ]

坐標(biāo)軸指示器文本標(biāo)簽文字的格式化器。

如果為 string,可以是例如:formatter: 'some text {value} some text,其中 {value} 會(huì)被自動(dòng)替換為軸的值。

如果為 function,可以是例如:

參數(shù):

{Object} params: 含有:

{Object} params.value: 軸當(dāng)前值,如果 axis.type 為 'category' 時(shí),其值為 axis.data 里的數(shù)值。如果 axis.type 為 'time',其值為時(shí)間戳。

{Array.} params.seriesData: 一個(gè)數(shù)組,是當(dāng)前 axisPointer 最近的點(diǎn)的信息,每項(xiàng)內(nèi)容為

{
    componentType: 'series',
    // 系列類型
    seriesType: string,
    // 系列在傳入的 option.series 中的 index
    seriesIndex: number,
    // 系列名稱
    seriesName: string,
    // 數(shù)據(jù)名,類目名
    name: string,
    // 數(shù)據(jù)在傳入的 data 數(shù)組中的 index
    dataIndex: number,
    // 傳入的原始數(shù)據(jù)項(xiàng)
    data: Object,
    // 傳入的數(shù)據(jù)值
    value: number|Array,
    // 數(shù)據(jù)圖形的顏色
    color: string,

}

每項(xiàng)內(nèi)容還包括軸的信息:

{
    axisDim: 'x', // 'x', 'y', 'angle', 'radius', 'single'
    axisId: 'xxx',
    axisName: 'xxx',
    axisIndex: 3,
    axisValue: 121, // 當(dāng)前 axisPointer 對(duì)應(yīng)的 value。
    axisValueLabel: '文本'
}

返回值:

顯示的 string。

例如:

formatter: function (params) {
    // 假設(shè)此軸的 type 為 'time'。
    return 'some text' + echarts.format.formatTime(params.value);
}

axisPointer.label.margin   |   boolean

[ default: 3 ]

坐標(biāo)軸指示器 label 距離軸的距離。

axisPointer.label.textStyle   |   boolean

設(shè)置坐標(biāo)軸指示器文本標(biāo)簽的文字樣式。

axisPointer.label.padding   |   string, Array

[ default: [5, 7, 5, 7] ]

設(shè)置 axisPointer 的內(nèi)邊距,單位px,默認(rèn)各方向內(nèi)邊距為5,接受數(shù)組分別設(shè)定上右下左邊距。

使用示例:

// 設(shè)置內(nèi)邊距為 5
padding: 5
// 設(shè)置上下的內(nèi)邊距為 5,左右的內(nèi)邊距為 10
padding: [5, 10]
// 分別設(shè)置四個(gè)方向的內(nèi)邊距
padding: [
    5,  // 上
    10, // 右
    5,  // 下
    10, // 左
]

axisPointer.label.backgroundColor   |   string

[ default: 'auto' ]

坐標(biāo)軸指示器文本標(biāo)簽的背景顏色,默認(rèn)是和 axis.axisLine.lineStyle.color 相同。

axisPointer.label.borderColor   |   string

[ default: null ]

坐標(biāo)軸指示器文本標(biāo)簽的邊框顏色。

axisPointer.label.borderWidth   |   string

[ default: 0 ]

坐標(biāo)軸指示器文本標(biāo)簽的邊框?qū)挾取?/p>

axisPointer.label.shadowBlur   |   number

[ default: 3 ]

坐標(biāo)軸指示器文本標(biāo)簽圖形陰影的模糊大小。該屬性配合 shadowColor,shadowOffsetX, shadowOffsetY 一起設(shè)置圖形的陰影效果。

示例:

{
    shadowColor: 'rgba(0, 0, 0, 0.5)',
    shadowBlur: 10
}

axisPointer.label.shadowColor   |   Color

[ default: #aaa ]

坐標(biāo)軸指示器文本標(biāo)簽陰影的顏色。支持的格式同color。

axisPointer.label.shadowOffsetX   |   number

[ default: 0 ]

坐標(biāo)軸指示器文本標(biāo)簽陰影在水平方向上的偏移距離。

axisPointer.label.shadowOffsetY   |   number

[ default: 0 ]

坐標(biāo)軸指示器文本標(biāo)簽陰影在垂直方向上的偏移距離。


本文標(biāo)題:創(chuàng)新互聯(lián)ECharts教程:設(shè)置ECharts坐標(biāo)軸指示器的文本標(biāo)簽
URL地址:http://www.dlmjj.cn/article/djspiee.html