Skip to content

Skip all borders if borderSkipped === true#10461

Closed
pijulius wants to merge 1 commit intochartjs:masterfrom
pijulius:master
Closed

Skip all borders if borderSkipped === true#10461
pijulius wants to merge 1 commit intochartjs:masterfrom
pijulius:master

Conversation

@pijulius
Copy link
Contributor

This will allow you to skip all borders (not just one side) if you set borderSkipped to boolean true and so allow you to have a consistent legend marker even for bars without borders. Reason is that even if same colored borders are set there are artifacts that make the bar look bad and also even with inflateAmount the bars do look good when big but when only a few pixel in size they start to look bad too so this was the only way for me to make it work so legends are looking good and bars too.

This will allow you to skip all borders (not just one side) if you set borderSkipped to boolean true and so allow you to have a consistent legend marker even for bars without borders. Reason is that even if same colored borders are set there are artifacts that make the bar look bad and also even with inflateAmount the bars do look good when big but when only a few pixel in size they start to look bad too so this was the only way for me to make it work so legends are looking good and bars too.
Copy link
Collaborator

@LeeLenaleee LeeLenaleee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are failing because of formatting. But I am wondering why you would want this, if you dont want to show any borders you can just set the borderWidth to 0 which is the default.

EDIT:
If this goes through the typings also need an update to reflect this and the docs

@pijulius
Copy link
Contributor Author

pijulius commented Jul 1, 2022

Hi LeeLenaleee, unfortunately if you set borderWidth to 0 the legend points (like bars, circle and so on) won't be the same as for those that have borders. So if you have for e.g. lines with borders and then bars without borders the legend points will be different.

Can be seen here if you carefully look:
https://www.chartjs.org/docs/latest/samples/other-charts/combo-bar-line.html
http://pijulius.com/share/screenshot-20220701090215.png

@kurkle
Copy link
Member

kurkle commented Jul 7, 2022

I don't have any strong objections against this. The formatting, types and documentarion should be updated to reflect the change. A fixture test would also be good to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments