I have plotted a graph using Vegalite visualization in Kibana as shown below:
As it can be seen, Y-axis scale starts from 0 and goes upto 450. Though it covers the Maximum and Min values of Y variable but not efficiently. I want the scale of the graph to be between [Min-10, Max+10] so that granular details can be seen which we cannot see at the moment and a straight line is being shown.
Following is the code responsible for defining axis:
"repeat": {
"layer": ["Avg_Wght", "Set_Point"]
},
"spec": {
mark: "line",
encoding: {
x: {field: "time", "type": "temporal"},
y: {
"field": {"repeat": "layer"}
"aggregate": "mean"
}
"color": {
"datum": {"repeat": "layer"},
"type": "nominal"
}
}
}
If I use "scale": {"domain": [400, 420]}, it does restrict it as per my needs but it is not dynamic for all the records.