neo4j-labs / neodash

NeoDash - a Dashboard Builder for Neo4j
https://neo4j.com/labs/neodash/
Apache License 2.0
400 stars 129 forks source link

Display a range in Parameter select returns different data types and fails #774

Closed KWLangendorf closed 4 months ago

KWLangendorf commented 5 months ago

I am trying to make a parameter select of integer values 0,5,10,...etc. to be written to a neodash_parameter ($neodah_wrap_limit)

using a custom query: WITH range(0, 10 ,5) as limits UNWIND limits as limit with limit WHERE toString(limit) CONTAINS $input RETURN DISTINCT limit as value, limit as display ORDER BY limit ASC LIMIT 100

However it returns differing types 0=STRING, 5 and 10 are FLOATs. If I make a table with the same type of query WITH range(0, 10 ,5) as limits UNWIND limits as limit RETURN DISTINCT limit as value, apoc.meta.cypher.type(limit), limit as display ORDER BY limit ASC LIMIT 100 I get all values to INTEGER as expected.

I have attached the neodash report and a video.

kr Kirsten neodash_test.json

https://github.com/neo4j-labs/neodash/assets/26305820/1ccd7a74-cd9e-4926-89bb-580e73a596e7

nielsdejong commented 5 months ago

@BennuFire this is interesting. Looks like we might not be casting the type correctly? 0 becomes float, 5 becomes int and 10 becomes string? :)

alfredorubin96 commented 5 months ago

Could you please test it now? The numbers are all float instead of being integers, but at least they share the same type instead of being either string or numbers