Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi Level Sankey Diagram option not working #6

Open
mikerc19 opened this issue Mar 18, 2022 · 3 comments
Open

Multi Level Sankey Diagram option not working #6

mikerc19 opened this issue Mar 18, 2022 · 3 comments
Assignees

Comments

@mikerc19
Copy link

mikerc19 commented Mar 18, 2022

Hello, first of all, thank you @KatrinaTurner for your contribution and work on this. Really appreciated!.

I'm trying to display a multilevel sankey diagram (just like the one shown in the Grafana download page for this panel) but I'm unable to, at first I thought this was related to the data types, then I changed the labels for the source and destinations but it didn't work either. The names of the source and destination do match exactly too.

Is there an specific way to do this? Such as specific labels that I need to use? or data type I need to cast these columns to?

Thanks for your time.

Sankey panel

The result I'm trying to achieve is something like this:

image

Using the latest Grafana version v8.4.4 (fcfb01faeb)]

@mikerc19 mikerc19 changed the title Multi Level Sankey Diagram optin not working Multi Level Sankey Diagram option not working Mar 18, 2022
@KatrinaTurner
Copy link
Collaborator

Hi! Sorry for the late reply, I just returned from maternity leave.
The data type of the metric should be a number because that's what the plugin uses to determine the widths of the links, but the types of labels shouldn't matter. To get the multiple levels, you need to do a "Group by" for each level, not just the source and target. In the example you showed, the query was:
Metric: Sum
Group By: Source Org
Then by: Science Discipline
Then by: Project

I hope this helps!

@KatrinaTurner KatrinaTurner self-assigned this May 12, 2022
@marten-wirelab
Copy link

It would be really nice if it would be possible to render datasets where you don't necessarily know the complete flow.
For instance, I want to visualize my power consumption. I have my net usage, my PV and circuit power consumption statistics. I can easily produce a dataset combining and splitting data based on "from -> to" relations but I can't know if (for example) my car is being charged from the PV panels or from the net.

@mikerc19
Copy link
Author

mikerc19 commented Jun 17, 2022

Hi! Sorry for the late reply, I just returned from maternity leave. The data type of the metric should be a number because that's what the plugin uses to determine the widths of the links, but the types of labels shouldn't matter. To get the multiple levels, you need to do a "Group by" for each level, not just the source and target. In the example you showed, the query was: Metric: Sum Group By: Source Org Then by: Science Discipline Then by: Project

I hope this helps!

Hello @KatrinaTurner, Thank you so much for your response. I was also on paternity leave until recently.

I'm trying your recommendation, and by the looks it sounds to me that your data set has more than 3 columns (Source, Target, Value). Is this the case?

It sounds to me that you have up to four columns ("Source Org", "Science Discipline", "Project", "metric")

Is it possible to only have 3 columns (Source, Destination, Value) and still get multi-level as shown below?
NOTE: I'm using the Sum for the "metric", and the "group by" for the Source and Destination columns

Grafana Attempt
The only way I was able to achieve the desired result in Grafana was by formatting the table purposely with a column for each level. (see below)

image

image

But I'm trying to achieve this with only 3 columns (as shown below) my data is already produced in this way.
If this is beyond the capability for this panel, What can I do to help in contributing to achieve this?

PowerBI Attempt
Table Format out put (with the Sum and Group by)
image

Sankey Diagram in "PowerBI"
image

The 3 columns (Source, Destination, Value) format is usually enough for multi level. (some samples below)

  1. Google Charts
    image

  2. PowerBI
    image
    image

  3. Gephi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants