Fake trigger on Status.data object

Kibana version: 6.3.0

I'm developing my own Kibana-plugin, which is a basic Visualization Type plugin.
As the guide said:

Status object has the following properties: aggs, data, params, resize, time, uniState. Each of them is
set to true if the matching object changed since last call to the render function or set to false otherwise. You can use it to make your visualization rendering more efficient.

So I use this status.data change event to reformat the returned raw response data.

  1. But what I saw is if there's only a resize event or saving the the visualization [saving means resize too], the status.data object is always set to true if there's a Split Chart in your bucket. in this case, actually the data is not re-produced, it will make my program broken since it's a fake trigger. my bucket have terms/terms type and one split chart type.

  2. The first time you change a option always trigger the status.data and status.params. in this case, the data is really re-produced although it's still the same as the previous raw data.

In my case 1, if there's a status.data change, the returned raw data will be reformat, so while i'm saving the visualize, the status.data is set to true so it will trigger my reformat method, but unfortunately the 'return data' is actually not the new response but still the 'my previous formatted data'. so you know, my method will throws some errors since the data format is not raw response data.
Now I just add some code to judge if the status.data is really changed or not.:grinning:

the case 2 has no hurt to the code, but doesn't make sense.

basically you can use Tag visualize to reproduce it by adding one new Split Chart Bucket:
Open the tag visualize and add some data and Apply Changes.
first resize the frame/window: Status.data is true
second resize: Status.data is false
the following resize: Status.data is false;


Both of these sound like bugs to me. Would you mind opening an issue at https://github.com/elastic/kibana/issues ? Please include as much detail as you can.

I will do.
Add one note for me: everything changes in the Data tab will result in status.data changed.
And if only some labels changed, then we don't need to re-plot all the chart but only need to update the labels. so here we need to compare if the raw data response[not about the label ...] is changed or not, actually raw data is not updated if only some labels changed. that's is say, we always need to check if the raw data response[not about the label...] is changed or not.

the issue created:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.