Skip to content

Sankey diagram not working #55

@PabloAlbiol

Description

@PabloAlbiol

Hi,

I have been able to add different charts and diagrams from Plotly.js in Grafana successfully, but I don't get the Sankey to work. I get the following error:
No data: No trace found with data

And my processing script looks like this:
(Sankey Diagram example from https://plotly.com/javascript/sankey-diagram/)

var data = {
type: "sankey",
orientation: "h",
node: {
pad: 15,
thickness: 30,
line: {
color: "black",
width: 0.5
},
label: ["A1", "A2", "B1", "B2", "C1", "C2"],
color: ["blue", "blue", "blue", "blue", "blue", "blue"]
},

link: {
source: [0,1,0,2,3,3],
target: [2,3,3,4,4,5],
value: [8,4,2,8,4,2]
}
}

var layout = {
title: {
text: "Basic Sankey"
},
font: {
size: 10
}
}

return {
data: [data],
layout: layout
}

For some other chart types, I needed to change the default values of layout (xaxis) to make them work, but this didn't make any difference for the Sankey diagram.

Is there something I am missing? Or is this a known issue with the Plotly.js panel?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions