[Chartjs]-How to remove border from stacked column chart in Chartkick – Chart.js

0πŸ‘

You have to override the chart.js library that you have added to your assets. You can set the dataset.borderWidth to 0.

Simply replace the dataset.borderWidth with 0.

And it should work.

0πŸ‘

It took me some time to figure it out myself but the answer is actually hidden on https://github.com/ankane/chartkick between countless other examples:

<%= line_chart data, dataset: {borderWidth: 10} %>

So for a barchart to lose the border it is:

<%= bar_chart data, dataset: { borderWidth: 0 } %>

Leave a comment