path.context()

path.context([context])

If context is specified, sets the current render context and returns the path generator. If the context is null, then the path generator will return an SVG path string; if the context is non-null, the path generator will instead call methods on the specified context to render geometry. The context must implement the following subset of the CanvasRenderingContext2D API:

  • context.beginPath()
  • context.moveTo(x, y)
  • context.lineTo(x, y)
  • context.arc(x, y, radius, startAngle, endAngle)
  • context.closePath()

If a context is not specified, returns the current render context which defaults to null.

doc_D3_Js
2016-11-24 10:28:16
Comments
Leave a Comment

Please login to continue.