Carl Buckley
Carl Buckley

Reputation: 23

Change default button from Open/Close to Just Close in Gantt Visual

I have been using Davide Bacci Deneb gantt visual and I have a question: is it possibly to default the 'Open/Close' button to 'Close'?

When I select a filter it responds but it automatically defaults to open, whereas I would like to keep this closed.

I have utilized a measure to allow me to change the phase dynamically and this is working fine, however the 'open/close' is the only issue I have?

I have looked in the code but cannot see any default options of places to make the change

Upvotes: 1

Views: 79

Answers (1)

davidebacci
davidebacci

Reputation: 30304

Move the collapsedPhases dataset below the phases dataset and update it to include a new trigger as follows:

 {
      "name": "collapsedPhases",
      "on": [
        {"trigger": "phaseClicked", "toggle": "phaseClicked"},
        {"trigger": "closeAll", "remove": true},
        {"trigger": "true", "insert": "data('phases')"},
        {"trigger": "closeAll", "insert": "data('phases')"},
        {"trigger": "openAll", "remove": true}
      ]
    },

Link

enter image description here

Upvotes: 0

Related Questions