hi i am trying to create dropdown form kibana fill with some transaction id which coming from index , this is how my vega script look like
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 500,
"height": 200,
"autosize": "none",
"data": [
{
"name": "apiData",
"url": {
"%context%": true,
"%timefield%": "api_request_start_date",
"index": "*-summary*",
"body": {
"aggs": {
"1": {
"terms": {
"field": "fields.transaction_id",
"size": 10
}
}
}
},
"format": {
"type": "json",
"property": "aggregations.1.buckets"
}
}
}
],
"signals": [
{
"name": "selectedCategory",
"value": "",
"bind": {
"input": "select",
"options": {
"signal": "data('apiData').map(d => d.key)"
},
"name": "Select Category"
}
}
],
"marks": [
{
"type": "text",
"encode": {
"enter": {
"x": { "value": 50 },
"y": { "value": 50 },
"fontSize": { "value": 20 },
"fill": { "value": "black" }
},
"update": {
"text": {
"signal": "selectedCategory === '' ? 'Please select a category' : selectedCategory"
}
}
}
}
]
}
also i have check inspect of kibana and result coming as respected -
{
"took": 24,
"timed_out": false,
"_shards": {
"total": 36,
"successful": 36,
"skipped": 28,
"failed": 0
},
"hits": {
"total": 198476,
"max_score": 1,
"hits": [
{
"_index": "apideck-summary-2024-49-0001",
"_id": "80ff9910-8b52-4505-899f-351bd7d5b61a",
"_score": 1,
"_ignored": [
"processing_end_time",
"processing_start_time"
],
"_source": {
"principle_code": "3555",
"log_id": "80ff9910-8b52-4505-899f-351bd7d5b61a",
"fields.transaction_id": "80ff9910-8b52-4505-899f-351bd7d5b61a",
"tenant_code": "7715407",
"location_code": "",
"api_request_start_date": "2024-12-02 10:30:17.263",
"api_request_end_date": "2024-12-02 10:30:17.284",
}
},
]
},
"aggregations": {
"1": {
"doc_count_error_upper_bound": 8,
"sum_other_doc_count": 198466,
"buckets": [
{
"key": "00000ee0-1ffe-4e56-b613-f9c0e3438256",
"doc_count": 1
},
{
"key": "00005191-8b68-4b6c-a6b6-e64a300a6878",
"doc_count": 1
},
{
"key": "0001f34f-ca05-4a8a-8933-bf54f49b7827",
"doc_count": 1
},
{
"key": "00022078-b988-4100-9f27-4a6a52b46f5f",
"doc_count": 1
},
{
"key": "00024e42-8e19-4b18-9d9e-325e124249cf",
"doc_count": 1
},
{
"key": "00025017-cca4-418d-b7a9-fe92fbc13baf",
"doc_count": 1
},
{
"key": "00033317-6b9a-4239-8c93-ac4ebca1a329",
"doc_count": 1
},
{
"key": "00037bab-fa9d-4cde-ac9f-a950955daa85",
"doc_count": 1
},
{
"key": "00038aaf-0760-4547-b72c-1182b75ea643",
"doc_count": 1
},
{
"key": "0003cfde-3819-49ac-8045-3a51aa7da176",
"doc_count": 1
}
]
}
}
}
but still its giving me error
** n.options.forEach is not a function**
any help or suggestion in this .
thanks in advance