-
Notifications
You must be signed in to change notification settings - Fork 133
areaType Advanced Settings
Susie edited this page Aug 15, 2017
·
2 revisions
As with other data visualization types in the various frames, XYFrame will let you send the following strings to areaType: "alpha"
, "contour"
. If you want more control over the area 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 summary 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 contouring with the default method:
<XYFrame
areaType={"contour"}
/>
...while this sends custom settings to adjust the number of contouring thresholds:
<XYFrame
areaType={{ type: "contour", thresholds: 5 }}
/>
Under the hood this implements d3-contour
and passes these settings through.
-
thresholds
: the number of thresholds for the contouring (defaults to8
). -
bandwidth
: the size of the contour bandwidth (defaults to12
). -
resolution
: the pixel resolution of the contouring (defaults to1000
). -
neighborhood
: boolean which will force the returned shape to only have the bottommost region of the calculated contours.
-
alpha
: The alpha parameter sent to thealpha-complex
. Review the documentation for alpha-complex. Defaults to0.001