User Interaction
When a user presses or hovers over funnel items, they change their style to the one specified by the item.hoverStyle object.
- <template>
- <DxFunnel ... >
- <DxItem ... >
- <DxHoverStyle>
- <DxHatching direction="left" />
- </DxHoverStyle>
- </DxItem>
- </DxFunnel>
- </template>
- <script>
- import DxFunnel, {
- DxItem,
- DxHoverStyle,
- DxHatching
- } from 'devextreme-vue/funnel';
- export default {
- components: {
- DxFunnel,
- DxItem,
- DxHoverStyle,
- DxHatching
- }
- }
- </script>
If you need to disable this feature, set the hoverEnabled property to false.
- <template>
- <DxFunnel :hover-enabled="false" />
- </template>
- <script>
- import DxFunnel from 'devextreme-vue/funnel';
- export default {
- components: {
- DxFunnel
- }
- }
- </script>
API
You can change a funnel item's hover state by passing true or false to the item's hover(state) method. To check whether the funnel item is currently hovered over, call its isHovered() method.
- <script>
- export default {
- methods: {
- toggleItemHoverState (item) {
- item.hover(!item.isHovered());
- }
- }
- }
- </script>
See Also
Events
When a funnel item's hover state is being changed, the Funnel raises the hoverChanged event that you can handle with a function. If the handling function is not going to be changed during the lifetime of the UI component, assign it to the onHoverChanged property when you configure the UI component. To check whether the pointer entered or left a funnel item, call the item's isHovered() method.
- <template>
- <DxFunnel
- @hover-changed="onHoverChanged"
- />
- </template>
- <script>
- import DxFunnel from 'devextreme-vue/funnel';
- export default {
- components: {
- DxFunnel
- },
- methods: {
- onHoverChanged (e) {
- if (e.item.isHovered()) {
- // Commands to execute when the pointer enters the item
- } else {
- // Commands to execute when the pointer leaves the item
- }
- }
- }
- }
- </script>
See Also
If you have technical questions, please create a support ticket in the DevExpress Support Center.