Angular Funnel - Hover

User Interaction

When a user presses or hovers over funnel items, they change their style to the one specified by the item.hoverStyle object.

HTML
TypeScript
  • <dx-funnel ... >
  • <dxo-item>
  • <dxo-hover-style>
  • <dxo-hatching direction="left"></dxo-hatching>
  • </dxo-hover-style>
  • </dxo-item>
  • </dx-funnel>
  • import { DxFunnelModule } from "devextreme-angular";
  • // ...
  • export class AppComponent {
  • // ...
  • }
  • @NgModule({
  • imports: [
  • // ...
  • DxFunnelModule
  • ],
  • // ...
  • })

If you need to disable this feature, set the hoverEnabled property to false.

HTML
TypeScript
  • <dx-funnel ...
  • [hoverEnabled]="false">
  • </dx-funnel>
  • import { DxFunnelModule } from "devextreme-angular";
  • // ...
  • export class AppComponent {
  • // ...
  • }
  • @NgModule({
  • imports: [
  • // ...
  • DxFunnelModule
  • ],
  • // ...
  • })

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.

TypeScript
  • import { DxFunnelModule } from "devextreme-angular";
  • // ...
  • export class AppComponent {
  • toggleItemHoverState (item) {
  • item.hover(!item.isHovered());
  • }
  • }
  • @NgModule({
  • imports: [
  • // ...
  • DxFunnelModule
  • ],
  • // ...
  • })
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.

HTML
TypeScript
  • <dx-funnel ...
  • (onHoverChanged)="onHoverChanged($event)">
  • </dx-funnel>
  • import { DxFunnelModule } from "devextreme-angular";
  • // ...
  • export class AppComponent {
  • 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
  • }
  • };
  • }
  • @NgModule({
  • imports: [
  • // ...
  • DxFunnelModule
  • ],
  • // ...
  • })
See Also