Set specific color for a Legend in a dynamic Pivot Chart - excel

I have a pivot chart with data coming from a Power Query - SQL Source. Colors in Pivot Chart follow a pattern depending on the number of legends. It always starts with light blue (based on my theme choice) but legend values are not static since it is referencing from a live data - Chart 1 starts with <30d and Chart 2 is >=90d, but both are light blue which is confusing.
I am aware of Macros and tried applying it upon opening the Excel but this will not work if the refreshed data changed the number of legends in the chart. (e.g. Chart 2 now has 2 legend values) and it refreshes weekly.
What i'm looking for is a way to bind a color to specific text - <30d is Red for all charts. If there's a documentation about this that doesn't include Macros that will be best. I've tried finding an IF (legend = <30d) in Macro; spent hours already but is still unsuccessful in doing so.

To anyone with the same issue, i loaded the data from Power Query to a Worksheet and not to a Data Model. Now when i change the color for a legend and the data refreshes, it will not revert to a default color scheme.

Related

Change Excel chart legend text entry without editing the data?

I have a Powerpoint presentation that I need to refine and it includes some charts from Excel (I did not make them). However, those charts were copypasted and the originals are no longer available - but some legend text entries are wrong because the data were modified in the meantime. Is there a way to change ONLY the entries without going on Excel and selecting the data? Basically doing it visually in some way? The data on Excel are still the same, it's only the name of the series the charts refer to that has changed, but doing the charts from scratch all over again would require quite a lot of time because the format of the original Excel tables is now completely different.
Essentially the charts are just fine, the colours are also fine, it's just one legend entry that is wrong.
Copy as an image then edit using a picture editor.
But how was the data updated as you state it was modified then you say the data is still the same.
You could even make a dummy chart and create the legends in the correct font and size, then copy those and paste on the original image, done with an eye for detail and it won't be noticeable.

Excel - Change bar graph to all same colour

I have a bar graph as seen below, I need to change the colour of all the bars to let's say green.
Currently the only way I have been able to find to do this is click each individual date and then the fill bucket green as excel doesn't allow you to CTRL + Click multiple elements. Is there a way to change the colour of all the bars shown in one go?
Worth mentioning I can not change the colours by creating a "values table" as the workbook is locked and I have to do this for several different graphs.
That's happening because you have created the chart using every date as an individual serie. I suggest to use the "Switch Row/Column" option and became all the dates as a unique serie, so all the bars will have the same color.
In the other hand if you need to keep the chart as you shown on the picture shared, is possible to change every bar at once but just using a VBA code.

Excel 2016 Chart Data Labels Always Empty

I have several bar charts, all configured to show Data Labels.
The data labels object box is showing (I can also apply Fill and Border colors to it). However, this object is always EMPTY. Regardless of what I tick to show (e.g. Values, Values from Cells, Series Name, etc...) - it is always empty, with the minimum (shrunk) width (as it should expand per the value presented). If I tick to show the "Legend Key" - a colored square does show to the left of the empty label box.
There's no issue with the font definition, or colors, but it seems as if some underlying theme-wide setting is causing this behavior with all charts on this Workbook.
I have a matching Workbook before some formatting (branding) were applied, in which Data Labels are working just fine. I compared all Data Labels settings and options - they are identical.
Any idea where else can I look?
Thanks!
Updating here that the issue is solved.
I believe it is some sort of a bug in Excel 2016.
I deleted the Data Labels and Re-created them, now it is working normally.
I have to delete per each chart where this problem was evident.

Create Scrolling Excel Chart

I'm looking to set up a scroll bar in Excel that corresponds to what set of data I use for a chart. I have built a 2-value doughnut chart that acts as a percentage gauge (green section is completed and grey is 100% minus the completed part).
I want to be able to choose what month's data I use for this chart using the scroll bar. All I can seem to find online is how to modify the number of rows and columns that are displayed on a graph rather than actually using the scroller to pick what data to display.
In addition, how would I make it default to the current month? Any help would be appreciated!
For anyone that is looking for a similar solution, I have figured it out. It works with something called a dynamic range. Use the value of the scrollbar to determine the offset of rows (pick which row of data to use). Then link that dynamic range to your chart in place of where you would select the data.

How to extract each color bar and copy them in a table?

I made a diagram to show unique columns with several colors in each, as shown in the picture.
I have hundreds of that to make and I have no idea about how to do that.
I would like to know if it's possible to extract each color bar separately and copy them under "Icons". I am not sure if the word "extract" is the correct term, but I would like to display a raw-image of that color bar.
Maybe a formula?
I am able to use Office Excel and Libreoffice Calc.
Thank you so much.
These are instructions to do this manually, but this would be an ideal project to apply VBA and automate these tasks.
The idea is to create each category of stacked bar as its own individual chart, which can then be exported or copied to an image file.
This is based on the "spark lines" concept, which is small, eye-catching graphics embedded within the text of a document, as opposed to large graphics. MS added some sparklines functionality in recent versions of Office apps, and although MS "spark lines" doesn't support stacked bar chart type, the same thing can still be accomplished with a little work.
Step 1: Select one row of the data and do Insert Chart, stacked bar.
Step 2: Select data and Switch Rows & Columns.
Step 3: Delete the gridlines, axes, chart border, etc., .
Step 4: Expand the Plot Area so that it covers the entire Chart Area, and format the data series to 0% gap width.
Step 5: Apply your colors to each point in the series.
Step 6: Resize the chart to fit on a cell.
Finally now that you have created some ChartObjects you can manipulate them. ChartObjects can be Exported as image files, or copy/paste-special as images, bmp, or enhanced metafiles, etc.

Resources