JavaScript Figure Reference: funnel Traces
funnel trace is an object with the key "type" equal to "funnel" (i.e. {"type": "funnel"}) and any of the keys listed below. Visualize stages in a process using length-encoded bars. This trace can be used to show data in either a part-to-whole representation wherein each item appears in a single stage, or in a "drop-off" representation wherein each item appears in each stage it traversed. See also the "funnelarea" trace type for a different approach to visualizing funnel data.
- type
Parent:data[type=funnel]
Type: "funnel" - name
Parent:data[type=funnel]
Type: stringSets the trace name. The trace name appears as the legend item and on hover.
- visible
Parent:data[type=funnel]
Type: enumerated , one of (true|false|"legendonly")
Default:trueDetermines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- showlegend
Parent:data[type=funnel]
Type: boolean
Default:trueDetermines whether or not an item corresponding to this trace is shown in the legend.
- legend
Parent:data[type=funnel]
Type: subplotid
Default:legendSets the reference to a legend to show this trace in. References to these legends are "legend", "legend2", "legend3", etc. Settings for these legends are set in the layout, under `layout.legend`, `layout.legend2`, etc.
- legendrank
Parent:data[type=funnel]
Type: number
Default:1000Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with "reversed" `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.
- legendgroup
Parent:data[type=funnel]
Type: string
Default:""Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- legendgrouptitle
Parent:data[type=funnel]
Type: object containing one or more of the keys listed below.- font
Parent:data[type=funnel].legendgrouptitle
Type: object containing one or more of the keys listed below.Sets this legend group's title font.
- color
Parent:data[type=funnel].legendgrouptitle.font
Type: color - family
Parent:data[type=funnel].legendgrouptitle.font
Type: stringHTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.
- lineposition
Parent:data[type=funnel].legendgrouptitle.font
Type: flaglist string. Any combination of"under","over","through"joined with a"+"OR"none".
Examples:"under","over","under+over","under+over+through","none"
Default:"none"Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc.
- shadow
Parent:data[type=funnel].legendgrouptitle.font
Type: string
Default:"none"Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options.
- size
Parent:data[type=funnel].legendgrouptitle.font
Type: number greater than or equal to 1 - style
Parent:data[type=funnel].legendgrouptitle.font
Type: enumerated , one of ("normal"|"italic")
Default:"normal"Sets whether a font should be styled with a normal or italic face from its family.
- textcase
Parent:data[type=funnel].legendgrouptitle.font
Type: enumerated , one of ("normal"|"word caps"|"upper"|"lower")
Default:"normal"Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.
- variant
Parent:data[type=funnel].legendgrouptitle.font
Type: enumerated , one of ("normal"|"small-caps"|"all-small-caps"|"all-petite-caps"|"petite-caps"|"unicase")
Default:"normal"Sets the variant of the font.
- weight
Parent:data[type=funnel].legendgrouptitle.font
Type: integer between or equal to 1 and 1000
Default:normalSets the weight (or boldness) of the font.
- color
- text
Parent:data[type=funnel].legendgrouptitle
Type: string
Default:""Sets the title of the legend group.
- font
- legendwidth
Parent:data[type=funnel]
Type: number greater than or equal to 0Sets the width (in px or fraction) of the legend for this trace.
- opacity
Parent:data[type=funnel]
Type: number between or equal to 0 and 1
Default:1Sets the opacity of the trace.
- ids
Parent:data[type=funnel]
Type: data arrayAssigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
- zorder
Parent:data[type=funnel]
Type: integer
Default:0Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`.
- x
Parent:data[type=funnel]
Type: data arraySets the x coordinates.
- x0
Parent:data[type=funnel]
Type: number or categorical coordinate string
Default:0Alternate to `x`. Builds a linear space of x coordinates. Use with `dx` where `x0` is the starting coordinate and `dx` the step.
- dx
Parent:data[type=funnel]
Type: number
Default:1Sets the x coordinate step. See `x0` for more info.
- y
Parent:data[type=funnel]
Type: data arraySets the y coordinates.
- y0
Parent:data[type=funnel]
Type: number or categorical coordinate string
Default:0Alternate to `y`. Builds a linear space of y coordinates. Use with `dy` where `y0` is the starting coordinate and `dy` the step.
- dy
Parent:data[type=funnel]
Type: number
Default:1Sets the y coordinate step. See `y0` for more info.
- width
Parent:data[type=funnel]
Type: number greater than or equal to 0Sets the bar width (in position axis units).
- offset
Parent:data[type=funnel]
Type: numberShifts the position where the bar is drawn (in position axis units). In "group" barmode, traces that set "offset" will be excluded and drawn in "overlay" mode instead.
- text
Parent:data[type=funnel]
Type: string or array of strings
Default:""Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels.
- textposition
Parent:data[type=funnel]
Type: enumerated or array of enumerateds , one of ("inside"|"outside"|"auto"|"none")
Default:"auto"Specifies the location of the `text`. "inside" positions `text` inside, next to the bar end (rotated and scaled if needed). "outside" positions `text` outside, next to the bar end (scaled if needed), unless there is another bar stacked on this one, then the text gets pushed inside. "auto" tries to position `text` inside the bar, but if the bar is too small and no bar is stacked on this one the text is moved outside. If "none", no text appears.
- texttemplate
Parent:data[type=funnel]
Type: string or array of strings
Default:""Template string used for rendering the information text that appears on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example "y: %{y}". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can't be found will be replaced with the specifier. For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Finally, the template string has access to variables `percentInitial`, `percentPrevious`, `percentTotal`, `label` and `value`.
- texttemplatefallback
Parent:data[type=funnel]
Type: number or categorical coordinate string
Default:-Fallback string that's displayed when a variable referenced in a template is missing. If the boolean value 'false' is passed in, the specifier with the missing variable will be displayed.
- hovertext
Parent:data[type=funnel]
Type: string or array of strings
Default:""Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. To be seen, trace `hoverinfo` must contain a "text" flag.
- hoverinfo
Parent:data[type=funnel]
Type: flaglist string. Any combination of"name","x","y","text","percent initial","percent previous","percent total"joined with a"+"OR"all"or"none"or"skip".
Examples:"name","x","name+x","name+x+y","all"
Default:"all"Determines what trace information appears on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired.
- hovertemplate
Parent:data[type=funnel]
Type: string or array of strings
Default:""Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example "y: %{y}" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, "xother" will be added to those with different x positions from the first point. An underscore before or after "(x|y)other" will add a space on that side, only when this field is shown. Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can't be found will be replaced with the specifier. For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, all attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Finally, the template string has access to variables `percentInitial`, `percentPrevious` and `percentTotal`. Anything contained in tag `<extra>` is displayed in the secondary box, for example `<extra>%{fullData.name}</extra>`. To hide the secondary box completely, use an empty tag `<extra></extra>`.
- hovertemplatefallback
Parent:data[type=funnel]
Type: number or categorical coordinate string
Default:-Fallback string that's displayed when a variable referenced in a template is missing. If the boolean value 'false' is passed in, the specifier with the missing variable will be displayed.
- xhoverformat
Parent:data[type=funnel]
Type: string
Default:""Sets the hover text formatting rule for `x` using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: "%h" for half of the year as a decimal number as well as "%{n}f" for fractional seconds with n digits. For example, "2016-10-13 09:15:23.456" with tickformat "%H~%M~%S.%2f" would display "09~15~23.46"By default the values are formatted using `xaxis.hoverformat`.
- yhoverformat
Parent:data[type=funnel]
Type: string
Default:""Sets the hover text formatting rule for `y` using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: "%h" for half of the year as a decimal number as well as "%{n}f" for fractional seconds with n digits. For example, "2016-10-13 09:15:23.456" with tickformat "%H~%M~%S.%2f" would display "09~15~23.46"By default the values are formatted using `yaxis.hoverformat`.
- meta
Parent:data[type=funnel]
Type: number or categorical coordinate stringAssigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace index.
- customdata
Parent:data[type=funnel]
Type: data arrayAssigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, "scatter" traces also appends customdata items in the markers DOM elements
- xaxis
Parent:data[type=funnel]
Type: subplotid
Default:xSets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on.
- yaxis
Parent:data[type=funnel]
Type: subplotid
Default:ySets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on.
- orientation
Parent:data[type=funnel]
Type: enumerated , one of ("v"|"h")Sets the orientation of the funnels. With "v" ("h"), the value of the each bar spans along the vertical (horizontal). By default funnels are tend to be oriented horizontally; unless only "y" array is presented or orientation is set to "v". Also regarding graphs including only 'horizontal' funnels, "autorange" on the "y-axis" are set to "reversed".
- alignmentgroup
Parent:data[type=funnel]
Type: string
Default:""Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
- offsetgroup
Parent:data[type=funnel]
Type: string
Default:""Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
- xperiod
Parent:data[type=funnel]
Type: number or categorical coordinate string
Default:0Only relevant when the axis `type` is "date". Sets the period positioning in milliseconds or "M<n>" on the x axis. Special values in the form of "M<n>" could be used to declare the number of months. In this case `n` must be a positive integer.
- xperiodalignment
Parent:data[type=funnel]
Type: enumerated , one of ("start"|"middle"|"end")
Default:"middle"Only relevant when the axis `type` is "date". Sets the alignment of data points on the x axis.
- xperiod0
Parent:data[type=funnel]
Type: number or categorical coordinate stringOnly relevant when the axis `type` is "date". Sets the base for period positioning in milliseconds or date string on the x0 axis. When `x0period` is round number of weeks, the `x0period0` by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.
- yperiod
Parent:data[type=funnel]
Type: number or categorical coordinate string
Default:0Only relevant when the axis `type` is "date". Sets the period positioning in milliseconds or "M<n>" on the y axis. Special values in the form of "M<n>" could be used to declare the number of months. In this case `n` must be a positive integer.
- yperiodalignment
Parent:data[type=funnel]
Type: enumerated , one of ("start"|"middle"|"end")
Default:"middle"Only relevant when the axis `type` is "date". Sets the alignment of data points on the y axis.
- yperiod0
Parent:data[type=funnel]
Type: number or categorical coordinate stringOnly relevant when the axis `type` is "date". Sets the base for period positioning in milliseconds or date string on the y0 axis. When `y0period` is round number of weeks, the `y0period0` by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.
- marker
Parent:data[type=funnel]
Type: object containing one or more of the keys listed below.- autocolorscale
Parent:data[type=funnel].marker
Type: boolean
Default:trueDetermines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.colorscale`. Has an effect only if in `marker.color` is set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed.
- cauto
Parent:data[type=funnel].marker
Type: boolean
Default:trueDetermines whether or not the color domain is computed with respect to the input data (here in `marker.color`) or the bounds set in `marker.cmin` and `marker.cmax` Has an effect only if in `marker.color` is set to a numerical array. Defaults to `false` when `marker.cmin` and `marker.cmax` are set by the user.
- cmax
Parent:data[type=funnel].marker
Type: numberSets the upper bound of the color domain. Has an effect only if in `marker.color` is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmin` must be set as well.
- cmid
Parent:data[type=funnel].marker
Type: numberSets the mid-point of the color domain by scaling `marker.cmin` and/or `marker.cmax` to be equidistant to this point. Has an effect only if in `marker.color` is set to a numerical array. Value should have the same units as in `marker.color`. Has no effect when `marker.cauto` is `false`.
- cmin
Parent:data[type=funnel].marker
Type: numberSets the lower bound of the color domain. Has an effect only if in `marker.color` is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmax` must be set as well.
- color
Parent:data[type=funnel].marker
Type: color or array of colorsSets the marker color. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set.
- coloraxis
Parent:data[type=funnel].marker
Type: subplotidSets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", "coloraxis3", etc. Settings for these shared color axes are set in the layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis.
- colorbar
Parent:data[type=funnel].marker
Type: object containing one or more of the keys listed below.- bgcolor
Parent:data[type=funnel].marker.colorbar
Type: color
Default:"rgba(0,0,0,0)"Sets the color of padded area.
- bordercolor
Parent:data[type=funnel].marker.colorbar
Type: color
Default:"#444"Sets the axis line color.
- borderwidth
Parent:data[type=funnel].marker.colorbar
Type: number greater than or equal to 0
Default:0Sets the width (in px) or the border enclosing this color bar.
- bgcolor
- autocolorscale