At the dashboard level we given an option of applying HTML, CSS and JS. At the entire dashboard we can apply these code or we can also simply right click and apply as well for any specific component.
Browser console can also be used to inspect and findout the div id, class, html tag etc to apply these kind of function. Aside when we do right click on any component in dashboard designer and go to either CSS or JS, then we can see the component id (or div id) which can also be used.
Below are some of the examples of using JS CSS etc at dashboard level.
1. Usage of java script at dashboard for triggering logout API
Use the ID and write below code in JS editor :
$("#w8d69gnlul9").on('click',function(){ window.open(window.baseUrl+"j_spring_security_logout",'_self'); });
Save the JS code and Dashboard as well . When we click on LOGOUT Button it will trigger
The JS code and executes that API.
2. Usage of CSS code at the Dashboard Level for rounded corners of the chart
Inspect and apply below css on class :
.component-container{ border: 2px solid #ccc; border-radius: 10px; }