symbolType.draw()

symbolType.draw(context, size) Renders this symbol type to the specified context with the specified size in square pixels. The context implements the CanvasPathMethods interface. (Note that this is a subset of the CanvasRenderingContext2D interface!)

symbol.type()

symbol.type([type]) If type is specified, sets the symbol type to the specified function or symbol type and returns this line generator. If type is not specified, returns the current symbol type accessor, which defaults to: function type() { return circle; } See symbols for the set of built-in symbol types. To implement a custom symbol type, pass an object that implements symbolType.draw.

symbol.size()

symbol.size([size]) If size is specified, sets the size to the specified function or number and returns this symbol generator. If size is not specified, returns the current size accessor, which defaults to: function size() { return 64; } Specifying the size as a function is useful for constructing a scatterplot with a size encoding. If you wish to scale the symbol to fit a given bounding box, rather than by area, try SVG’s getBBox.

symbol.context()

symbol.context([context]) If context is specified, sets the context and returns this symbol generator. If context is not specified, returns the current context, which defaults to null. If the context is not null, then the generated symbol is rendered to this context as a sequence of path method calls. Otherwise, a path data string representing the generated symbol is returned.

symbol()

symbol(arguments…) Generates a symbol for the given arguments. The arguments are arbitrary; they are simply propagated to the symbol generator’s accessor functions along with the this object. For example, with the default settings, no arguments are needed to produce a circle with area 64 square pixels. If the symbol generator has a context, then the symbol is rendered to this context as a sequence of path method calls and this function returns void. Otherwise, a path data string is returned.

stream.sphere()

stream.sphere() Indicates the sphere (the globe; the unit sphere centered at ⟨0,0,0⟩).

stream.polygonStart()

stream.polygonStart() Indicates the start of a polygon. The first line of a polygon indicates the exterior ring, and any subsequent lines indicate interior holes.

stream.polygonEnd()

stream.polygonEnd() Indicates the end of a polygon.

stream.point()

stream.point(x, y[, z]) Indicates a point with the specified coordinates x and y (and optionally z). The coordinate system is unspecified and implementation-dependent; for example, projection streams require spherical coordinates in degrees as input. Outside the context of a polygon or line, a point indicates a point geometry object (Point or MultiPoint). Within a line or polygon ring, the point indicates a control point.

stream.lineStart()

stream.lineStart() Indicates the start of a line or ring. Within a polygon, indicates the start of a ring. The first ring of a polygon is the exterior ring, and is typically clockwise. Any subsequent rings indicate holes in the polygon, and are typically counterclockwise.