I have the following JSON Structure:
{
"_index": "my_reports",
"_type": "_doc",
"_id": "ZNDj0GsOIHTBt-YGGDR",
"_version": 1,
"_score": null,
"_source": {
"@timestamp": "2019-07-08T09:21:32.352Z",
"@version": "1",
"config-name": "Hello team my",
"contact-number": "909900998709",
"my-type": "Hello my test",
"Team Details": {
"Developers": [{
"Name": "ABC",
"description": "Developers Team",
"tags": "4.1",
"resource_dependency": "HIGH",
"resource_availabilty": "Available"
}, {
"Name": "XYZ",
"description": "Developers Team",
"tags": "4.2",
"resource_dependency": "LOW",
"resource_availabilty": "Available"
}, {
"Name": "XXX",
"description": "Developers Team",
"tags": "4.3",
"resource_dependency": "HIGH",
"resource_availabilty": "Available"
}, {
"Name": "yyy",
"description": "Developers Team",
"tags": "4.4",
"resource_dependency": "HIGH",
"resource_availabilty": "Not-Available"
}],
"Testers": [{
"Name": "yyy",
"description": "QA Team",
"tags": "4.5",
"resource_dependency": "HIGH",
"resource_availabilty": "Not-Available"
}, {
"Name": "yyy",
"description": "QA Team",
"tags": "4.6",
"resource_dependency": "HIGH",
"resource_availabilty": "Available"
}, {
"Name": "yyy",
"description": "QA Team",
"tags": "4.7",
"resource_dependency": "HIGH",
"resource_availabilty": "Not-Available"
}]
}
},
"fields": {
"@timestamp": ["2019-07-08T09:21:32.352Z"]
},
"sort": [1562577687652]
}
Apologies for the long json.
I want to create a pie chart to show the resources that are available and not-available, something like below:
How could I achieve this , because I was not able to get this using term aggregation.
If I use term aggregation my Pie Chart always shows 50% for both available and not available, secondly I would like to understand the best approach to parse such jsons.