All docs
V20.2
24.1
23.2
23.1
22.2
22.1
21.2
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2.
19.1
The page you are viewing does not exist in version 19.1.
18.2
The page you are viewing does not exist in version 18.2.
18.1
The page you are viewing does not exist in version 18.1.
17.2
The page you are viewing does not exist in version 17.2.
A newer version of this page is available. Switch to the current version.

jQuery Funnel - Overview

A tooltip is a small pop-up rectangle that displays information about a funnel item if it is pressed or the mouse pointer hovers over it. The information is the item's argument and value by default, but it is possible to display anything in a tooltip.

Funnel Tooltip

All properties configuring tooltips are collected in the tooltip object. For example, to enable tooltips, assign true to this object's enabled property.

jQuery
JavaScript
$(function() {
    $("#funnelContainer").dxFunnel({
        // ...
        tooltip: {
            enabled: true
        }
    });
});
Angular
HTML
TypeScript
<dx-funnel ... >
    <dxo-tooltip
        [enabled]="true">
    </dxo-tooltip>
</dx-funnel>
import { DxFunnelModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxFunnelModule
    ],
    // ...
})
Vue
App.vue
<template> 
    <DxFunnel ... >
        <DxTooltip :enabled="true" />
    </DxFunnel>
</template>

<script>
import DxFunnel, {
    DxTooltip
} from 'devextreme-vue/funnel';

export default {
    components: {
        DxFunnel,
        DxTooltip
    }
}
</script>
React
App.js
import React from 'react';
import Funnel, { Tooltip } from 'devextreme-react/funnel';

class App extends React.Component {
    render() {
        return (
            <Funnel ... >
                <Tooltip enabled={true} />
            </Funnel>
        );
    }
}

export default App;

Properties declared in the tooltip object apply to all tooltips in the Funnel. If you want to customize a specific tooltip, assign a function to the customizeTooltip property. This function must return an object with properties for the tooltip you want to customize.

jQuery
JavaScript
$(function() {
    $("#funnelContainer").dxFunnel({
        // ...
        tooltip: {
            enabled: true,
            color: 'yellow',
            // Tooltips of all items with the value more than 100 turn red
            // Other tooltips remain yellow
            customizeTooltip: function (itemInfo) {
                return itemInfo.value > 100 ? { color: 'red' } : { }
            }
        }
    });
});
Angular
HTML
TypeScript
<dx-funnel ... >
    <dxo-tooltip
        [enabled]="true"
        color="yellow"
        [customizeTooltip]="customizeTooltip">
    </dxo-tooltip>
</dx-funnel>
import { DxFunnelModule } from "devextreme-angular";
// ...
export class AppComponent {
    // Tooltips of all items with the value more than 100 turn red
    // Other tooltips remain yellow
    customizeTooltip (itemInfo) {
        return itemInfo.value > 100 ? { color: 'red' } : { }
    };
}
@NgModule({
    imports: [
        // ...
        DxFunnelModule
    ],
    // ...
})
Vue
App.vue
<template> 
    <DxFunnel ... >
        <DxTooltip
            :enabled="true"
            color="yellow"
            :customize-tooltip="customizeTooltip"
        />
    </DxFunnel>
</template>

<script>
import DxFunnel, {
    DxTooltip
} from 'devextreme-vue/funnel';

export default {
    components: {
        DxFunnel,
        DxTooltip
    },
    methods: {
        customizeTooltip (itemInfo) {
            return itemInfo.value > 100 ? { color: 'red' } : { }
        }
    }
}
</script>
React
App.js
import React from 'react';
import Funnel, { Tooltip } from 'devextreme-react/funnel';

class App extends React.Component {
    render() {
        return (
            <Funnel ... >
                <Tooltip
                    enabled={true}
                    color="yellow"
                    customizeTooltip={this.customizeTooltip}
                />
            </Funnel>
        );
    }
    customizeTooltip (itemInfo) {
        return itemInfo.value > 100 ? { color: 'red' } : { }
    }
}

export default App;
See Also