当前位置: 首页 > 工具软件 > magnify.js > 使用案例 >

将d3 html转化为svg,如何将svg转换为d3.js代码?

左丘修齐
2023-12-01

我正在使用gephi,这是一种制作图形的软件,它以平面svg格式导出图形。如何将svg转换为d3.js代码?

我需要将图形放在网页中,并使用一些交互式行为来突出显示选择,因为它有1800个节点。

我想知道是否有任何方式导入此SVG在D3.js或者其他的工具来转换SVG代码为D3.js代码

下面是SVG格式的有几个样本节点和链接。

xmlns:xlink="http://www.w3.org/1999/xlink" zoomAndPan="magnify"

contentStyleType="text/css"

viewBox="-1491.000000 -1489.000000 2998.826172 2983.000000" height="2983.0"

preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg"

version="1.1">

d="M -741.524292,330.655731 C -696.531250,212.884094 -452.384125,103.716217 -334.612488,148.709290"

class="vansdlp kshhbak" stroke-opacity="0.6"

stroke="#73c000"/>

d="M -334.612488,148.709290 C -379.605560,266.480927 -623.752686,375.648804 -741.524292,330.655731"

class="kshhbak vansdlp" stroke-opacity="0.6"

stroke="#73c000"/>

d="M -334.612488,148.709290 C -334.612488,148.709290 -174.612488,148.709290 -334.612488,148.709290"

class="kshhbak" stroke-opacity="0.6" stroke="#73c000"/>

d="M -1003.035095,296.450439 C -943.891846,250.989349 -786.985413,271.512512 -741.524292,330.655731"

class="linaroblujh vansdlp" stroke-opacity="0.6"

stroke="#73c000"/>

class="vansdlp" cy="330.65573" stroke="#000000"

stroke-opacity="1.0" stroke-width="1.0"/>

class="kshhbak" cy="148.70929" stroke="#000000"

stroke-opacity="1.0" stroke-width="1.0"/>

class="linaroblujh" cy="296.45044" stroke="#000000"

stroke-opacity="1.0" stroke-width="1.0"/>

fill="#000000" stroke-linejoin="round"

style="text-anchor: middle; dominant-baseline: central;"

font-family="Arial" class="vansdlp" stroke="#ffffff"

stroke-opacity="0.6" stroke-width="3.75px">

vansdlp

fill="#000000" stroke-linejoin="round"

style="text-anchor: middle; dominant-baseline: central;"

font-family="Arial" class="kshhbak" stroke="#ffffff"

stroke-opacity="0.6" stroke-width="15.0px">

kshhbak

 类似资料: