ChartUpdater removes style on columns
Home › Forums › PresentationML › ChartUpdater removes style on columns
- This topic has 3 replies, 2 voices, and was last updated 9 years, 8 months ago by
noxrep.
-
AuthorPosts
-
June 7, 2016 at 12:32 pm #3439
noxrep
ParticipantUpdate: I have set the chart colors by accessing
ChartPart -> ChartSpace -> BarChart -> BarchartSeries -> SolidFill .-> SchemeColor -> SchemeColorValues
However, when I set this value – even if I set it to an existing color such as SchemeColorValues.Accent3 – it will lock the color in the presentation. When I later open the finished file and change the theme via the Design tab, the chart’s color will stick around even as the entire rest of the presentation changes to fit the new theme’s color palette.
I thought that setting the color to one from the SchemeColorValues enum would allow the color to change with the theme, but apparently this does not happen.
June 13, 2016 at 6:44 pm #3472Eric White
KeymasterI am quite sure that there is a difference in markup between setting the color directly, and setting the color to one of the colors of the theme. Unfortunately, I don’t know what the difference is without doing the research.
I would take the approach of creating a presentation that uses one of the colors of the theme, saving it, copying it, then changing the copy to use a different one of the colors of the theme, and then using the Open Xml SDK Productivity Tool to compare the two, thereby finding out how to change the color to use any of the colors of the theme. This process is demonstrated in the following screen-cast.
Please let me know how you get on.
-Eric
June 21, 2016 at 11:35 am #3517noxrep
ParticipantThank you for your reply. We put the color issue aside for a while to work on other things, but now that I’ve come back to it I managed to fix the problem.
After running ChartUpdater, the issue with only the first theme color being used for all series persisted. I then set the colors by changing the value of SchemeColor. As I mentioned in my second post, this worked but appeared to lock the chart to always use those colors.
When I used the Productivity Tool to look over the file, the only references I could find to specific color values were in our custom theme definition; the actual charts used values like “Accent1” and so on. After changing the theme, however, there would be two themes defined in the document, with some charts using the original and others using the new theme.
As it turns out, the template we were using already had its colors locked. This must have happened at some point while the template was being updated by our designer, and from what I can find on the ‘net this seems to be a relatively common issue with custom presentation themes. After going over the charts in the template and resetting them to default styles, we were able to shake off the “stuck” formatting.
We then reapplied out custom theme, and everything seems to work now. When we export our reports, the theme can now be changed without any formatting from the original theme staying behind.
Thank you for your time.
-
AuthorPosts
- You must be logged in to reply to this topic.