[DEV custom visualization]. Only field of type "number" are shown in linput list

Hello all.
I'm developing a custom visualization (Angular-Visualization).
My gol is using the "top hit" aggregation and keep the last entry of a field of type String.

This is what happens: I select "top hit" as aggr but in the fields list only fields of type "number" are shown. Where are the string fields? .
I tried to replicate the same thing on the core-visualization: data-table; over there it works.
On the same index of course...

I posted 2 photo too.
I'm in your hands. Ty.

Hi Marco,

unfortunately, this hasn't been solved the best possible way, when this aggregation was introduced and is currently hard-coded to allow string values only for table and metric vis explicitly, see top_hit.js.

Please feel free to open a feature request for that on our repository, that we find a better way to let each vis configure that itself.

Sorry, for that news.

Cheers,
Tim

Ty timroes.

I've specified the type: 'table'... still not working
custom_vis

Hi,

you would actually need to switch the name of your visualization to table. That's the ID of the visualization. But that way you will most likely break a lot of stuff, since you are now sharing the same ID than a build in visualization, so the vis system randomly will use one of the two vis implementations to load that stored visualization. So you might end up having your implementation handle actual table vis and vice versa. That's not what you want, so unfortunately you cannot or should not overwrite those ids.

Also as a side note: we are not recommending using createAngularVisualization anymore if you are currently starting to develop. We are currently in the process of removing Angular from Kibana (though you will still be able to use it by including it in your own plugin), but once we progress on that way, we'll actually deprecate that method and hopefully for 7.0 already remove it.

Cheers,
Tim

1 Like

Can I suggest you to write this (Angular deprecation) on the documentation? :sweat_smile: .

Anyway. Thx.

We actually have removed that angular method from all documentations (for the recent versions) :slight_smile:

Once we have a cleaner roadmap vision on when to remove it, we'll also put some deprecation warning into some developer documentation.

1 Like

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