Vue Funnel - label

Configures funnel item labels.

Type:

Object

backgroundColor

Colors the labels' background. The default color is inherited from the funnel items.

Type:

String

This property supports the following colors:

You can remove the label's background by setting this property to "none". In this case, the label's text is the same color as the funnel item.

View Demo

border

Configures the label borders.

Type:

Object

connector

Configures label connectors.

Type:

Object

A label is always displayed near its funnel item, but separately from it. Use a connector to make the relationship between the funnel item and its label evident.

Set the label.connector.visible property to true to make the label connectors visible.

customizeText

Customizes labels' text.

Type:

Function

Function parameters:
itemInfo:

Object

Information on the funnel item.

Object structure:
Name Type Description
item

Funnel Item

The Item object.

percent

Number

The item's percentage value.

percentText

String

The item's formatted percentage value converted to a string.

value

Number

The raw item value.

valueText

String

The item's formatted value converted to a string.

Return Value:

String

The text for the label to display.

Cannot be used in themes.

NOTE
As an alternative to the function’s parameter you can use the this keyword.

View Demo

font

Specifies labels' font properties.

Type:

Object

format

Formats the item value before displaying it in the label.

Type:

Format

Default Value: undefined

This property accepts an object whose fields are described in the format section. The percentPrecision filed specifies how many decimal places should be included in the percentage value. See an example in the following code:

format: {
    type: "fixedPoint", // the format of absolute values
    precision: 1, // the precision of absolute values (0.123456 --> 0.1)
    percentPrecision: 2 // the precision of percentage values (12.3456 % --> 12.34 %)
}
NOTE
DevExtreme UI components provide a wide choice of predefined formats. If you are going to use custom formats instead, link the Globalize library to your project as shown in the Installation section.

horizontalAlignment

Specifies labels' position in relation to the funnel items.

Type:

String

Default Value: 'right'
Accepted Values: 'left' | 'right'

Use the HorizontalEdge enum to specify this property when the UI component is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: Left and Right.

horizontalOffset

Moves labels from their initial positions.

Type:

Number

Default Value: 0

The number assigned to this property specifies the shift in pixels. A negative number shifts the labels to the left, a positive number - to the right.

position

Specifies whether to display labels inside or outside funnel items or arrange them in columns.

Type:

String

Default Value: 'columns'
Accepted Values: 'columns' | 'inside' | 'outside'

Use the FunnelLabelPosition enum to specify this property when the UI component is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: Inside, Outside, and Columns.

View Demo

showForZeroValues

Specifies whether to show labels for items with zero value.

Type:

Boolean

Default Value: false

textOverflow

Specifies what to do with label texts that overflow the allocated space after applying wordWrap: hide, truncate them and display an ellipsis, or do nothing.

Type:

String

Default Value: 'ellipsis'
Accepted Values: 'ellipsis' | 'hide' | 'none'

Use the VizTextOverflow enum to specify this property when the UI component is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: Ellipsis, Hide, and None.

visible

Controls the labels' visibility.

Type:

Boolean

Default Value: true

wordWrap

Specifies how to wrap label texts if they do not fit into a single line.

Type:

String

Default Value: 'normal'
Accepted Values: 'normal' | 'breakWord' | 'none'

The following modes are available:

  • "normal"
    Text breaks only at allowed breakpoints (for example, a space between two words).

  • "breakWord"
    Words can be broken if there are no available breakpoints in the line.

  • "none"
    Word wrap is disabled.

If the text overflows the container even after word wrap, the UI component applies the textOverflow property.

Use the VizWordWrap enum to specify this property when the UI component is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: Normal, BreakWord, and None.