No way fill area inside drawn shape
See original GitHub issueI need a way to fill drawn shape by some color.
On my chart I’m drawing circle, ellipse or some other shape which isn’t regular and I need a way to fill this shape.
In version 2 of chartjs, it was simple. It was enough to pass fill: true
. In version 3 none of the options work.
In some cases chartjs-plugin-annotation
would be solution but as I mentioned sometimes the shape is irregular.
Is there any way to add a fill in such a case?
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Draw Shapes - add a no fill option
1) Select a shape from comments tool and apply on the area of your choice, adjusting height and size. 2) Right Click (On...
Read more >Photoshop in 60 Seconds: How to Properly Fill a Drawn Outline
In Photoshop you don't need to fill an outline manually, stroke by stroke—you can use the Paint Bucket Tool to fill it with...
Read more >How to Fill Text and Shapes in Cricut Design Space - YouTube
Creating fills in Design Space can be done but you will need to have access to hatch fill that can be imported and...
Read more >How to fill your line art in Photoshop without the paint bucket ...
In this tutorial I show you a better method of ' filling ' your line art and shapes in Photoshop without having to...
Read more >How to recolor open paths or shapes in Adobe Illustrator
Sometimes you want to add color in an area that isn't a closed shape. Learn two ways to fix this issue!
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looks like there might be some kind of issue when the fill is supposed to be an enclosed shape. Thanks for adding the reproduce, we’ll take a look. The fill code is inside https://github.com/chartjs/Chart.js/blob/master/src/plugins/plugin.filler.js
Yes, the solution will solve this in a simpler way. By specifying the fill mode as
'shape'
, the shape enclosed by the points will be filled.