<custom> chart : how can I access the data in the SQL query? #7481
Replies: 4 comments 2 replies
-
My Redash configuration seems fine. However, I'm getting this error in the javascript console on each of my pages. Maybe it's related. |
Beta Was this translation helpful? Give feedback.
-
|
Here's a solution for getting data in Javascript via the API. But it's a complicated and asynchronous method. Any other solution? Thanks for your help. SQL : Javascript : |
Beta Was this translation helpful? Give feedback.
-
|
I think you need to set "X column" and "Y column" fields.
|
Beta Was this translation helpful? Give feedback.
-
|
Wow... I don't even know how I missed this. I was stuck on the code when it was written in black and white on the same page. Thanks for the obvious! |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'd like to access the results of my SQL query via javascript to create a custom chart. I've looked through the four variables presented (element, x, ys and Plotly) but can't find anything. Any ideas?
I tried with a very simple query with similar column names but... that didn't work either!
SELECT 'Category A' AS x, 10 AS ys UNION ALL SELECT 'Category B' AS x, 20 AS ys UNION ALL SELECT 'Category C' AS x, 15 AS ys UNION ALL SELECT 'Category D' AS x, 25 AS ys UNION ALL SELECT 'Category E' AS x, 30 AS ysThank you very much and have a nice day :)
Beta Was this translation helpful? Give feedback.
All reactions