apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
61.63k stars 13.46k forks source link

Sankey diagram with loops doesn't work #18103

Open svdimchenko opened 2 years ago

svdimchenko commented 2 years ago

A clear and concise description of what the bug is.

How to reproduce the bug

  1. Add sankey diagram with loops using instructions https://www.npmjs.com/package/@superset-ui/legacy-plugin-chart-sankey-loop
  2. 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
  3. Create chart using Sankey Diagram with Loops
  4. See error image

Expected results

Build sankey diagram with loop like in examples image

Actual results

Received error (screenshot added above)

Environment

(please complete the following information):

Checklist

Make sure to follow these steps before submitting your issue - thank you!

stale[bot] commented 2 years ago

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.

mlmaverick commented 2 years ago

Any resolution for this?

svdimchenko commented 2 years ago

The PR was closed automatically. I'm using patch on my installation and it works.

mlmaverick commented 2 years ago

@svdimchenko Hi, what kind of patch is it? Available somewhere on github?

svdimchenko commented 2 years ago

Here it is https://github.com/apache/superset/pull/18110

rusackas commented 1 year ago

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!

bonamim commented 1 year ago

Hi everyone, I think this feature is important 💯 I hope it will be implemented in the future 🙏

JelenaKitanovic commented 1 year ago

+1 for fixing this issue. Loops are a regular thing when it comes to user flows.

nicomoya123 commented 6 months ago

+1 hope there is a soltuion, can we ignore the loop at least instead of throwing the chart ?

rusackas commented 3 months ago

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

rusackas commented 3 months ago

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.

worthy7 commented 2 months ago

Hello, I also want to see more than 2 source/targets on this chart but it doesn't work.

image

rusackas commented 2 months ago

@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