Do you know the History of Data Science? READ MORE

custom palette plugin

amalkh
Level 1
custom palette plugin

Hi everyone, i'm creating some charts but i need some specific colors so i created a custom palette with the colors that i want but i want to use it on other charts automatically without having to copy it each time, so i tried to export the palette to a plugin and i get this code

dkuColorPalettes.addDiscrete({
"id": undefined,
"name": undefined,
"category": "Plugin palettes",
"colors": ["rgb(102,166,30)","rgb(230,171,2)","rgb(166,118,29)","#FF0011","#190011"],
"values": [null,null,null,null,null]
});

but i dont know how i'm suppose to use it to create the plugin, can any one help me? Thanks

0 Kudos
3 Replies
AshleyW
Dataiker
Dataiker

Hi @amalkh ,

Here's how you'd create the plugin:

  1. from the window where you edit the color palette, click on 'export to plugin'
  2. you'll be taken to a window titled, "create custom palette plugin", where you no doubt got that snippet of code
  3. click on 'create a new plugin with this snippet' and follow the instructions there. Call your plugin something like 'color palettes' so it's easy to find again.
  4. click on create plugin

What you've just done is created a plugin that you can go back to (find it by going to your instance's 'dev' plugins) and later add any number of color palettes by modifying the palette.js file that you'll find there.You can even associate values to those colors so that they consistently color-code correctly in charts

I hope this helps!

PS. we're also working on improving the use of colors in charts. if you have a moment over the next few weeks and would like to show us what you're using a custom color palette for, please PM me! I'd love to chat

amalkh
Level 1
Author

@AshleyW 

Well i followed what you said step by step , when i click on create plugin nothing happen, and i can't find any instance dev plugins with the plugin name that i chose

PS: I'm using Dataiku DSS version 7.0.2

0 Kudos
AshleyW
Dataiker
Dataiker

Hi @amalkh ,

You may not be seeing anything happening when you click on the create plugin button because the user group that you belong to doesn't have the permissions to create development plugins. As a workaround, you might ask the admin of your DSS instance to create the custom color palette plugin for you using the steps I mentioned above.

Best,

Ashley

0 Kudos
A banner prompting to get Dataiku DSS