设置echarts的grid、tooltip、柱状图渐变色、折线图渐变色
生活随笔
收集整理的這篇文章主要介紹了
设置echarts的grid、tooltip、柱状图渐变色、折线图渐变色
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
grid: {show: false,left: '0px',top: '50px',right: '1px',bottom: '0px',containLabel: true,backgroundColor: 'white',//show: true的時候才顯示borderColor: '#ccc',borderWidth: 1,//更多屬性訪問http://echarts.baidu.com/option.html#grid
}
tooltip: {trigger: "axis",axisPointer: {type: "line",lineStyle: {color: "blue"//設置提示框線條顏色}},backgroundColor: "rgba(0,0,0,0.6)",borderWidth: 1,borderColor: "rgba(0,2,85,0.8)",padding: 10,textStyle: {color: "blue"//更多屬性訪問http://echarts.baidu.com/option.html#tooltip}
}
/*柱狀圖漸變色*/
series: [{itemStyle: {normal: {barBorderRadius: 10,color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{offset: 0,color: 'rgba(153,217,234,0)'}, {offset: 1,color: '#3fa7dc'}]),shadowColor: 'rgba(0, 0, 0, 0.4)',shadowBlur: 20,}}},//更多屬性訪問http://echarts.baidu.com/option.html#series
]
/*折線圖漸變色*/
series: [{areaStyle: {normal: {color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{offset: 0,color: 'rgba(255, 158, 68,1)'}, {offset: 1,color: 'rgba(255, 70, 131,0)'}])}}},//更多屬性訪問http://echarts.baidu.com/option.html#series
]
總結
以上是生活随笔為你收集整理的设置echarts的grid、tooltip、柱状图渐变色、折线图渐变色的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 覆盖半透明黑色CSS,通常用于弹窗提示、
- 下一篇: 【ES6新特性】一行代码解决:搜索对象数