新聞中心
radiusAxis.axisPointer.label | Object
設(shè)置徑向軸指示器的文本標簽。

創(chuàng)新互聯(lián)是專業(yè)的嘉蔭網(wǎng)站建設(shè)公司,嘉蔭接單;提供成都網(wǎng)站建設(shè)、成都做網(wǎng)站,網(wǎng)頁設(shè)計,網(wǎng)站設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務;采用PHP框架,可快速的進行嘉蔭網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團隊,希望更多企業(yè)前來合作!
radiusAxis.axisPointer.label.show | boolean
[ default: false ]
是否顯示徑向軸指示器的文本標簽。如果 tooltip.axisPointer.type 設(shè)置為 'cross' 則默認顯示標簽,否則默認不顯示。
radiusAxis.axisPointer.label.precision | number, string
[ default: 'auto' ]
徑向軸指示器文本標簽中數(shù)值的小數(shù)點精度。默認根據(jù)當前軸的值自動判斷。也可以指定如 2 表示保留兩位小數(shù)。
radiusAxis.axisPointer.label.formatter | string, Function
[ default: null ]
徑向軸指示器文本標簽文字的格式化器。
- 如果為 string,可以是例如:formatter: 'some text {value} some text,其中 {value} 會被自動替換為軸的值。
- 如果為 function,可以是例如:
參數(shù):
{Object} params: 含有:
{Object} params.value: 軸當前值,如果 axis.type 為 'category' 時,其值為 axis.data 里的數(shù)值。如果 axis.type 為 'time',其值為時間戳。
{Array.
{
componentType: 'series',
// 系列類型
seriesType: string,
// 系列在傳入的 option.series 中的 index
seriesIndex: number,
// 系列名稱
seriesName: string,
// 數(shù)據(jù)名,類目名
name: string,
// 數(shù)據(jù)在傳入的 data 數(shù)組中的 index
dataIndex: number,
// 傳入的原始數(shù)據(jù)項
data: Object,
// 傳入的數(shù)據(jù)值
value: number|Array,
// 數(shù)據(jù)圖形的顏色
color: string,
}每項內(nèi)容還包括軸的信息:
{
axisDim: 'x', // 'x', 'y', 'angle', 'radius', 'single'
axisId: 'xxx',
axisName: 'xxx',
axisIndex: 3,
axisValue: 121, // 當前 axisPointer 對應的 value。
axisValueLabel: '文本'
}返回值:
顯示的 string。
例如:
formatter: function (params) {
// 假設(shè)此軸的 type 為 'time'。
return 'some text' + echarts.format.formatTime(params.value);
}radiusAxis.axisPointer.label.margin | boolean
[ default: 3 ]
label 距離軸的距離。
radiusAxis.axisPointer.label.padding | string, Array
[ default: [5, 7, 5, 7] ]
徑向軸指示器的內(nèi)邊距,單位為 px,默認各方向內(nèi)邊距為5px,接受數(shù)組分別設(shè)定上右下左邊距。
使用示例:
// 設(shè)置內(nèi)邊距為 5
padding: 5
// 設(shè)置上下的內(nèi)邊距為 5,左右的內(nèi)邊距為 10
padding: [5, 10]
// 分別設(shè)置四個方向的內(nèi)邊距
padding: [
5, // 上
10, // 右
5, // 下
10, // 左
]radiusAxis.axisPointer.label.backgroundColor | string
[ default: 'auto' ]
徑向軸指示器文本標簽的背景顏色,默認是和 axis.axisLine.lineStyle.color 相同。
radiusAxis.axisPointer.label.borderColor | string
[ default: null ]
徑向軸指示器文本標簽的邊框顏色。
radiusAxis.axisPointer.label.borderWidth | string
[ default: 0 ]
徑向軸指示器文本標簽的邊框?qū)挾取?/p>
radiusAxis.axisPointer.label.shadowBlur | number
[ default: 3 ]
徑向軸指示器圖形陰影的模糊大小。該屬性配合 shadowColor,shadowOffsetX, shadowOffsetY 一起設(shè)置圖形的陰影效果。
示例:
{
shadowColor: 'rgba(0, 0, 0, 0.5)',
shadowBlur: 10
}radiusAxis.axisPointer.label.shadowColor | Color
[ default: #aaa ]
徑向軸指示器陰影的顏色。支持的格式同color。
radiusAxis.axisPointer.label.shadowOffsetX | number
[ default: 0 ]
徑向軸指示器陰影在水平方向上的偏移距離。
radiusAxis.axisPointer.label.shadowOffsetY | number
[ default: 0 ]
徑向軸指示器陰影在垂直方向上的偏移距離。
網(wǎng)頁標題:創(chuàng)新互聯(lián)ECharts教程:設(shè)置徑向軸指示器的label標簽
分享地址:http://fisionsoft.com.cn/article/dpipgph.html


咨詢
建站咨詢
