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

Sankey panels "p is not a function" in Grafana 10 #18

Open
justin-vux opened this issue Jun 28, 2023 · 10 comments
Open

Sankey panels "p is not a function" in Grafana 10 #18

justin-vux opened this issue Jun 28, 2023 · 10 comments

Comments

@justin-vux
Copy link

justin-vux commented Jun 28, 2023

Hello,

My Sankey panels ceased working after upgrading to Grafana 10 (I'm using Grafana cloud, so this is somewhat out of my control).

The error I'm getting is "p is not a function". I am using plugin version 1.1.0. When I tried plugin version 1.0.6 on Grafana 10, I got "g is not a function". Everything works properly on Grafana 9.5 for both plugin versions 1.1.0 and 1.0.6.

image

The data source I am using is ElasticSearch.

Here is the table view and query:

image

image

Please let me know if I can provide any additional information that would help.

@plewam
Copy link

plewam commented Jul 2, 2023

Hi, I got the same issue. Error text is "p is not a function". Grafana 10 latest plugin version. Maybe I am doing something wrong with my query behind. It may help if the documentation would provide an example query or something.

Kind regards

@necits2015
Copy link

Same issue here.

@gdiana
Copy link

gdiana commented Jul 26, 2023

Thank you v1.1.1 sorted out the g and p not a function issues 👏😎👍

@ryanhugh
Copy link

Still getting this error, Sankey plugin v1.1.1 on grafana cloud:

image image

Any work arounds?

@gdiana
Copy link

gdiana commented Aug 17, 2023

@ryanhugh I played around and found I get the same error if I do not use the Table format. It appears one must use Table format and also define the correct text, number format for each column. Then it appears to work ok.

image

image

image

Otherwise one can or still gets the error if anything is incorrectly defined as seen below

image

@ryanhugh
Copy link

I switched to the Inifity Data source and that CVS you've got in that screenshot, and it started working. Thank you for the help!

image

@marcolinux46
Copy link

Hi,

i installed grafana10 and latest version of plugin (1.1.1).
I'm doing a panel with an elasticsearch source using a lucene query and sorting the data with 3 fields.
I have the problem too.

How can i resolve the issue?

Thank you for your help

@gdiana
Copy link

gdiana commented Dec 14, 2023

I suggest you try the infinity source and try the example above like @ryanhugh to see if it works.

If so then try and ensure you are using the correct syntax and format returned from the lucerne query using the eslaticearch source otherwise the error will prevail. Should take you 10 min to check.

@silverbullet1
Copy link

image I am still getting p is not a function on grafana 8.5.10 after using infinity source!

@kbouck
Copy link

kbouck commented Jun 2, 2024

I had this same problem using inline CSV data with the Infinity data source. I resolved it following the advice above from @gdiana:

  • the problem is that csv cells, including the ones with numeric values, are read as strings
  • so, using a transform (convert field type) you need to coerce the numeric field type to be "Number".
  • in addition, you may need to add a transform (organize fields by name) to reorder the columns in the order expected by the sankey diagram (first the text node columns in the order you expect them to appear in the chart, and then the metric column)

Maybe the plugin could validate the query result data and produce a more descriptive error message suggesting what is missing/wrong with the query result data.

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

8 participants