Chart.js: 'bar chart: borderSkipped not working.

Created on 12 Sep 2016  ·  7Comments  ·  Source: chartjs/Chart.js

borderSkipped not working. Set it to top but top border still visible.
Please see JSBin: https://jsbin.com/xihovibego/edit?html,js,output

bug enhancement

Most helpful comment

Could be a new feature: borderWidth: [0, 0, 0, 1] // trbl

All 7 comments

@romanovma looks like this can only be set on all elements at the moment. Work around: https://jsbin.com/muxoxodoro/1/edit?html,js,output

@etimberg, actually I want to show only the left border of the bar so setting borderSkipped for rectangle won't work for me as it doesn't allow to use array.
What do you mean by set on all elements? May be this can be a workaround in my case..
Many thanks.

I meant apply to all datasets rather than per dataset. I don't think there is a good way to only draw the left border. You might have to override Chart.elements.Rectangle.prototype.draw

OK, got you, thanks.

Could be a new feature: borderWidth: [0, 0, 0, 1] // trbl

I want to be able to control the four sides of the border width. I wonder if this issue will be fixed. @simonbrunel , @etimberg Any update? Thanks.

4 sided control of border width was added in #6077 and released in Chart.js v2.8.0

Was this page helpful?
0 / 5 - 0 ratings