grafana/grafana-treemap-panel

Define positions of sub-treemaps within the whole treemap visualization

Opened this issue · 0 comments

Kaudse commented

I have a treemap chart which is divided into three sub-groups ("Group by"). The sizes of the squares refer to percent values, so they add up to 100 in each of the sub-treemaps.

Since the size of all sub-treemaps is identical, they are positioned arbitrarily within the whole treemap chart. As a result, they often swap positions after reloading the dashboard, which is confusing for the user.

grafik
Next time:
grafik

I tried to establish a fixed order of the sub-charts by ordering the underlying data. The following order by clause in the SQL query allows ordering categorical data in a determined way:

ORDER BY (
        CASE WHEN category ='system1' THEN 1
             WHEN category ='system5' THEN 2
             WHEN category ='system2' THEN 3
             ELSE 4
        END
    )

This, indeed, orders the data table as expected, but the sub-treemaps are still randomly distributed.

I would love to have the possibility to define the position of the sub-treemaps in the whole treemap. I think this would also be beneficial in case the sub-treemaps have different sizes to get an individual design of the whole treemap.