0
중간에 글꼴 아이콘이 있고 아래에 재고 레이블이있는 원으로 표시된 노드를 찾고 있습니다. 이 (http://jsbin.com/hiqega/3/edit?js,output)는 내가 사용하고자하는 글꼴 이름과 아이콘 코드를 전달해야한다는 것을 제외하고는 내가 찾고있는 것에 거의 가깝다. 내가 그렇게 nodeImage('red', '', 'FontAwesome')
이미 내가 문제를 생각하지 않는 다른 글꼴을 사용하는 페이지처럼이 전화 드렸습니다사용자 정의 SVG 노드의 글꼴 vis.js 네트워크가있는 이미지
function nodeImage(color, icon, font)
{
var svg = '<svg xmlns="http://www.w3.org/2000/svg" ' +
'width="120" height="120" viewPort="0 0 120 120">' +
'<ellipse ry="55" rx="55" cy="60" cx="60" ' +
'style="fill:' + color + ';stroke:black;stroke-opacity:.5;stroke-width:4;" />' +
'<text x="61" y="63" text-anchor="middle" dominant-baseline="middle" ' +
'style="font-family:' + font + ';font-size:100px;fill:black;fill-opacity:.5;">' +
icon + '</text>' +
'</svg>';
return 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(svg);
}
는로드되지 점이다.
Here's a pic of the resulting node
내가 잘못거야 어디에 어떤 제안?
SVG 렌더러가 jsbin의 결과와 많이 달라 보이지 않습니다. – greybeard