lundi 23 mars 2015

DimpleJS - Get original data in getTooltipText callback


Goal


I would like to pass some extra data along to dimple for display in the tooltip.


Right now I show the number of products on the shelf and the time at which they were counted. I would also like to show other data in the hover tooltip, specifically the name of the person who counted the product on the shelf.


Issue


The callback for getTooltipText only gets back a event which does not seem to contain the original data. I went into the dimple source to see if the original data could be added to the event, but I was unable to find it in the event stack. I know I could do a lookup in my original array for data with the same x,y values, but there it needs to take into account data with the same count/timestamp.


Any other suggestions on how I could do this?


Solution


http://ift.tt/19MgSUD





Aucun commentaire:

Enregistrer un commentaire