This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
When creating a pie chart using the Interactive Chart tool, it's only possible to choose between predefined color palettes, and I need to change the color palette to a customized, but don't know how. Can any guide me to a xml-file where I can create a customized palette or know how to change create a my own palette?
Hello @CharlottePonikowski, you can use the ReportSettings.xml in C:\Program Files\Alteryx\bin\RuntimeData to add custom chart colors. The chart tool will apply each color in order, so you can set up the custom palate to have the order you want.
Thanks for your replay. The problem is, that I do not have this option when making a pie chart. I can only choose a pre-defined color palette (see picture), så think the solution should be to create my own color-palette.
Thanks for your replay! I think you are right about that I need to add a palette to an xml file. I tried to add it in the one you are pointing to, but unfortunately it didn't work. I think it needs to be done directly to the file related to the Interactive Chart tool, which as far as i know is by Plotly, and can't find. Don't know if it is even possible..
I found that the \RuntimeData\HtmlAssets\Charting\ayx-chart-editor-tool.bundle.js file contains the color scheme property values in the Interactive Chart tool. You can find the swatch properties about half way through the code. 🙂
For anyone else who happens upon this thread, here's a little more detail on @JPL's suggestion to edit the bundle.js file...
Note: I am using Alteryx Designer 2019.2, and it looks like the file is now called bundle.js (I don't have a file called ayx-chart-editor-tool.bundle.js)
Navigate to C:\Program Files\Alteryx\bin\RuntimeData\HtmlAssets\Charting
Right-click on bundle.js --> Properties --> un-check Read Only
Make a backup copy of bundle.js, in case you need to go back to the original.
Go to the start menu and search for WordPad (or your text editor of choice)
Right-click on WordPad --> Run as Administrator
In WordPad, navigate to C:\Program Files\Alteryx\bin\RuntimeData\HtmlAssets\Charting\bundle.js
Ctrl+F to search for BREWER = exports.BREWER At that point in the file, you will see three arrays listing the different palette names for each type of palette (sequential, divergent, categorical. In my case, I am going to add a new categorical palette called CFA20.
Add your new palette name to the array, making sure to follow the syntax _('palletname') and delimit with commas.
Next, you will see a _defineProperty statement for each palette. You will need to add one for each new palette. The array originally contained 6 palettes (categoricalKeys 0-5), and we added a seventh, so my new palette will be categoricalKeys.
I added the highlighted part below for my new palette:
Edit the array of hex codes as necessary to add your custom palette, making sure to follow the syntax with single quotes, comma delimited.
Save and close the file. You may also want to save a copy of the file in a different location, in case it is overwritten when you upgrade or reinstall.
Now your new palette will be available in the layer tab of the Interactive Chart tool: