admin管理员组文章数量:1287606
I saw this post on GitHub about rounded bar charts (.js/issues/422) and was wondering how to round the bottom of the chart I am using version 3.27.3. I want my charts to look like this: Sausage Chart And at the moment they look like this Bar Chart As you can see the bottom part is not rounded
These are my options:
chart: {
background: "transparent",
foreColor: "#333",
toolbar: {
show: false,
},
zoom: {
enabled: false,
},
},
legend: {
show: false,
},
grid: {
show: false,
},
xaxis: {
categories: [],
axisBorder: {
show: false,
},
axisTicks: {
show: false,
},
categories: [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
],
labels: {
show: false,
},
},
yaxis: {
labels: {
style: {
colors: ["#FFFFFF"],
fontSize: "12px",
fontFamily: "Helvetica, Arial, sans-serif",
fontWeight: 500,
cssClass: "apexcharts-yaxis-label",
},
},
},
plotOptions: {
bar: {
horizontal: false,
borderRadius: 7,
columnWidth: "25%",
barHeight: "70%",
},
},
fill: {
colors: ["#FFFFFF"],
},
dataLabels: {
enabled: false,
},
title: {
text: undefined,
},
});
I saw this post on GitHub about rounded bar charts (https://github./apexcharts/apexcharts.js/issues/422) and was wondering how to round the bottom of the chart I am using version 3.27.3. I want my charts to look like this: Sausage Chart And at the moment they look like this Bar Chart As you can see the bottom part is not rounded
These are my options:
chart: {
background: "transparent",
foreColor: "#333",
toolbar: {
show: false,
},
zoom: {
enabled: false,
},
},
legend: {
show: false,
},
grid: {
show: false,
},
xaxis: {
categories: [],
axisBorder: {
show: false,
},
axisTicks: {
show: false,
},
categories: [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
],
labels: {
show: false,
},
},
yaxis: {
labels: {
style: {
colors: ["#FFFFFF"],
fontSize: "12px",
fontFamily: "Helvetica, Arial, sans-serif",
fontWeight: 500,
cssClass: "apexcharts-yaxis-label",
},
},
},
plotOptions: {
bar: {
horizontal: false,
borderRadius: 7,
columnWidth: "25%",
barHeight: "70%",
},
},
fill: {
colors: ["#FFFFFF"],
},
dataLabels: {
enabled: false,
},
title: {
text: undefined,
},
});
Share
Improve this question
asked Jul 27, 2021 at 11:45
Radu LupascuRadu Lupascu
911 silver badge3 bronze badges
1 Answer
Reset to default 9You need to add the property borderRadius: 30
(or number that you want) inside of the options
properties
options: {
plotOptions: {
bar: {
borderRadius: 30,
// borderRadiusApplication: 'end',
// borderRadiusWhenStacked: 'last',
}
}
}
You can also play using borderRadiusApplication
and borderRadiusWhenStacked
all those properties can be used from version 3.26
and above
you can find more info here https://apexcharts./docs/options/plotoptions/bar/
本文标签: javascriptRounded Charts using ApexChartsStack Overflow
版权声明:本文标题:javascript - Rounded Charts using ApexCharts - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741317219a2371987.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论