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

Math expressions don't work in dashboard panels #503

Closed
kostrse opened this issue Oct 22, 2022 · 4 comments · Fixed by grafana/grafana#57921
Closed

Math expressions don't work in dashboard panels #503

kostrse opened this issue Oct 22, 2022 · 4 comments · Fixed by grafana/grafana#57921
Labels

Comments

@kostrse
Copy link
Contributor

kostrse commented Oct 22, 2022

What happened:

Any math expressions result in error "e.replace is not a function"

How to reproduce it (as minimally and precisely as possible):

  1. Add two queries A and B which successfully return data
  2. Add an expression, "Math", "$A + $B"
  3. See the error "e.replace is not a function"

Screenshots

Screenshot_20221021_053527

Anything else we need to know?:

Environment:

  • Grafana version: 9.1.x
  • Plugin version: main
@kostrse kostrse added datasource/ADX type/bug Something isn't working labels Oct 22, 2022
@kostrse
Copy link
Contributor Author

kostrse commented Oct 22, 2022

There's another bug #311 but reported error is different. In my case expressions do not work at all.

@aangelisc
Copy link
Contributor

Thanks for the report @kostrse, I can confirm I've reproduced this and I'm investigating the cause 😊

@aangelisc
Copy link
Contributor

I've identified the issue is because of this line. As ADX has the expression property defined (but as an object), the replace property does not exist which causes this error. I'll have a look at a fix for this 😊

@aangelisc
Copy link
Contributor

On further investigation this seems to be a bug in Grafana backend where the incorrect datasource reference is used. Issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants