Vega graph lagging on mouseover

Viewed 161

I have this pretty heavy data (around 400 nodes, and 1000 paths) that I'm trying to visualize. But while using the javascript API (vega-embed) with Angular 9, the visualization lags/hangs while executing a mouseover event. I have tried it on the vega editor (linked below) using the same data source, and there is no lag. I have shown it as gifs below,

Vega Editor:

enter image description here

Angular:

enter image description here

As you can see, the event in angular takes about a few seconds, but on the vega editor, its instant. I'm using the same spec, and the same data source, so I can't figure out where I'm going wrong.

Vega Editor: Link

I'd really appreciate some help here! Thank you.

1 Answers

You will generally find lag in Vega/Vega-Lite graphs that have many elements. There is not really any way around this for standard vega renderings, but there are some efforts to make Vega scale better to large datasets; see for example https://github.com/vega/scalable-vega.

Related