Hi All,
I am beginner in kibana visualizatoin. I am trying to create a facit chart with stacked bar graphs. But I am unable to get scroll bars in the final graph. Kindly help me get scroll bars in vega-lite visualization.
Here is the code snippet:
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.3.1.json",
"autosize":
{
"type": "pad",
"resize": false
},
"data":
{
"url": {
"%context%": true,
"index": "vizcheck"
"body":
{
"aggs" : {
"eqpt_buckets": {
"composite" : {
"size": 5000,
"sources" :
[
{
"EPID":
{"terms" :
{
"field": "EPID"
}
}
},
{
"DATE":
{"terms" :
{"field": "DATE"
}
}
},
{
"CC_E":
{"terms" :
{"field": "CC_E"
}
}
},
{
"ITEMS":
{
"terms":
{"field": "ITEMS"
}
}
}
]
}
}
}
}
}
"format": {property: "aggregations.eqpt_buckets.buckets"}
},
"transform":
[
{"calculate": "datum.key.EPID",
"as": "EPID"
},
{"calculate": "datum.key.DATE",
"as": "DATE"},
{"calculate": "datum.key.CC_E",
"as": "CC_E"
},
{"calculate": "datum.key.ITEMS",
"as": "ITEMS"
}
],
"mark": "bar",
"config":
{
"size":
{
"height": 200,
"width": 200
},
}
"encoding":
{
"x":
{
"field": "DATE",
"type": "temporal",
},
"y":
{
"field":"ITEMS",
"aggregate": "sum",
"type": "quantitative"
}
,
"color":
{
"field": "CC_E",
"type": "nominal"
},
"row":
{
"field": "EPID",
"type": "nominal"
}
}
}
Data looks like
EPID, ITEMS, Date, CC_E
A1, 50, 3/20/2019, 5
A2, 60, 3/20/2019, 4
Thanks & Regards
Suhas Gupta