>#### 圓角
~~~
const value1 = [12, 85, 39, 133, 0]
const value2 = [3, 75, 187, 66, 5]
const value3 = [12, 85, 39, 133, 0]
option = {
title: {
text: '圓角',
textStyle: {
color: '#ffffff'
},
top: 5,
left: 'center',
},
toolbox: {
feature: {
saveAsImage: {}
}
},
backgroundColor: "#0f375f",
color: ['#C1C049', '#3EB177', '#0666E8'],
tooltip: {
trigger: 'axis',
backgroundColor: 'rgba(20,50,125,.8)',
axisPointer: {
type: 'shadow', // 可選為:'line' | 'shadow'
},
},
grid: {
left: '10%',
right: '10%',
bottom: '10%',
top: '15%',
containLabel: true,
},
legend: {
left: 'center',
top: 35,
icon: 'rect',
textStyle: {
color: '#81b0d6',
},
itemWidth: 10,
itemHeight: 10,
itemGap: 30, //左右間隔
},
xAxis: {
type: 'category',
data: ['<=100', '100-300', '300-500', '500-1000', '>=1000'],
axisLine: {
show: true,
lineStyle: {
color: '#071a4f',
width: 1,
type: 'solid',
},
},
axisTick: {
show: false,
},
axisLabel: {
show: true,
textStyle: {
color: '#81b0d6',
},
},
},
yAxis: {
type: 'value',
axisLine: {
show: false,
},
axisTick: {
show: false,
},
axisLabel: {
show: true,
textStyle: {
color: '#81b0d6',
},
},
axisPointer: {
snap: true,
},
splitLine: {
show: true,
lineStyle: {
color: '#071a4f',
type: 'dash',
},
},
},
series: [{
name: '低收入',
type: 'bar',
barWidth: '12%',
itemStyle: {
normal: {
barBorderRadius: 30, //圓角度
},
},
data: value1,
},
{
name: '中等收入',
type: 'bar',
barWidth: '12%',
itemStyle: {
normal: {
barBorderRadius: 30,
},
},
data: value2,
},
{
name: '高收入',
type: 'bar',
barWidth: '12%',
itemStyle: {
normal: {
barBorderRadius: 30,
},
},
data: value3,
},
],
};
~~~
>#### 效果圖

<hr>
- html
- 頭部標簽
- canvas
- md
- DOM
- git常用命令
- css
- 網站
- 默認
- 前綴
- 文本
- 圖片
- 選擇器
- 滾動條
- 強制橫屏
- 響應式
- 動畫
- animation(動畫)
- transition(過渡)
- transform(變形)
- translate(移動)
- 漸變
- 鼠標
- 自定義 Web 字體
- 可視化
- echarts
- 折線圖
- 區域顏色標識
- 分段顯示不同顏色
- 柱狀圖
- 子彈圖
- 分組、柱體寬度、指示器寬度
- 圓角
- 頂部顯示文字
- 雙軸柱狀折線圖
- 雙軸雙列柱狀圖
- 單個柱狀圖
- 多縱向坐標
- 走勢圖
- 橫向百分比
- 最大值和最小值
- 餅圖
- 嵌套
- 分組顯示
- 餅圖結合柱狀圖
- 折線結合餅圖
- 關系圖
- 樹圖
- 地圖
- 標點
- 選中
- 常用
- 圖片超出可拖拽
- 百度導航
- 短信驗證碼倒計時
- video
- TS
- 未整理
- 消失的邊界線問題
- 跟隨
- js
- 兼容
- 數組去重
- 解析 URL 參數為對象
- 圖片懶加載
- 正則
- Photoshop
- 快捷鍵
- 混合模式
- vscode
- vue
- 指令