答案 0 :(得分:2)
它是这样的:
[
{"day":"11,10,2016","visitors":918,"u":123},
{"day":"12,10,2016","visitors":980,"u":203},
{"day":"13,10,2016","visitors":928,"u":103},
{"day":"14,10,2016","visitors":928,"u":523},
{"day":"15,10,2016","visitors":928,"u":300},
{"day":"16,10,2016","visitors":918,"u":120},
{"day":"17,10,2016","visitors":983,"u":223}
]
并用作定义(defs)以供将来参考。看here
在这里:Is it possible to import svg shapes in d3.js?
如果您想手动完成,请参阅路径教程:https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths
这里是Codepen