Hello,
I am using vega-lite to finish my graph, but meet something confusion that how to set maximum degree scale in x-axis, just look at my pic
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"data": {
"url": {
"index": "projectindex-*",
"body": {
"query": {"match_all": {}},
"size": 0,
"aggs": {
"group_by_date": {
"date_histogram": {
"field": "timestamp",
"interval": "day"
},
"aggs": {
"cumulative_docs": {
"cumulative_sum": {"buckets_path": "_count"}
}
}
}
}
}
},
"format": {
"property": "aggregations.group_by_date.buckets"
}
},
"layer": [
{
"mark": {
"type": "line",
"point": {"filled": false, "fill": "black"}
}
},
{
"mark": {
"type": "text",
"align": "left",
"baseline": "middle",
"fontSize": 15
},
"encoding": {
"text": {"field": "cumulative_docs.value", "type": "quantitative"}
}
}
],
"encoding": {
"x": {
"axis": {"title": "day"},
"field": "key_as_string",
"type": "nominal"
},
"y": {
"aggregate": "y",
"axis": {"title": "projects"},
"field": "cumulative_docs.value",
"type": "quantitative",
"stack": "normalize"
}
}
}
My x-axis data is too large, I tried to cut my data from ES DSL, but it will impact my data integrity,because cumulative_sum and this aggs not size paramter, it I wanna adjust my size of x-axis in near 30 days, how can I fix my code?