Forum Discussion

amritbhgt's avatar
amritbhgt
Cloud Apps
01-08-2024
Solved

Need to change the filter colors when something is selected

Hi All, I have several filters in my dashboard, i want to change the colors when something is selected in the filters to distinguish between selected and unselected filters .  currently i am using ...
  • Benji_PaldiTeam's avatar
    01-11-2024

    Hi amritbhgt ,

    Here are some options to achieve this:

    1. Use below dashboard script to change the color of selected/unselected filters

    
    dashboard.on('refreshstart', function(dashboard, args){
    	
    	//color of selected filters
    	$('.uc-tag').css('background-color','#0f8037');
    	$('.uc-tag').css('color','white');
    	
    	//color of Include all
    	$('.uc-tag[title="Include all"]').css('background-color','#006ecf');
    	$('.uc-tag[title="Include all"]').css('color','white');
    
    	//color of unselected filters
    	$('.uc-tagline-content.exclude .uc-tag').css('background-color','#ab204f');
    	$('.uc-tagline-content.exclude .uc-tag').css('color','white');
    
    }) 

     

    2. Use Paldi premium Control Filter Colors plugin which will allow you to configure the colors and you don't need to apply any script in each dashboard.

     

     

    Feel free to reach out if you have further questions, we're always happy to help 🙂
    inquiries@paldi.solutions 
    Paldi Solutions, Number #1 Sisense Plugins Developer

     

  • Benji_PaldiTeam's avatar
    Benji_PaldiTeam
    01-12-2024

    Hi amritbhgt ,

    Make sure sure there is no other script in the dashboard/widgets to change the color of filters.

    $('.uc-tag').css('background-color','#006ecf');
    $('.uc-tag').css('color','white');

    Also make sure there is no other plugin that changes the color of filters.

    It would be good to try the script on  a new dashboard to verify it.

     

    Feel free to reach out if you have further questions, we're always happy to help

    inquiries@paldi.solutions 
    Paldi Solutions, Number #1 Sisense Plugins Developer