Hi Team,
I'm trying to plot a line graph using vega-lite. How to give KQL formulas in vega-lite. I used field called "claculate" but may be my syntax is wrong. Please help on creating line graph.
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"title": "Performance metrics",
"data": {
"url": {
"%context%": true,
"%timefield%": @timestamp,
"index": "bkp-ispfw-15032023"
}
},
"transform": [
{
"calculate": "count(kql='Status: \"TP\"')/(count(kql='ValidGTPoint:\"True\"'))", "as": "PDJ Score"
}
],
"mark": {
"type": "line",
"point": true
},
"encoding": {
"x": {"timeUnit": "year", "field": "date"},
"y": {"aggregate":"mean", "field": "price", "type": "quantitative"},
"color": {"field": "symbol", "type": "nominal"}
}
}
Error its not showing which line and any other details. Just giving below error.
Unexpected token =
Thanks in advance.