Message originally sent by slack user U7213XMGS3H
Finally we have a vega-lite json file that looks something like this
{
"$schema": "<https://vega.github.io/schema/vega-lite/v5.json>",
"mark": "circle",
"width": 850,
"height": 550,
"transform": [
{
"calculate": "datum.public_files.length+datum.private_file_count",
"as": "file_count"
}
],
"encoding": {
"x": {
"field": "violations.inbound.total",
"type": "quantitative",
"scale": { "type": "symlog" }
},
"y": {
"field": "violations.outbound.total",
"scale": { "type": "symlog" }
},
"tooltip": [
{ "field": "name", "type": "nominal" },
{ "field": "file_count", "type": "quantitative" },
{
"field": "public_files.length",
"title": "public_files",
"type": "quantitative"
},
{
"field": "private_file_count",
"title": "private_files",
"type": "quantitative"
},
{
"field": "violations.outbound.total",
"title": "outbound total",
"type": "quantitative"
},
{
"field": "violations.outbound.dependency",
"title": "outbound dependency",
"type": "quantitative"
},
{
"field": "violations.outbound.architecture",
"title": "outbound architecture",
"type": "quantitative"
},
{
"field": "violations.outbound.privacy",
"title": "outbound privacy",
"type": "quantitative"
},
{
"field": "violations.inbound.total",
"title": "inbound total",
"type": "quantitative"
},
{
"field": "violations.inbound.dependency",
"title": "inbound dependency",
"type": "quantitative"
},
{
"field": "violations.inbound.architecture",
"title": "inbound architecture",
"type": "quantitative"
},
{
"field": "violations.inbound.privacy",
"title": "inbound privacy",
"type": "quantitative"
}
],
"color": { "field": "layer" },
"size": {
"field": "file_count",
"type": "quantitative",
"scale": { "type": "linear", "rangeMax": 10000 },
"legend": null
}
},
"data": { "values": [] }
}
You have to replace the data
key with the actual data