index.js (minimal API):
<ul id="list"></ul>
"scripts": "start": "node index.js"
function renderVis(data) const spec = "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "data": "values": data , "mark": "bar", "encoding": "x": "field": "genre", "type": "nominal", "axis": "labelAngle": 0 , "y": "aggregate": "count", "type": "quantitative", "title": "Number of movies" , "color": "field": "genre", "type": "nominal" , "tooltip": [ "field":"genre","type":"nominal", "aggregate":"count","type":"quantitative","title":"Count", "field":"rating","type":"quantitative","aggregate":"mean","title":"Avg rating" ] ; vegaEmbed('#vis', spec, actions:false); vegamoviesfrs