-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Sometimes, you make a query and the query contains additional data, like simple scalars (sums, averages, or anything you calculated on the database) and you want to use that information to drive the visualization.
A possible approach would be to allow an optional second argument to the binding functions that receives the result of the cypher query so you could do something along the lines of the following:
def heat_mapping(element, results):
amount = element['properties']['some_amount']
normalized_value = (amount - results['min_amount']) / (results['max_amount'] - results['min_amount'])
return normalized_value
...
g.show_cypher(
"""
MATCH (n:SomeLabel)
RETURN n, MIN(n.some_amount) AS min_amount, MAX(n.some_amount) AS max_amount
"""
)
Metadata
Metadata
Assignees
Labels
No labels