Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

'bar chart: borderSkipped not working.

Open romanovma opened this issue 10 years ago • 7 comments

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

romanovma avatar Sep 12 '16 11:09 romanovma

@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 avatar Sep 12 '16 13:09 etimberg

@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.

romanovma avatar Sep 12 '16 14:09 romanovma

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

etimberg avatar Sep 12 '16 21:09 etimberg

OK, got you, thanks.

romanovma avatar Sep 13 '16 01:09 romanovma

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

simonbrunel avatar Sep 13 '16 15:09 simonbrunel

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.

bwk123 avatar Dec 14 '18 00:12 bwk123

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

etimberg avatar Mar 17 '19 00:03 etimberg