Hi!
I want visualize data as a Gantt chart, i found some examples online with vega but i don't know why my piece of code does not work:
{
"$schema": "https://vega.github.io/schema/vega-lite/v3.json",
"description": "Gantt chart",
"data": {
"name": "data",
"url": {
%context%: true
%timefield%: @timestamp
"index": "logstash-nemo.apps.webui-*",
"body": {
size:3000
_source:[
"@timestamp",
"fields"
]
}
}
}
"transform": [
{
"type": "project",
"fields": ["fields.Method"],
"as": ["Method"]
},
{
"type": "project",
"fields": ["fields.startDate"],
"as": ["startDate"]
},
{
"type": "project",
"fields": ["fields.endDate"],
"as": ["endDate"]
},
]
"mark": "bar",
"encoding": {
"y": {"field": "_source.Method", "type": "ordinal"},
"x": {"field": "_source.startDate", "type": "temporal"},
"x2": {"field": "_source.endDate", "type": "temporal"}
}
}
the error is:
Cannot read property 'startDate' of undefined
in addiction kibana rejects my transformations
WARN Ignoring an invalid transform: {"as":["endDate"],"fields":["fields.endDate"],"type":"project"}.
Can you help me?