>#### 圓角
~~~
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,
},
],
};
~~~
>#### 效果图
![](https://img.kancloud.cn/3c/5e/3c5e683828ace403c3503aff01012849_800x450.png)
<hr>
- html
- 头部标签
- canvas
- md
- DOM
- git常用命令
- css
- 网站
- 默认
- 前缀
- 文本
- 图片
- 选择器
- 滚动条
- 强制横屏
- 响应式
- 动画
- animation(动画)
- transition(过渡)
- transform(变形)
- translate(移动)
- 渐变
- 鼠标
- 自定义 Web 字体
- 可视化
- echarts
- 折线图
- 区域颜色标识
- 分段显示不同颜色
- 柱状图
- 子弹图
- 分组、柱体宽度、指示器宽度
- 圓角
- 顶部显示文字
- 双轴柱状折线图
- 双轴双列柱状图
- 单个柱状图
- 多纵向坐标
- 走势图
- 横向百分比
- 最大值和最小值
- 饼图
- 嵌套
- 分组显示
- 饼图结合柱状图
- 折线结合饼图
- 关系图
- 树图
- 地图
- 标点
- 选中
- 常用
- 图片超出可拖拽
- 百度导航
- 短信验证码倒计时
- video
- TS
- 未整理
- 消失的边界线问题
- 跟随
- js
- 兼容
- 数组去重
- 解析 URL 参数为对象
- 图片懒加载
- 正则
- Photoshop
- 快捷键
- 混合模式
- vscode
- vue
- 指令