Coder Social home page Coder Social logo

Comments (15)

marcusolsson avatar marcusolsson commented on May 28, 2024 1

This is definitely something that the plugin should support.

I did a proof-of-concept on this a while back, but unfortunately got stuck and decided to spend time on easier wins for a while. But I'd like to revisit this again at some point.

One of the thing I believe I couldn't decide on was how you'd actually configure it. For example, would you want to configure a field that would define the parent for each row, or would you rather select fields that you'd like to group by?

from grafana-treemap-panel.

MaxMcGlinnPoole avatar MaxMcGlinnPoole commented on May 28, 2024 1

from grafana-treemap-panel.

MaxMcGlinnPoole avatar MaxMcGlinnPoole commented on May 28, 2024 1

from grafana-treemap-panel.

marcusolsson avatar marcusolsson commented on May 28, 2024

Thank you for taking the time to report this! This is indeed a limitation of the current treemap: It only supports one level. The underlying function from the D3 library supports this so it should be straightforward to add.

I assume this would require adding a parent field to the query that specifies which box to add it under.

from grafana-treemap-panel.

Void9711 avatar Void9711 commented on May 28, 2024

Got it. Thanks!
How long could this to be added into treemap plugin and release?
And is it possible to attach a clickable property on each data bulk to provide a partial zoom in/out (locate and focus view on its neighbor, maybe useful in situation which has a large amount of data)?
: )

from grafana-treemap-panel.

marcusolsson avatar marcusolsson commented on May 28, 2024

I don't know when I can look at this at the moment unfortunately. If anyone wants to contribute this, I'd happily help out!

from grafana-treemap-panel.

jermudgeon avatar jermudgeon commented on May 28, 2024

I've been using https://grafana.com/grafana/plugins/digrich-bubblechart-panel/ for a similar purpose when what I really want is a hierarchical squarified treemap. That plugin uses a fairly simple single concatenated field: "root,hierarchy1,hierarchy2,node" for example, allowing arbitrary depths and nesting. Perhaps that would help? Currently when I try to use Group here I get an error.

from grafana-treemap-panel.

MaxMcGlinnPoole avatar MaxMcGlinnPoole commented on May 28, 2024

+1 to this, this would be an extremely helpful addition. We're looking at using this at my work but the lack of support for hierarchical data is limiting.

from grafana-treemap-panel.

jermudgeon avatar jermudgeon commented on May 28, 2024

Re: how to configure parent/child relationships, I was picturing something like
https://grafana.com/grafana/plugins/digrich-bubblechart-panel/
Bubble Chart uses a single field with a user-defined separator for (presumably) arbitrary depths of aggregation.
"Level1,Level2",metric,data
"Level 1,Level2,Level3",metric,data
I find that this makes it easy to pass arbitrary depths without having to have a complex graph-assembling data source. I can do the field concatenation in the query (BigQuery, in my case).

from grafana-treemap-panel.

marcusolsson avatar marcusolsson commented on May 28, 2024

Made some progress on this, but there are still work to be done. Is this what you'd expect from the data in the issue description?

Screenshot 2021-05-12 at 22 53 59@2x

One thing I've run into though: In the example in the issue description, Engine/ has a size even though it's not a leaf node. The way D3.js works is that it sums the value for each node. If the parent has it's own value, it will be added to the sum of all its children, which is probably not what you want in this case.

Those of you who've been using other treemaps, how would you expect this to be handled? Should parent values be ignored instead?

from grafana-treemap-panel.

MaxMcGlinnPoole avatar MaxMcGlinnPoole commented on May 28, 2024

from grafana-treemap-panel.

marcusolsson avatar marcusolsson commented on May 28, 2024

I’d expect a way to look at values at different parts of the tree.

I think this would be a good feature to have, though I think it should be out of scope for now. I think we can scope this feature request down to a static presentation of hierarchical data, and add a "drill-down" feature as a follow-up.

I have values for my parent that are almost equal to the sum of the children but aren’t exactly the same.

This is more of the problem I've having right now. In the case where the sum of the children doesn't equal the value of the parent. Should one override the other? We can always make this configurable, but I'd like to find a good default for now.

from grafana-treemap-panel.

marcusolsson avatar marcusolsson commented on May 28, 2024

Another status update. I decided to go with configuring by specifying a path in the text dimension with a configurable separator. A couple reasons:

  • Using paths keeps reuses the text dimension. An empty separator value recreates the current functionality.
  • Users don't have to "engineer" the data source query for the visualization. The hierarchy is configured in the panel rather than in the data.

This solution also continues to work nicely with the Group by dimension. We can discuss adding a Parent dimension in a later pull request, but I think this is a good start. I'll clean this up and hopefully we can release this during the week.

treemap

from grafana-treemap-panel.

MaxMcGlinnPoole avatar MaxMcGlinnPoole commented on May 28, 2024

from grafana-treemap-panel.

marcusolsson avatar marcusolsson commented on May 28, 2024

Available in 0.9.0

from grafana-treemap-panel.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.