What happened to editableVis()

We are in the process of upgrading from Kibana 5.6 to 6.5.4. In 5.6, we had access to a function, vis.getEditableVis(). In custom visualizations, this would give give access to the part of the scope that was being watched by the 'Apply changes' button. That function is not available in 6.5.4. It seems like what is used now is $scope.editorState, however I do not have that in my scope in a custom visualization. Where does the editorState get created and how do I make it available in my custom vis?

Found something in the blog for 6.4 that says vis.params should be moved to editorState.params, but it doesn't give much more information.

This was removed with a refactoring which was done for 6.0: https://github.com/elastic/kibana/pull/11786, in an effort to move away from visualizations being explicitly written in AngularJS.

https://www.elastic.co/blog/developing-new-kibana-visualizations should provide an explanation of the refactoring which took place during 6.0, and the public APIs are now documented here: https://www.elastic.co/guide/en/kibana/6.5/development-create-visualization.html


In 6.x we have Angular visualization type, but also Base (pure js) and React. The angular visualization type is deprecated, and will be removed with 7.0, so it might make more sense (if possible) to migrate your custom visualization directly to either Base or React visualization type.

Do you think that would be possible ?

We have some documentation around developing new visualizations: https://www.elastic.co/guide/en/kibana/6.5/development-create-visualization.html

and there is this blog post:

However things are a bit in flux atm, so things might already change since this blog post, but it still quite close to what we have today.

quick question to your answer above:
$scope.vis.params should give you access to your visualization parameters ...

and calling $scope.vis.updateState() will reload visualization with your changes to vis.params

hope this helps, best regards

Thanks. The blog was helpful, but it still uses the vis.params example. I was able to get it to work by using editorState.params in the HTML file. Thanks for the info on the angular visualizations. Most of our custom visualizations are angular.

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