а

Change skin of gantt chart on slider click


#1

Hello,

I was wondering how can I change the selected skin of the chart by clicking on a slider? Currently my website has a Light/Dark theme slider and the gantt chart theme should change accordingly.

I see there is the dhtmlxgantt_contrast_black.css which would be very fitting for my theme.

Thank you in advance!


#2

Nobody? Really? I’m still not able to figure it out…


#3

Hi @Gouvernment,
In order to do this, you should change the link to the css file with theme from your js code.
I made a little example of how it could be done in this snippet :
https://snippet.dhtmlx.com/8b8dce88e
I added change CSS action to the usual button, but you can do a similar thing with your slider button.


#4

Thank you for the response, but I did it with SCSS. Just imported the theme depending on which class I have on my container element. Worked like a charm :slight_smile: