Hi community,
with directly in json embedded data a dynamic text will work like this:
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"data": {
"name": "dataName",
"values": [
{"c1": "1", "c2": "2", "text": "TextboxText01"},
{"c1": "1", "c2": "2", "text": "TextboxText01"},
]
},
"marks":[
{"type": "text",
"encode": {
"enter": {
"text": {"signal": "data('dataName')[0]['text']"},
}
}
},
]
}
The textbox shows 'TextboxText01'. But when I try to do the same with a Kibana-Dataview the procedure fails and it just doesn't show anything
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"data": {
"name":"dataName"
"url": {
"index": "questions",
}
"format": {"property": "hits.hits"}
},
"marks":[
{"type": "text",
"encode": {
"enter": {
"text": {"signal": "data('dataName')[0]['questionText']"}
}
}
}
]
}
Thereby 'questionText' is one field of the index 'questions'. What would be the correct expression to show one field of the index (of one row, of course) in the textbox?