Conditional format coloring for Treemap chart
I noticed that the new charts for 2016 have a treemap chart that looks great but is missing other options to have changes in color as oppose to one solid color for different category. Looking to have something that would change color due to changes in value (ie. from negative (red) to positive (green) with an optional midpoint color (black))

Thank you for the suggestion on conditional format coloring for treemap charts! While we don’t expect to devote time to this in the near future, we will continue tracking votes and comments here. We will keep this suggestion under consideration for future development.
Thank you again,
Auston [MSFT]
4 comments
-
Pete commented
it's been over four years... any updates? Thank you.
-
Don Simard commented
@shuvro-basu
in your code snippet - what is "x"? it is undeclared. Will it be the loop index that you didn't implement?If ActiveChart.FullSeriesCollection(1).Points(x + 1).DataLabel.Text = "Type-DataLabel-That-You-Want" Then
ActiveChart.FullSeriesCollection(1).Points(x + 1).Select
ActiveChart.FullSeriesCollection(1).Points(x + 1).Format.Fill.ForeColor.RGB = NEG_COLOR -
Shuvro Basu commented
Yes you can do it but it's still a very cumbersome process. It's better to start off by recording a macro. This will have only 1 line of code, which is just what we need.
Sub Macro15()
'
' Macro15 Macro
''
Dim pnts As Integer
Dim NEG_COLOR As Long
NEG_COLOR = RGB(255, 0, 0)'The below line came from the macro recording
ActiveSheet.Shapes.Range(Array("Chart 5")).Select
'******************* MY CODE FOLLOWS *********************
'In my method I find the Datalabel of the box I want to change color using the DataLabel text and then change the color.
I didnt use the loop to run the code, because I wanted to test it first. And it works!!!'Use the below code to count the shapes in the treemap.
pnts = ActiveChart.FullSeriesCollection(1).Points.Count
'This is the core code
ActiveChart.FullSeriesCollection(1).Select'Check the shape you want by comparing the datalabel text
If ActiveChart.FullSeriesCollection(1).Points(x + 1).DataLabel.Text = "Type-DataLabel-That-You-Want" ThenActiveChart.FullSeriesCollection(1).Points(x + 1).Select
ActiveChart.FullSeriesCollection(1).Points(x + 1).Format.Fill.ForeColor.RGB = NEG_COLOR
End IfEnd Sub.
Hope this helps someone.
-
Joseph Byrne commented
Google Sheets supports this, right?