D3.JS等级边缘与直边捆绑

发布于 2025-02-12 08:50:05 字数 427 浏览 3 评论 0原文

我正在尝试修改找到的代码在这里弯曲。

我尝试使用以下功能替换以下功能

line = d3.lineRadial()
    .curve(d3.curveBundle.beta(0.85))
    .radius(d => d.y)
    .angle(d => d.x)

line = d3.line()
    .x(d => d.x)
    .y(d => d.y)

但似乎并没有解决问题。

我想念什么?

I am trying to modify the code found here so that the edges are straight and not curved.

I have tried replacing the following function

line = d3.lineRadial()
    .curve(d3.curveBundle.beta(0.85))
    .radius(d => d.y)
    .angle(d => d.x)

with

line = d3.line()
    .x(d => d.x)
    .y(d => d.y)

but it doesn't seem to be doing the trick.

What am I missing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

残龙傲雪 2025-02-19 08:50:05

事实证明,我需要做的是将参数从0.85设置

.curve(d3.curveBundle.beta(0.85))

0

Turns out what I needed to do was to set the parameter on

.curve(d3.curveBundle.beta(0.85))

from 0.85 to 0.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文