Hello,
I'm having difficulty using the Interactive Charting tool to change the colors on charts that are produced when Batch Mode is on.
When not producing charts in Batch mode, I appear to be able to select a color palette and it will apply the new palette as desired.
However, if I am in batch mode, it does a very strange thing where selecting a new color palette only seems to adjust a single color in the "active" palette. And it doesn't seem to apply properly when the workflow is subsequently run.
Is there something special that needs to be done to successful select a different color palette for charts produced in Batch mode?
Thanks
Solved! Go to Solution.
Hey @lheureuxg
There is a way to do this. Takes a little bit of work but you have tons of flexibility here. You need to build your batch reports first then modify. There isn't a way to do this in chart tool. See attached workflow
Hope this helps! If so please mark as solved so others can see it
Hi @joshuaburkhow ,
Thanks for the suggestion. I might need a bit more help on the PCXML edit, as nothing I do seems to adjust the colors. I'm rendering, for example, a pie chart, and I'm targeting the rbg(X, X, X) values inside the PCXML for replaces for each "slice".
But even though the replaces work and the colors are very different from what they were originally, the pie chart doesn't render any differently.
<g class=""slice""><path class=""surface"" d=""M336,434.5l-79.10835055998656,243.4704681715593a256,256 0 0 1 -176.89164944001345,-243.47046817155933Z"" style=""pointer-events: all; stroke-width: 0; fill: rgb(44, 160, 44); ....
<g class=""slice""><path class=""surface"" d=""M336,434.5l-79.10835055998656,243.4704681715593a256,256 0 0 1 -176.89164944001345,-243.47046817155933Z"" style=""pointer-events: all; stroke-width: 0; fill: rgb(0, 0, 44); ....
They still produce a slice of rgb(44, 160, 44).
After a bit of wrangling, I got this suggestion to work. A couple things I'll note.
First, for pie charts, I found it was necessary to insert after the <layout> tag in order to make it look something like the following:
<layout>{"piecolorway":["#0a0a0a","#b3b4b5","#729103","#aa5566"],
This made the pie chart follow my color scheme for the first X colors (and then, quite nicely, adopt slightly different hues for the next X, and so on...)
For bar charts, I needed to do something slightly different:
<layout>{"colorway":["#0a0a0a","#b3b4b5","#729103","#aa5566"],
(For either of these, note the comma at the end, which allows the other parts of the layout JSON to follow.
For bar charts, it simply repeated the colors, it didn't adjust the hue after the first X. That was okay for my purposes though.
Not easy, but it is getting the job done.
ONE MORE THING:
If you've played around with the colors on your chart at all, you may find it necessary to reset the chart, rebuild it, and keep your hands off the color selections - otherwise, it seems that some settings remain in the PCXML for your chart and can override the "colorway" or "piecolorway" tag settings.
Holy Smokes @lheureuxg This is awesome! So happy you got it to work!
We need to build a macro to handle this easily 😉