Need help in D3 Library in Node js & Express js

I am trying to develope Sorting Visualization Project in Node js , Express js and PUG template.

It is server-side site .

I am unable to render data or basic bar shapes through pug template !

And also if anyone can explain how can I use D3 library in node js that would be helpful .

I guess the issue is that you need to use a virtual DOM library such as jsdom or linkedom. Here’s an example beckerBarley | @fil | Val Town

Is it necessary to use Virtual Dom Library ?

Wouldn’t rendering of PUG template into HTML be helpful to use with D3 methods ?