Forum Discussion

viswanath's avatar
viswanath
Cloud Apps
01-18-2022
Solved

Setting the Borders for Individual Widgets in the Dashboard

Hi All,

Is there any way to set the borders for particular individual widgets in the Dashboard? I have found the Dashboard script where it will apply the the style settings for all the widgets in it. But would like to know to set the style settings for an individual widget in the Dashboard?  

  • viswanath Please try below dashboard script (update the array widgetlist with list of widget Ids): 

     

    dashboard.on('widgetready', function(sender, ev){
    	widgetlist = ['5sd2c75601eafb7y02d4bce89', '61r4d1fb65c615646ee3t523']
    	
    	$.each(widgetlist, function(index, value){
    		widgetelement = $('[widgetid = "' + value + '"]', element)
    		widgetelement.css('border', '10px solid #000')
    		widgetelement.css('border-radius', '15px')
    	})
    })
    

     

     

3 Replies

Replies have been turned off for this discussion
  • harikm007's avatar
    harikm007
    Data Warehouse

    viswanath Please try below dashboard script (update the array widgetlist with list of widget Ids): 

     

    dashboard.on('widgetready', function(sender, ev){
    	widgetlist = ['5sd2c75601eafb7y02d4bce89', '61r4d1fb65c615646ee3t523']
    	
    	$.each(widgetlist, function(index, value){
    		widgetelement = $('[widgetid = "' + value + '"]', element)
    		widgetelement.css('border', '10px solid #000')
    		widgetelement.css('border-radius', '15px')
    	})
    })
    

     

     

  • harikm007 This works perfect!  How do I set the widget-header css changes now?  Code below shows original settings that worked - Now i just need to translate that to this script and my headers will now be super fancy!