Page MenuHomePhabricator

Interactive graph keeps repainting on mousemove in read mode
Closed, ResolvedPublic

Description

For interactive graph like http://en.wikipedia.beta.wmflabs.org/wiki/DynamicGraph3 , once made interactive, the graph rapidly repaints on mouse move. This does NOT happen in the edit preview mode.

Debugging Notes

  • Adding tracing to vega.js prototype.mousemove showed that the object returned from pickEvent kept being different from the active one when moving the mouse within the same large circle.
  • Tracing prototype.pick showed that scene.marktype kept altering between group, path, and text values, whereas in preview it only showed group and path, but not text.

Event Timeline

Yurik raised the priority of this task from to High.
Yurik updated the task description. (Show Details)
Yurik added subscribers: Yurik, JGirault.
Yurik added a subscriber: Krinkle.

I think I found the issue - and its with the data, not Vega. API module does not return data "as is" - instead the json formatter removes certain values, such as "blah":false -- because it is identical to not having a value (javascript return undefined). It seems vega actually checks for the value, hence the difference.