本文介绍了d3.js雷达图 - 填充线之间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在这些三角形中的两个之间创建一个填充,例如红色和绿色三角形之间的红色填充。有人知道如何做到这一点吗?我看到了另一个雷达图的例子,我相信做类似的,虽然我认为他们使用CSS创建填充,而不是d3 ...

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 seen another example of a radar graph that I believe does something similar, although I think they create the fill using CSS, not d3...

使用径向解决了mbostock的答案的上述问题图表...

solved the above problem with mbostock's answer using radial chart...

最终结果

推荐答案

您不需要为此实现自定义路径;您可以使用路径生成器。下面是一个堆叠径向面积图的例子,您可以用它来绘制循环数据:

You don’t need to implement a custom path for this; you can use a d3.svg.area.radial path generator. Here’s an example of a stacked radial area chart which you might use to plot cyclical data:



  • http://bl.ocks.org/3048740

类似于雷达图,除了雷达图,每个角度点的比例将不同。

The implementation is fairly similar to a radar chart, except with a radar chart the scales will be different for each angular point.

这篇关于d3.js雷达图 - 填充线之间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 03:53