Vega Beeswarm

I am trying to use the Beeswarm chart in Vega visualisation, but I am unable to get data points to display. When I get to the
"marks": [

  • {*
  •  "name": "nodes",*
    
  •  "data": "people.",*
    

element should this be the named data table or something else?

Has anyone managed to use the Beeswarm chart connected to index data?

Hi @GavinBeattie,

At the moment, Kibana only supports Vega-lite visualizations. Apparently, Beeswarm is only available in the full version of vega (https://github.com/vega/vega-lite/issues/3421). However, maybe you can still achieve something similar via the Box Plot type in Vega-Lite?

UPDATE: Kibana DOES support Vega visualisations. Scratching out my comment.

Hi @afhero,
Thanks for reply, but I got it working.

The trick seems to be that the data needs a name element that can be picked up later on:
// Define the data source
data: {
name: "people"
url: {
// Apply dashboard context filters when set
%context%: true
// Filter the time picker (upper right corner) with this field
%timefield%: startDateTime

/*
See .search() documentation for : https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-search
*/
################################
Then pick up the same name for other elements:
"marks": [
{
"name": "nodes",
"type": "symbol",
"from": {"data": "people"},
"encode": {
"enter": {
"fill": {"scale": "color", "field": "_source.jobGrade"},
"xfocus": {"scale": "xscale", "field": "_source.relationshipStrength", "band": 0.5},
"yfocus": {"scale": "yscale", "field": "_source.potentialSupport", "band": 0.5}

It might be worth adding the name element to the built in visualisation template.

1 Like

Cool! Thank you for sharing your findings! I'm sure other folks will appreciate (I personally do) :heart:

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