我们可以使用的d3符号列表 [英] List of d3 symbols available to us
本文介绍了我们可以使用的d3符号列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在哪里可以找到d3.js提供给我们的代码列表,以下代码行对此代码进行了引用:
Where can I find the list of symbols made available to us by d3.js which is referred by this line of code:
d3.svg.symbol().type(/*Name of the symbol type that is available to us to use*/'triangle')
一些可用的符号包括三角形,菱形。在记录了整个列表的任何地方,是否有任何可用的文档。
Some of the available symbols include triangle, diamond. Is there any documentation available anywhere where the entire list is documented.
推荐答案
D3文档中列出了支持的类型: https://github.com/mbostock/d3/wiki/SVG-Shapes#symbol_type 。引用:
The types supported are listed in the D3 documentation: https://github.com/mbostock/d3/wiki/SVG-Shapes#symbol_type. To quote:
- circle - a circle.
- cross - a Greek cross or plus sign.
- diamond - a rhombus.
- square - an axis-aligned square.
- triangle-down - a downward-pointing equilateral triangle.
- triangle-up - an upward-pointing equilateral triangle.
D3还具有一个存储可用符号的对象(再次感谢@jshanley)。例如。对于D3 3.4.6:
D3 also has an object that stores the symbols available (thanks again, @jshanley). E.g. for D3 3.4.6:
>>> d3.svg.symbolTypes
["circle", "cross", "diamond", "square", "triangle-down", "triangle-up"]
这篇关于我们可以使用的d3符号列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文