-
Notifications
You must be signed in to change notification settings - Fork 133
lineType Advanced Settings
As with other data visualization types in the various frames, XYFrame will let you send the following strings to lineType: "line"
, "linepercent"
, "difference"
, "stackedarea"
, "stackedpercent"
, "bumpline"
, "bumparea"
. If you want more control over the line data visualization being rendered, each of these types have additional settings you can adjust based on your use case and which typically expose settings associated with the data transformation method associated with the line type. To do this, you need to send an object instead of a string, and that object should have a type
attribute set to the string, so this uses stackedarea
with the default method:
<XYFrame
lineType={"stackedarea"}
/>
...while this sends custom settings to render a stacked area chart with a curve preserving monotonicity:
import { curveMonotoneX } from 'd3-shape'
<XYFrame
areaType={{ type: "stackedarea", interpolator: curveMonotoneX }}
/>
-
interpolator
: Takes a d3 style curve, like those found ind3-shape
.
-
y1
: Allows you to set they1
accessor to create "area lines" such as filled areas that grow from the zero baseline or ribbons.
-
sort
: the sorting function by which to order the shapes vertically. Defaults to largest shapes on the bottom and you can sendnull
to prevent sorting.
-
sort
: the sorting function by which to order the shapes vertically. Defaults to largest shapes on the bottom and you can sendnull
to prevent sorting.