问题
I am trying to use Vega in Kibana and I have trouble manage data that are sub-object within the data.
It is working fine with https://vega.github.io/editor/#/edited but when I do it with Kibana, it doesn't work.
Vega-editor:
Kibana:
I have tried a lot of things to access the typology, I am stuck now.
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"title": "Test",
"datasets": {
"stores": [
{
"storeId": "toto",
"info": {
"typology": "type1"
}
},
{
"storeId": "tata",
"info": {
"typology": "type1"
}
},
{
"storeId": "titi",
"info": {
"typology": "type2"
}
}
],
"labelsTimelines": [
{
"storeId": "toto",
"value": 1000
},
{
"storeId": "tata",
"value": 2234
},
{
"storeId": "titi",
"value": 3
}
]
},
"data": {
"name": "stores"
},
"transform": [
{
"lookup": "storeId",
"from": {
"data": {
"name": "labelsTimelines"
},
"key": "storeId",
"fields": [
"value"
]
}
}
],
"mark": "bar",
"encoding": {
"y": {
"aggregate": "sum",
"field": "value",
"type": "quantitative"
},
"x": {
"field": "info.typology",
"type": "ordinal"
}
}
Thanks in advance!
来源:https://stackoverflow.com/questions/64375357/vega-lite-kibana-difference-to-manage-json-object