Created
June 11, 2025 21:49
-
-
Save thomasneirynck/8e857803bf39b5097ae806c9ce9ed112 to your computer and use it in GitHub Desktop.
Lens panels after
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"type": "lens", | |
"config": { | |
"title": "Bar vertical stacked (ESQL)", | |
"visualizationType": "lnsXY", | |
"state": { | |
"dataSources": { | |
"27f63689-18d8-4356-b608-6da242da3b00": { | |
"type": "esql", | |
"query": "FROM kibana_sample_data_logs | STATS AVG(bytes) by BUCKET(timestamp, 100, ?_tstart, ?_tend)" | |
} | |
}, | |
"visualization": { | |
"layers": [ | |
{ | |
"layerType": "data", | |
"dataSource": "27f63689-18d8-4356-b608-6da242da3b00", | |
"seriesType": "bar_stacked", | |
"xAccessor": "BUCKET(timestamp, 100, ?_tstart, ?_tend)", | |
"accessors": ["AVG(bytes)"] | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"type": "lens", | |
"config": { | |
"title": "Bar vertical stacked (dataview)", | |
"visualizationType": "lnsXY", | |
"state": { | |
"dataSources": { | |
"8f8fdf1c-8b58-4e67-8f38-f0c811bf22d7": { | |
"type": "data_view", | |
"data_view": { | |
"type": "ad_hoc", | |
"config": { | |
"name": "kibana_sample_data_logs_ad_hoc", | |
"timeFieldName": "@timestamp", | |
"indexPattern": "kibana_sample_data_logs" | |
} | |
}, | |
"columns": [ | |
{ | |
"label": "@timestamp", | |
"dataType": "date", | |
"operationType": "date_histogram", | |
"sourceField": "@timestamp" | |
}, | |
{ | |
"label": "Average of bytes", | |
"operationType": "average", | |
"sourceField": "bytes" | |
} | |
] | |
} | |
}, | |
"visualization": { | |
"layers": [ | |
{ | |
"layerType": "data", | |
"dataSource": "8f8fdf1c-8b58-4e67-8f38-f0c811bf22d7", | |
"seriesType": "bar_stacked", | |
"xAccessor": 0, | |
"accessors": [1] | |
} | |
] | |
} | |
} | |
} | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Proposal of simplification of https://gist.github.com/thomasneirynck/0bb360811049f0437411c3b2c058a5f4