使用 nvd3.js 自定义甜甜圈图

customise Donut graph using nvd3.js

尽管圆环图的颜色填充,但我正在尝试实现仅具有边框的区域的透明颜色。我将 nvd3 与 angularJS 一起使用,但无法实现。关于如何执行此操作的任何建议。

如果有任何图书馆 - 能够这样做,请建议。

Image for reference

问题出在 nv.d3.css 中设置的样式。

添加此样式后添加nv.d3.css

.nvd3.nv-pie path {
stroke: inherit;
stroke-width: 1px;
stroke-opacity: 1;
fill: white;
}

如果您只想将其应用于特定饼图,请将 id 添加到样式选择器。