Skip to content

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  }}
/>

Custom Settings by Type

Shared

Contour Settings

Under the hood this implements d3-contour and passes these settings through.

  • thresholds: the number of thresholds for the contouring (defaults to 8).
  • bandwidth: the size of the contour bandwidth (defaults to 12).
  • resolution: the pixel resolution of the contouring (defaults to 1000).
  • neighborhood: boolean which will force the returned shape to only have the bottommost region of the calculated contours.

Alpha Shape Settings

  • alpha: The alpha parameter sent to the alpha-complex. Review the documentation for alpha-complex. Defaults to 0.001