HTML Elements Forums Chart Disable whole chart?

This topic contains 2 replies, has 2 voices, and was last updated by Avatar Aks26 2 weeks, 5 days ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #100679
    Avatar
    Aks26
    Participant

    Is there a way that I can use to disable interactibility with the whole gantt chart itself? That means the user should not be able to drag, resize, double-click etc. the chart and it will only be there as a readonly component.

    #100680
    Avatar
    Hristofor
    Participant

    Hi Aks26,

    disabled property should disable the element but there seems to be an issue with it that will be fixed in the next release. May I suggest adding the following CSS to accomplish the same result in disabling user interaction for the component:

    
    smart-gantt-chart {
        cursor: default;
        pointer-events: none;
    }
    

    You can specify the CSS selector to work only when adding the disabled attribute or something else (smart-gantt-chart[attribute-name]).

    Furthermore, you can disable resizing or dragging for individual tasks via the disableResize/disableDrag attributes. You can do that in the task definition in dataSource or dynamically via the updateTask method. Here’s a demo

    Best Regards,
    Christopher

    Smart HTML Elements Team
    https://www.htmlelements.com

    #100681
    Avatar
    Aks26
    Participant

    Thanks a lot! It works.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.