-
Notifications
You must be signed in to change notification settings - Fork 133
summaryType Advanced Settings
- Custom Settings for ORFrame Summary Types
As with other data visualization types in the various frames, ORFrame will let you send the following strings to summaryType: "boxplot"
, "histogram"
, "heatmap"
, "violin"
, "contour"
, "joy"
. If you want more control over the summary 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:
<ORFrame
summaryType={"contour"}
/>
...while this sends custom settings to adjust the number of contouring thresholds:
<ORFrame
summaryType={{ type: "contour", thresholds: 5 }}
/>
For those of you new to React, the reason for double curly brackets is that the first curly brackets are just so we can send JavaScript to JSX and the second curly brackets are because we are instantiating an object.
All bucketized summaries (violin, joy, histogram, heatmap) share the following:
-
bins
: the number of bins that entries are bucketed into (defaults to 25) -
binValue
: the value of the bin--the height of the histogram, the width of the violin, the darkness of the heatmap. Defaults to the length of the array of pieces that fall within the bin:d => d.length
so if you want to total the values used => sumFunction(d))
.
-
curve
: Thed3-shape
style curve interpolator used for the shape (defaults tocurveCatmullRom
). Not honored in radial projection because the diagonals play have with them.
-
curve
: Thed3-shape
style curve interpolator used for the shape (defaults tocurveCatmullRom
). Not honored in radial projection. -
amplitude
: An amount of pixels to overflow the height into the adjoining column (defaults to0
which is more like a Joyless Plot if you ask me).
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
).
Currently no available custom settings. The boxplot samples the data sent to each column, so you can send a preprocessed array of [ min, firstQuartile, median, thirdQuartile, max ]
values and generate your own boxplot.