Apexcharts.js: Stacked bar chart border radius

Created on 8 Dec 2020  路  5Comments  路  Source: apexcharts/apexcharts.js

Bug report

Codepen

click on given link to view the issue this codepen
issue on reactjs this codepen

Explanation

  • I want to make only top border rounded instead of each stack entity
  • here is every stack stack entity shows rounded border
  • No error message

Most helpful comment

For vertical columns

.apexcharts-bar-series.apexcharts-plot-series  .apexcharts-series path {
    clip-path: inset(0% 0% -11% 0% round 8px);
}

For horizontal bars

.apexcharts-bar-series.apexcharts-plot-series  .apexcharts-series path {
    clip-path: inset(0% 0% 0% -5% round 8px);
}

Disable the animations

chart: {
    height: 380,
     animations: {
          enabled: false
     },
}

EDIT
Since v3.26.0, there is a new property for border-radius

plotOptions: {
  bar: {
    borderRadius: 5
  }
}

All 5 comments

For vertical columns

.apexcharts-bar-series.apexcharts-plot-series  .apexcharts-series path {
    clip-path: inset(0% 0% -11% 0% round 8px);
}

For horizontal bars

.apexcharts-bar-series.apexcharts-plot-series  .apexcharts-series path {
    clip-path: inset(0% 0% 0% -5% round 8px);
}

Disable the animations

chart: {
    height: 380,
     animations: {
          enabled: false
     },
}

EDIT
Since v3.26.0, there is a new property for border-radius

plotOptions: {
  bar: {
    borderRadius: 5
  }
}

@IsaacSomething your suggestion mostly works until I hover over the bar and it looks like this:

Screen Shot 2021-03-02 at 13 47 14

@praneetloke I think you might have to remove the hover state and active state. It should still show the tooltip

```

states: {
hover: {
filter: {
type: 'none',
}
},
active: {
filter: {
type: 'none',
}
},
}

Ah gotcha. Unfortunately, that won't work for me. I'd like to keep the hover state for accessibility reasons.

Since v3.26.0, there is a new property for border-radius

plotOptions: {
  bar: {
    borderRadius: 5
  }
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

drew-dulgar picture drew-dulgar  路  3Comments

jeroenpol picture jeroenpol  路  3Comments

ismaildervisoglu picture ismaildervisoglu  路  3Comments

georgehardy picture georgehardy  路  3Comments

ordago picture ordago  路  3Comments