superset
superset copied to clipboard
Sankey diagram with loops doesn't work
A clear and concise description of what the bug is.
How to reproduce the bug
- Add sankey diagram with loops using instructions https://www.npmjs.com/package/@superset-ui/legacy-plugin-chart-sankey-loop
- Write test query:
SELECT "a" AS e1,
"b" as e2,
7 as counts
UNION ALL
SELECT "b" AS e1,
"c" as e2,
5 as counts
UNION ALL
SELECT "c" AS e1,
"a" as e2,
2 as counts
UNION ALL
SELECT "c" AS e1,
"b" as e2,
1 as counts
- Create chart using Sankey Diagram with Loops
- See error
Expected results
Build sankey diagram with loop like in examples
Actual results
Received error (screenshot added above)
Environment
(please complete the following information):
- browser type and version:
- superset version:
1.3.2
- python version:
python3.8
- node.js version:
node 14
- any feature flags active: {"ALERT_REPORTS": True}
Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [x] I have reproduced the issue with at least the latest released version of superset.
- [x] I have checked the issue tracker for the same issue and I haven't found one similar.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned
to prevent stale bot from closing the issue.
Any resolution for this?
The PR was closed automatically. I'm using patch on my installation and it works.
@svdimchenko Hi, what kind of patch is it? Available somewhere on github?
Here it is https://github.com/apache/superset/pull/18110
Oh, sorry the stale bot closed that, and sorry it didn't get more attention. If you have any interest in re-opening that PR, we can try to get more support for it this time around.
In general, the looped sankey doesn't see a lot of use that I'm aware of. While it's not a high priority to fix compared to other issues/plugins, I'm happy to try to help any PR get reviews!
Hi everyone, I think this feature is important 💯 I hope it will be implemented in the future 🙏
+1 for fixing this issue. Loops are a regular thing when it comes to user flows.
+1 hope there is a soltuion, can we ignore the loop at least instead of throwing the chart ?
Ideally, we'd move this to a new ECharts sankey diagram, but it seems cycles/loops not yet implemented there either. Here's a thread to chime in on if you want to see this feature: https://github.com/apache/echarts/issues/19505
Otherwise, this chart type is seriously at risk of being deprecated. If anyone wants to step up with a fix, that'd be great, but this thread is otherwise at risk of being closed as stale.
Hello, I also want to see more than 2 source/targets on this chart but it doesn't work.
@worthy7 I'd recommend starting a topical thread if you want to get into the modeling of a sankey (since it's not related to the issue reported), but that's not how it works, though. The data should be structured to have a source/target, like so:
source | target | value |
---|---|---|
animal | reptile | 123 |
animal | primate | 644 |
animal | insect | 2343 |
primate | human | 13 |
primate | orangutan | 123 |
primate | chimp | 234 |
reptile | snake | 123 |
reptile | lizard | 432 |
lizard | iguana | 23 |
lizard | gila monster | 12 |