简体   繁体   English

使用d3和svg绘制自定义图像

[英]draw custom images using d3 and svg

Hi I have a requirement to draw some customized shapes as part of project using D3 and/or svg AND JAVASCRIPT (must- means the code goes in a seperate .js). 嗨,我需要使用D3和/或svg和JAVASCRIPT绘制一些自定义形状作为项目的一部分(必须表示代码位于单独的.js中)。 please find this link, http://imagizer.imageshack.us/a/img62/5857/n08p.png for the shapes and can some one guide in right direction or an example? 请找到此链接http://imagizer.imageshack.us/a/img62/5857/n08p.png以获得形状,是否可以向正确的方向或示例提供指导? those examples that in link are does not exactly match my requirement, but I can play with it and change accordingly. 这些链接中的示例与我的要求不完全匹配,但是我可以使用它并进行相应的更改。 TIA TIA

You can add your own custom svg paths and lines using d3 by passing in a shape or path or x1, y1, x2 and y2 line points into d3. 您可以通过将形状或路径或x1,y1,x2和y2线点传入d3中来使用d3添加自己的自定义svg路径和线。 See the d properties of the objects in the paths var here: 请在此处查看路径var中对象的d属性:

https://bl.ocks.org/AndrewStaroscik/5220771 https://bl.ocks.org/AndrewStaroscik/5220771

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM