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

pointStyle: 'none'

Open robertosw opened this issue 3 years ago • 3 comments

Feature Proposal

"Standard" Charts with pointStyle: 'circle'

image


pointStyle: 'dash' or 'line'

image

This looks so clean, but as you can see at the end of the datasets, the little dash is always visible. If there would be an option pointStyle: 'none' this would look even more perfect

Edit:

I have just found that you can use any pointStyle together with pointRadius: 0 to achieve this. But this is just a workaround, there probably should be a pointStyle: 'none'.


Additionally, you could make "fat" lines, which just serve as a marker. This is currently not possible if your border color is semi-transparent, because the dash will be visible:

borderColor: 'hsla(148, 100%, 30%, 0.25)',
borderWidth: 10

image

Possible Implementation

Maybe just use the code from pointStyle: 'circle' and reduce the width of the circle to 0? (If it can't be invisible). But this is kind of hacky, there is probably a cleaner solution

No response

robertosw avatar Oct 06 '22 07:10 robertosw

@robertosw @bakert can I work on this issue

harshit-dugar avatar Oct 07 '22 14:10 harshit-dugar

I think you tagged the wrong person but I say go for it :)

bakert avatar Oct 07 '22 14:10 bakert

There's already a PR from @puneetkathar1 for this

etimberg avatar Oct 07 '22 14:10 etimberg

Added in https://github.com/chartjs/Chart.js/pull/10886

Released in V4.1.0

LeeLenaleee avatar Apr 19 '23 23:04 LeeLenaleee