Type Alias: BaseFunnelTrace
ts
type BaseFunnelTrace = Omit<CommonTraceAttributes, 'hoverinfo'> & CartesianTraceAttributes & object;Funnel: stages of a process as bars centered on the value axis, with connector regions between them.
Type Declaration
| Name | Type | Description |
|---|---|---|
alignmentgroup? | string | Traces on the same position axis with the same alignment group split each position between their offset groups; different alignment groups lay out independently. |
cliponaxis? | boolean | Clip labels to the plot area. false is not drawn yet: labels are always clipped to the subplot. |
connector? | FunnelTraceConnector | Regions connecting each stage to the next. |
constraintext? | "inside" | "outside" | "both" | "none" | Shrink labels (inside, outside, or both) so they are no larger than their bar. |
dx? | number | Step between implicit x coordinates (see x0). |
dy? | number | Step between implicit y coordinates (see y0). |
hoverinfo? | PerPoint< | "name" | "x" | "y" | "text" | "percent initial" | "percent previous" | "percent total" | `${"name" | "x" | "y" | "text" | "percent initial" | "percent previous" | "percent total"}+${string}` | "all" | "none" | "skip"> | Which fields hover labels show: the position and value (x, y), text, the value as a percentage of the first stage, of the previous stage and of the trace's total and the trace name; 'skip' also turns hover events off for this trace. Default 'all'. |
insidetextanchor? | "end" | "middle" | "start" | Where inside labels sit along the bar. |
insidetextfont? | BarTraceInsidetextfont | Font of labels inside bars. Defaults to textfont, with a color contrasting the bar fill. |
marker? | FunnelTraceMarker | Bar style. |
offset? | number | Shift of the bars' leading edge from their position, in position-axis units. Default: centered in the (group) slot. |
offsetgroup? | string | Traces with the same offset group share one slot in group mode (and stack together in stack/relative modes); bars at the same position line up, also across subplots on the same position axis. |
orientation? | "v" | "h" | 'h' (the default): horizontal bars, one per y stage, x long; 'v': vertical bars, one per x stage, y long (the default when only y is given). A horizontal funnel's stage axis is reversed (first stage on top) and its value axis hidden, unless another trace type uses them. |
outsidetextfont? | BarTraceOutsidetextfont | Font of labels outside bars. Defaults to textfont. |
text? | PerPoint<string | number> | Text per bar, drawn per textposition and shown in hover labels. |
textangle? | number | "auto" | Label rotation in degrees, clockwise. 'auto' turns inside labels 90° when that fits the bar better. |
textfont? | BarTraceTextfont | Font of bar labels. Defaults to layout.font. |
textinfo? | | "label" | "text" | "percent initial" | "percent previous" | "percent total" | "value" | `${"label" | "text" | "percent initial" | "percent previous" | "percent total" | "value"}+${string}` | "none" | What bar labels show, in a fixed order (label, text, value, then the percentages of the first stage, the previous stage and the trace's total), one per line. Default 'value', or 'text+value' when text is an array. Percentages are computed per trace. |
textposition? | PerPoint<"inside" | "outside" | "auto" | "none"> | Where bar labels go: inside (against the bar end, see insidetextanchor), outside (past the bar end; inner bars of a stack stay inside), auto (inside when it fits, else outside), none. |
texttemplate? | PerPoint<string | number> | Template for bar labels, overriding textinfo: %{value}, %{percentInitial}, %{percentPrevious}, %{percentTotal} (ratios, shown as percentages without a format), %{label} (stage), %{x}, %{y}, %{text}, %{customdata}, %{meta}, with optional d3 formats (%{percentInitial:.1%}). |
type | "funnel" | Trace type. |
width? | number | Bar width in position-axis units. Default: the slot left by layout.funnelgap and the funnel mode. Minimum: 0 |
x? | DataColumn | x coordinates: bar positions for vertical bars, bar lengths otherwise. Numbers, dates or category names depending on the axis type. |
x0? | unknown | Starting x coordinate when x is not given: bar i is at x0 + i·dx. |
xperiod? | unknown | Only on date or linear x axes: snap each x value to its period of this length (ms, or 'M<n>' months on date axes), positioned per xperiodalignment. |
xperiod0? | unknown | A period boundary for xperiod. Default: 2000-01-01 on date axes (a Sunday for weekly periods), 0 otherwise. |
xperiodalignment? | "start" | "middle" | "end" | Where points sit within their xperiod. |
y? | DataColumn | y coordinates: bar positions for horizontal bars, bar lengths otherwise. Numbers, dates or category names depending on the axis type. |
y0? | unknown | Starting y coordinate when y is not given: bar i is at y0 + i·dy. |
yperiod? | unknown | Only on date or linear y axes: snap each y value to its period of this length (ms, or 'M<n>' months on date axes), positioned per yperiodalignment. |
yperiod0? | unknown | A period boundary for yperiod. Default: 2000-01-01 on date axes (a Sunday for weekly periods), 0 otherwise. |
yperiodalignment? | "start" | "middle" | "end" | Where points sit within their yperiod. |
zorder? | number | Stacking order among the traces of a subplot: higher is drawn on top. At equal zorder, bars draw below scatter traces (Plotly’s layer order), then in trace order. |