superset icon indicating copy to clipboard operation
superset copied to clipboard

Deck.gl Issues

Open zpanderson opened this issue 7 years ago • 4 comments

Make sure these boxes are checked before submitting your issue - thank you!

  • [X] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [X] I have reproduced the issue with at least the latest released version of superset.
  • [X] I have checked the issue tracker for the same issue and I haven't found one similar.

Superset version

0.999.0dev - Running with the docker image specified in the Installation & Configuration guide.

Expected results

Use deck.gl visualizations with tooltips and 3d effect.

Actual results

Cannot use anything other than static text for tooltips and 3d visualizations for deck.gl maps do not work.

Steps to reproduce

I have a couple issues with the deck.gl visualizations:

  1. I'm stuck on the deck.gl maps though and can't quite get the javascript "hover" functionality to work quite right. If I just return text, the tooltip comes up and seems to work:
function updateTooltip(object) {

   return ("Test Tooltip");

}

When I try to use one of the columns that I added to the "Extra data for JS" field (time_stamp), on hover nothing comes up at all:

function updateTooltip(object) {

   return ("Test Tooltip: " + object.object.extraProps.time_stamp);

}
  1. Another issue I'm having with the deck.gl maps in general is that when I use the bar/hex 3d visualizations I don't get the 3d effect. It just looks like a flat map so I don't get the height perspective. I found a git issue about it that said to disable the auto zoom but that didn't make any difference in my environment.

zpanderson avatar Mar 29 '19 13:03 zpanderson

Updating after figuring out my issues in case anyone else ever has the same:

  1. To reference objects in javascript you have to use the syntax "object.object.points[0].extraProps."

  2. To get the full 3d effect, you have to hold the right mouse button on the map and drag up/down to get the map tilt.

zpanderson avatar Apr 08 '19 20:04 zpanderson

I im trying to use this code for to get one column of my table called city, but i get one error: function updateTooltip(object) { return ("Test Tooltip: " + object.object[0].extraProps.city); } I get this error: Cannot read property 'extraProps' of undefined I try to print only this object.object.points[0] but i get this error: Uncaught TypeError: Cannot read property '0' of undefined

And finally i print in console object.object and i can to see one objec with values like : radius: 17841.241161527712 and others but i can't to see the values from my database table like city. How i can to get this field "city" in my javascript tooltip generator of this deck.gl Scatterplot chart?

omejiasq avatar Apr 11 '20 03:04 omejiasq

I im trying to use this code for to get one column of my table called city, but i get one error: function updateTooltip(object) { return ("Test Tooltip: " + object.object[0].extraProps.city); } I get this error: Cannot read property 'extraProps' of undefined I try to print only this object.object.points[0] but i get this error: Uncaught TypeError: Cannot read property '0' of undefined

And finally i print in console object.object and i can to see one objec with values like : radius: 17841.241161527712 and others but i can't to see the values from my database table like city. How i can to get this field "city" in my javascript tooltip generator of this deck.gl Scatterplot chart?

Did you ever find a solution for this? I am trying to use the extraProps too

eried avatar Sep 07 '20 08:09 eried

I im trying to use this code for to get one column of my table called city, but i get one error: function updateTooltip(object) { return ("Test Tooltip: " + object.object[0].extraProps.city); } I get this error: Cannot read property 'extraProps' of undefined I try to print only this object.object.points[0] but i get this error: Uncaught TypeError: Cannot read property '0' of undefined And finally i print in console object.object and i can to see one objec with values like : radius: 17841.241161527712 and others but i can't to see the values from my database table like city. How i can to get this field "city" in my javascript tooltip generator of this deck.gl Scatterplot chart?

Did you ever find a solution for this? I am trying to use the extraProps too

Don't forget to put your name column in "extra data js" field.

jcalhinho avatar Feb 15 '21 11:02 jcalhinho