d3.js Radar Graph - filling in between lines

后端 未结 3 1144
余生分开走
余生分开走 2021-02-06 18:50

I\'m trying to create a fill in between two of these triangles, for example a red fill in between the red and green triangles. Does anybody know how to accomplish this? I have s

3条回答
  •  既然无缘
    2021-02-06 19:05

    To achieve this, you'll have to merge the two triangles into one path by using a custom path generator. Then you can close the path and fill it. Note that if you want the triangles to have different colours, you need to draw them separately.

    You could try to cheat and simply fill the bigger triangle and then put the smaller triangle with a white fill on top of it. Then draw the grid lines. This will only work however if the triangles don't overlap.

提交回复
热议问题