Forum Discussion

rvickersevotix's avatar
rvickersevotix
Cloud Apps
11-24-2023
Solved

Custom Colour Palette using Dashboard Script

I want to be able to override the dashboard palette with my own set of colours, without building a custom set that i can just pick from the option at the top of the dashboard.

  • rapidbisupport's avatar
    rapidbisupport
    11-28-2023

    Thanks for trying, sorry it didn't work for you.

    Another way could be:

     

    dashboard.on('initialized', (d, args) => {
      d.style.setPalette({ colors:  ['#00F6FF', '#CB9340','#0A223E','#E8F2FB','#2D5B70','#9A9A9A'] }) // your palette here
    })
    
    

     

    I have tested this on my side, and it does change the palette colours like the first solution.

    This solution is slightly different in that it adds a temporary non-system option in the themes selection.

    Let me know how you go with this one?

    Thanks,

    Daniel

    RAPID BI

    [email protected]

    RAPID BI - Sisense Professional Services | Implementations | Custom Add-ons

7 Replies

Replies have been turned off for this discussion
  • Hi rvickersevotix , 

    You should be able to achieve this using the dashboard script below:

     

    dashboard.on('initialized', (d, args) => {
      d.style.$$palette.colors = ['#000000', '#000000'] // your palette here
    })
    

     

    This one isn't persistent either, so if you'd like to revert, just delete or comment out the script.

    Let me know if this works for you?

    Thanks,

    Daniel

    RAPID BI

    [email protected]

    RAPID BI - Sisense Professional Services | Implementations | Custom Add-ons

    • rvickersevotix's avatar
      rvickersevotix
      Cloud Apps

      Hi,

       

      Thanks for this, however it didnt seem to work, all I did was add some random extra colours to the palette list.

      dashboard.on('initialized', (d, args) => {
        d.style.$$palette.colors = ['#00F6FF', '#CB9340','#0A223E','#E8F2FB','#2D5B70','#9A9A9A'] // your palette here
      });
      • rapidbisupport's avatar
        rapidbisupport
        Data Pipeline

        Thanks for trying, sorry it didn't work for you.

        Another way could be:

         

        dashboard.on('initialized', (d, args) => {
          d.style.setPalette({ colors:  ['#00F6FF', '#CB9340','#0A223E','#E8F2FB','#2D5B70','#9A9A9A'] }) // your palette here
        })
        
        

         

        I have tested this on my side, and it does change the palette colours like the first solution.

        This solution is slightly different in that it adds a temporary non-system option in the themes selection.

        Let me know how you go with this one?

        Thanks,

        Daniel

        RAPID BI

        [email protected]

        RAPID BI - Sisense Professional Services | Implementations | Custom Add-ons