D3.js提供的11种不同的线

2015年06月25日 javascript 暂无评论 阅读 335 views 次

D3.js提供了11种不同的线,可以让d3.svg.line() 函数来操纵.这里有非常多的专业名词,我觉得翻译还不如不翻译。。给大家看看吧。。

  • linear – piecewise linear segments, as in a polyline.
  • step-before – alternate between vertical and horizontal segments, as in a step function.
  • step-after – alternate between horizontal and vertical segments, as in a step function.
  • basis – a B-spline, with control point duplication on the ends.
  • basis-open – an open B-spline; may not intersect the start or end.
  • basis-closed – a closed B-spline, as in a loop.
  • bundle – equivalent to basis, except the tension parameter is used to straighten the spline.
  • cardinal – a Cardinal spline, with control point duplication on the ends.
  • cardinal-open – an open Cardinal spline; may not intersect the start or end, but will intersect other control points.
  • cardinal-closed – a closed Cardinal spline, as in a loop.
  • monotone – cubic interpolation that preserves monotonicity in y.
    1
  • 2

d3.svg.line()这类path生成器,既是一个函数也是一个对象,这意味着你可以把他作为方法来生成path,也可以用一些额外方法去改变它自身的属性。

给我留言

您必须 登录 才能发表留言!

Copyright © 大一网 保留所有权利.  

用户登录

分享到: