新聞中心
calendar.itemStyle | Object
設(shè)置 ECharts 日歷格的樣式。

創(chuàng)新互聯(lián)是一家集網(wǎng)站建設(shè),阿城企業(yè)網(wǎng)站建設(shè),阿城品牌網(wǎng)站建設(shè),網(wǎng)站定制,阿城網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營銷,網(wǎng)絡(luò)優(yōu)化,阿城網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力。可充分滿足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶成長自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。
calendar.itemStyle.normal | Object
通過 normal 狀態(tài)設(shè)置日歷格樣式。
calendar.itemStyle.normal.color | Color
[ default: #fff ]
設(shè)置日歷格圖形的顏色。
顏色可以使用 RGB 表示,比如 'rgb(128, 128, 128)',如果想要加上 alpha 通道表示不透明度,可以使用 RGBA,比如 'rgba(128, 128, 128, 0.5)',也可以使用十六進(jìn)制格式,比如 '#ccc'。除了純色之外顏色也支持漸變色和紋理填充。
// 線性漸變,前四個(gè)參數(shù)分別是 x0, y0, x2, y2, 范圍從 0 - 1,相當(dāng)于在圖形包圍盒中的百分比,如果 globalCoord 為 `true`,則該四個(gè)值是絕對(duì)的像素位置
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0, color: 'red' // 0% 處的顏色
}, {
offset: 1, color: 'blue' // 100% 處的顏色
}],
globalCoord: false // 缺省為 false
}
// 徑向漸變,前三個(gè)參數(shù)分別是圓心 x, y 和半徑,取值同線性漸變
color: {
type: 'radial',
x: 0.5,
y: 0.5,
r: 0.5,
colorStops: [{
offset: 0, color: 'red' // 0% 處的顏色
}, {
offset: 1, color: 'blue' // 100% 處的顏色
}],
globalCoord: false // 缺省為 false
}
// 紋理填充
color: {
image: imageDom, // 支持為 HTMLImageElement, HTMLCanvasElement,不支持路徑字符串
repeat: 'repeat' // 是否平鋪, 可以是 'repeat-x', 'repeat-y', 'no-repeat'
}calendar.itemStyle.normal.borderColor | Color
[ default: '#ccc' ]
設(shè)置日歷格圖形的描邊顏色。支持的顏色格式同 color,不支持回調(diào)函數(shù)。
calendar.itemStyle.normal.borderWidth | number
[ default: 1 ]
設(shè)置日歷格的描邊線寬。為 0 時(shí)無描邊。
calendar.itemStyle.normal.borderType | string
[ default: 'solid' ]
設(shè)置日歷格中柱條的描邊類型,默認(rèn)為實(shí)線,支持 'solid', 'dashed', 'dotted'。
calendar.itemStyle.normal.shadowBlur | number
設(shè)置日歷格圖形陰影的模糊大小。
該屬性配合 shadowColor,shadowOffsetX, shadowOffsetY 一起設(shè)置圖形的陰影效果。
示例:
{
shadowColor: 'rgba(0, 0, 0, 0.5)',
shadowBlur: 10
}calendar.itemStyle.normal.shadowColor | Color
設(shè)置日歷格陰影顏色。支持的格式同 color。
calendar.itemStyle.normal.shadowOffsetX | number
[ default: 0 ]
設(shè)置日歷格陰影在水平方向上的偏移距離。
calendar.itemStyle.normal.shadowOffsetY | number
[ default: 0 ]
設(shè)置日歷格陰影在垂直方向上的偏移距離。
calendar.itemStyle.normal.opacity | number
設(shè)置日歷格圖形透明度。支持從 0 到 1 的數(shù)字,為 0 時(shí)不繪制該圖形。
例如:
calendar: [{
itemStyle: {
normal: {
color: '#fff',
borderWidth: 1,
borderColor: '#ccc'
}
}
}] 網(wǎng)站名稱:創(chuàng)新互聯(lián)ECharts教程:ECharts日歷格的樣式怎么設(shè)置
網(wǎng)頁路徑:http://www.5511xx.com/article/coeoeei.html


咨詢
建站咨詢
