Reputation: 930
I'm using D3 to draw a certain shape layout for my map and the drew area has to be shaded. I am using line path to achieved the shape, What I couldn't figured out is how do I shade (fill) the area with a certain color. See picture for an example shape, just random in this case for visual aid.
Upvotes: 0
Views: 269
Reputation: 1
In order to fill the area described by these paths, simply assign the CSS attribute fill
.
Upvotes: 0
Reputation: 266
you need to checkout the fill style property on paths.
<style>
path {
fill: red;
}
</style>
Upvotes: 1