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

g is not a function #12

Open
windhamg opened this issue Aug 6, 2022 · 14 comments
Open

g is not a function #12

windhamg opened this issue Aug 6, 2022 · 14 comments

Comments

@windhamg
Copy link

windhamg commented Aug 6, 2022

I'm trying to use the Sankey plugin (v1.0.6) with Grafana v8.4.10.

When the panel attempts to render the graph, I get an error: g is not a function. (In 'g(u.nodeColor)', 'g' is undefined)

Screen Shot 2022-08-05 at 5 16 57 PM

Any ideas as to what might be wrong? Thanks!

@AlxLifanov
Copy link

Similar problem, but 'g is not a function is only one aspect.
Grafana 8.5.3, mysql data source, plugin 1.0.6.

Input data is:
image

If i leave WHERE as time-limiting macro - nothing works.

The only way i can make it draw something is the following:

image

image

You can see that "time" is really used as "from" and "value" is both as "To" and "Metric"
From and To are ignored.
I suppose, embedded Grafana field names are used incorrectly.

@luusluus
Copy link

luusluus commented Nov 6, 2022

Try Format as Table

@uladzimir-yushkevich
Copy link

I see same issue:
image
v9.4.7 (4add91f03d)
version 1.0.6

@pjrwlazlo
Copy link

I have the same issue ("g is not a function" error when I try to add data). Has there been any updates on this?

@imrathion
Copy link

I too am seeing this on v9.3.8 and 9.5.1

I'm not sure what the issue is. Any help would be greatly appreciated!

@KatrinaTurner
Copy link
Collaborator

Hey everyone, sorry for the late reply, I didn't get a notification and am just now seeing these.
A couple things,

  1. This plugin was not intended to be used for Time Series data, so that could be why it's having an issue
  2. The thickness of the lines is from the first number field it finds, which I realize could be causing issues. I can put in a ticket to allow the option to choose the value field.

In terms of the "g is not a function" error, that is unfortunately a super generic Grafana error and I can't really debug based on that. If you could screenshot your console, that would make it easier for me to debug.
Also, what data sources is everyone using? I developed it using primarily an Elastic Data Source, so I don't always catch bugs from the query outputs of other data sources.
Mahalo!

@gdiana
Copy link

gdiana commented Jun 19, 2023

When I got G is not a function I accepted the json then it gave P is not a function.

image

This only happened when I upgraded GRAFANA to ver 10.

I am using the INFINITY DATA SOURCE using XML

Here is the Table data. Was working fine before 10.

image

@ffisc
Copy link

ffisc commented Sep 20, 2024

Same issue here. This can be reproduced with a 5-row dataset:
g_not_function.csv

@gdiana
Copy link

gdiana commented Sep 20, 2024

Hi, Try this, I got it to work. Must select Table and format data correctly. Note tect data must be reformeted as number.

#18 (comment)

@gdiana
Copy link

gdiana commented Sep 21, 2024

Ok I imported your data table and this is what I got

image

I used Transform Data 1- Convert field Type to convert count as text to number

image

All worked ok

@ffisc
Copy link

ffisc commented Oct 15, 2024

Thank you and sorry for the late reply - still no luck. The data looks fine when viewing as table, but the plugin somehow can't handle it.

image image

@gdiana
Copy link

gdiana commented Oct 15, 2024

Hi Felipe,

What version are you using. In my post above you will see an option called VALUE FIELD which I set to COUNT.

But I do not see this option in your screenshot? It appears between The Node padding and Layout Iterations sliders but in yours it is missing? See below. Maybe it is somewhere else but you need to find it and set as I have done.

image

@ffisc
Copy link

ffisc commented Oct 16, 2024

Indeed, I had also noted the lack of the Value Field selection, but had thought it might be related to the lack of data.

I was using 1.0.6. I've updated to 1.1.3 and now it works! 🎉

@gdiana
Copy link

gdiana commented Oct 16, 2024

Great, alls well that ends well ☺️

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

9 participants