Hello,
I'm trying to figure out how to rename my layer names from "_source.checks_total.policies_checks_result.passing" to just "Passing" and "_source.checks_total.policies_checks_result.failing" to just "Failing". I've searched but can't find any examples of this.
In the legend, it has the very long names which is not appealing.
Would anyone know how to do this by chance?
{
$schema: https://vega.github.io/schema/vega-lite/v4.json
title: Policy Checks
"width": 400, "height": 100,
"repeat": {
"layer": ["_source.checks_total.policies_checks_result.passing", "_source.checks_total.policies_checks_result.failing"]
},
data: {
url: {
index: pan_bpa
body: {
"query": {
"bool": {
"filter": [
{
"bool": {
"should": [
{
"exists": {
"field": "vega.policies"
}
}
],
"minimum_should_match": 1
}
}
]
}
},
"size": 100,
"sort": [
{
"@timestamp": {
"order": "desc"
}
}
]
}
}
format: {property: "hits.hits"}
}
"spec": {
"mark": "line",
"tooltip": true
"encoding": {
"x": {
"field": "_source.@timestamp",
"type": "ordinal",
"timeUnit": "minutes",
"title": "Timeframe"
//"timeUnit": "day"
},
"y": {
"aggregate": "policies.value",
"field": {"repeat": "layer"},
"type": "quantitative",
"title": "Number of Checks"
},
"color": {
"datum": {"repeat": "layer"},
"type": "nominal"
}
}
}
}
thanks!