This element represents the <svg> base element, and is responsible for declaring the canvas size and aspect-ratio.
renderWidth[optional] (number)
define the width of thesvg.viewBox(default: 300)renderHeight[optional] (number)
define the height of thesvg.viewBox(default: 150)
This element represents a viewport for values to be drawn within. The viewport provides a mechanism for translating and flipping the Y axis of all renderable child elements. It also provides a mechanism for clipping all children which render outside of the viewport.
x[optional] (number)
distance to move thePlotfrom the left edge of theGraph(default: 0)y[optional] (number)
distance to move thePlotfrom the top edge of theGraph(default: 0)width[optional] (number)
width of thePlot(default:graph.renderWidth-plot.x)height[optional] (number)
height of thePlot(default:graph.renderHeight-plot.y)invertYAxis[optional] (boolean)
whether to force renderable child elements to draw in negative-y space (default: true)
This element represents the means to draw a list of renderable entities. It takes a series of points, and a render prop (or child), and provides the render function with a props object containing:
renderPoint={({ point, input, rect, points })=>SVGElement}
point(aProjectedPointin viewport space)input(the original data object passed in)rect(the boundingPointSeriesbox in relative coordinates{x,y,width,height})points(the list of allProjectedPointsin this series)
points[REQUIRED] (Array<{x: number, y: number, [string]: any}>)
a list of inputs withx/yvalues as fractions of the domain/range, and any other properties to be passed throughrenderPointorchildren[REQUIRED] ((RenderArgs)=>SVGElement)x[optional] (number)
distance to move the Series from the left edge of the containing element (default: 0)y[optional] (number)
distance to move the Series from the top edge of the containing element (default: 0)width[optional] (number)
width of the Series (default: inherited.width -series.x)height[optional] (number)
height of the Series (default: inherited.height -series.y)
This element is the same as the PointSeries above, except that it constructs line segments of neighbouring Points, and demands a different render name, and provides slightly modified render args, to be useful in a Line context.
renderLine={({ line, rect, lines })=>SVGElement}
line(aProjectedLinein viewport space)rect(the boundingLineSeriesbox in relative coordinates{x,y,width,height})lines(the list of allProjectedLinesin this series)
points[REQUIRED] (Array<{x: number, y: number, [string]: any}>)
a list of inputs withx/yvalues as fractions of the domain/range, and any other properties to be passed throughrenderLineorchildren[REQUIRED] ((RenderArgs)=>SVGElement)x[optional] (number)
distance to move the Series from the left edge of the containing element (default: 0)y[optional] (number)
distance to move the Series from the top edge of the containing element (default: 0)width[optional] (number)
width of the Series (default: inherited.width -series.x)height[optional] (number)
height of the Series (default: inherited.height -series.y)
A simple point in 2D space that has been converted to viewport space.
{ x: number, y: number }
A tuple (array) of start and end; objects representing the endpoints of the line segment.
[start, end]
Each has the following type:
{ point: ProjectedPoint, input: {x:number, y:number, [string]: any} }