User:Don Ema Valecirro/sandbox

Say I want to include this graph here, right?

So...

{ "$schema": "https://vega.github.io/schema/vega/v5.json", "width": 600, "height": 200, "config": { "text": { "font": "Ideal Sans, Avenir Next, Helvetica" },   "title": { "font": "Ideal Sans, Avenir Next, Helvetica", "fontWeight": 500, "fontSize": 17, "limit": -1 },   "axis": { "labelFont": "Ideal Sans, Avenir Next, Helvetica", "labelFontSize": 12 } },  "title": { "text": "Data visualization tools release dates", "orient": "top", "anchor": "start", "frame": "group", "encode": { "update": { "dx": {"value": -1} }   }  },  "signals": [ {"name": "rectWidth", "value": 50}, {"name": "rectHeight", "value": 40}, {"name": "rectY", "value": 85}, {     "name": "rectCenter", "init": "[rectWidth/2,rectY+rectHeight/2]" } ],  "data":[ { "name": "libraries", "format": { "type": "json", "parse": { "release": "date:'%Y'" }     },      "values": [ {"name":"vega", "release":"2013","license":"BSD 3-Clause","description":"Vega is a visualization grammar, a declarative language for creating, saving, and sharing interactive visualization designs"}, {"name":"d3","release":"2011","license":"BSD 3-Clause","description": "D3 (Data-Driven Documents or D3.js) is a JavaScript library for visualizing data using web standards"}, {"name":"plotly","release":"2012","license":"MIT","description":"Plotly.js is an open source JavaScript library for creating graphs and dashboards"} ]   }  ],  "scales": [ {     "name": "xScale", "type": "time", "domain": {"data": "libraries","field": "release"}, "range": "width", "nice": "year" },   {      "name": "colorScale", "type": "ordinal", "domain": {"data": "libraries", "field": "license"}, "range": {"scheme": "dark2"} } ],  "axes":[ {     "scale": "xScale", "orient": "bottom", "format": "%Y" } ],  "marks":[ {     "type": "rect", "name": "rectangles", "from": {"data": "libraries"}, "encode": { "enter": { "width": {"signal": "rectWidth"}, "height": {"signal": "rectHeight"}, "x": { "signal": "scale('xScale',datum.release)-rectWidth/2" },         "y": {"signal": "rectY"}, "fill": { "signal": "scale('colorScale', datum.license)" },         "tooltip": {"signal": "{'Description': datum.description}"} },       "update": { "fillOpacity": {"value": 1} },       "hover": { "fillOpacity": {"value": 0.5} }     }    },    {      "type": "text", "name": "labels", "from": {"data": "rectangles"}, "encode": { "enter": { "text": {"signal": "datum.datum.name"}, "x": { "signal": "datum.x+rectCenter[0]" },         "y": {"signal": "rectCenter[1]"}, "align": {"value": "center"}, "baseline": {"value": "middle"}, "fontWeight": {"value": "bold"}, "fill": {"value": "black"} }     },      "interactive": false },   {      "type": "rule", "from": {"data": "labels"}, "encode": { "enter": { "x": {"signal": "datum.x"}, "x2": {"signal": "datum.x"}, "y": {"signal": "datum.y+rectCenter[0]-5"}, "y2": {"signal": "height"}, "strokeWidth": {"value": 2} }     }    }  ],  "legends": [ {     "title": "License", "fill": "colorScale", "orient": "none", "encode": { "title": { "update": { "fontSize": {"value": 15} }       },        "labels": { "update": { "fontSize": {"value": 12} }       },        "legend": { "update": { "x": {"value": 500} }       }      }    }  ] }