vega(
{
$schema: "https://vega.github.io/schema/vega-lite/v4.json",
height: 500,
width: 1200,
data: {
values: failedlogins
},
mark: { type: "bar", tooltip: true },
encoding: {
x: {
field: "DB Username",
type: "nominal",
sort: "-y",
axis: { labelAngle: 90 }
},
y: {
aggregate: "count",
type: "quantitative"
},
color: {
field: "Client IP",
type: "nominal"
}
}
},
{ theme: "carbong90" }
)