Colour Treemap Based on String Value

  • What Grafana version and what operating system are you using?
    → Browser on Mac OS

  • What are you trying to achieve?
    → I have 3 columns in my dataset. The Topic, the State and the Sum (number of website hits on that particular topic/state combination). I am trying to create a treemap where the colours of the different boxes are assigned based on the String value of that box. For example, in the first image attached, News would always be coloured red, regardless of the state it is grouped by.
    Alternatively, switching the groupings around and grouping by Topic, I would like to show the state flag image in the box that represents that state.

  • How are you trying to achieve it?
    → I am trying to configure colour changes using the Override section but it only seems to work on the underlying values (Sum column) and not the values in the State/Topic section.
    To be clear, I have managed to configure the tree itself as I want it. The problem is colouring (or inserting images) into the boxes themselves.

  • What happened?
    → The colours of the boxes only changed based on the underlying numeric values but not by the String columns

  • Can you copy/paste the configuration(s) that you are having problems with?
    → N/A

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    → No

  • Did you follow any online instructions? If so, what is the URL?
    → Have not found any suitable unfortunately


Using the browser version 9.3.2

Hi Pmch,

I am also using tree map. I need to colour treemap using numeric values which I am getting using query. I am trying to color treemap using override but colours are not changing.
Please reply if your map is changing using values?

Thanks,
Priyanka

One way to do it might be by assigning topic to a color value