1

This issue occurs in every chart type. As an example, I have a pie chart created from a long table of data where each column is assigned a specific text color, so each slice of the pie corresponds to the color of that column. I maintain this color coding on various other graphs of the same data to aid in reading the data.

When I insert a new column into the table data, I want to assign it a new color and have its slice take that color. The new data is inserted into the series of the pie chart. However, the series will not keep their assigned colors, instead, the inserted series will take the color of the series that was in its place, causing a domino effect as every series after will shift its color. The last series will have a new color. As such all the slices in the chart after the inserted slice will no longer correspond to the color of its column.

Chart before and after inserting new data

I then have to manually change each series back to its original assigned color which is extremely time-consuming and frustrating every time I want to insert new data.

How can I preserve the color of each slice/series so that the colors don't all change when I insert new data?

2 Answers 2

1

I am making a budget tracker component and wanted the colors of the pie chart to be specific colors related to the areas of expenses (Green for childcare, Grey for Rent...)

To solve this, I have a data-validated dropdown for them to choose from, pulled from another tab. Next to those categories, I used the SUMIF function to calculate the amount from the chart my users would use. I then added .0001 to the sumif'd amount. Therefore ALL options have a minute amount accounted for and the pie chart shows that.

=sumif('Uses (Expenses)'!$C$22:$C$48, "="&AA2, 'Uses (Expenses)'!$F$22:$F$48)+0.0001

Yes, it is a fraction of a penny off, but I don't think anyone will notice - or care.

0

The only way how to preserve your color scale is to add data always at the end so the last data will gain a new color:

0

2
  • Thanks for the response, I understand this is the case and wouldn't be the problem if data was being appended, however I need data to be inserted while still preserving the colours.
    – caeldom
    Jun 14, 2019 at 11:25
  • @caeldom well, like already mentioned. this is the only way coz colors are assigned from top to bottom
    – user0
    Jun 14, 2019 at 11:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.