简体   繁体   中英

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). 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? those examples that in link are does not exactly match my requirement, but I can play with it and change accordingly. 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. See the d properties of the objects in the paths var here:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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