Hi I am developing a custom plugin for visualisation, but the issue is that in the dashboard when I resize the plugin, the size of my visualisation doesn't change with the container.
As an alternative I've set a watcher on the draggable container's CSS as whenever the height or width of the container changes, it pipes the values to my plugin and size of my visualisation changes, but it takes an instance of only one container and if there are multiple similar visualisations in the same dashboard then they will be resizing based on one container only. So this is not working out well and also isn't appropriate.
Apart from this I am also watching appstate in which I can get some values in this form :
{
"title": "New Dashboard",
"panels": [
{
"id": "aaaa",
"type": "visualization",
"panelIndex": 1,
"size_x": 7,
"size_y": 2,
"col": 1,
"row": 1
},
{
"id": "Testing21sep2017",
"type": "visualization",
"panelIndex": 2,
"size_x": 3,
"size_y": 2,
"col": 8,
"row": 1
},
{
"id": "test",
"type": "visualization",
"panelIndex": 3,
"size_x": 6,
"size_y": 2,
"col": 1,
"row": 3
}
],
"options": {
"darkTheme": false
},
"uiState": {},
"query": {
"query_string": {
"query": "*",
"analyze_wildcard": true
}
},
"filters": []
}
I can use the size_x and size_y inside panels but can't map it with a value where I can detect that this is my custom visualisation's object.
Please help me out.