chenryn / kbn_sankey_vis

Sankey diagram for Kibana visualize.
Apache License 2.0
52 stars 47 forks source link

Issue while creating visualization (cached schema?) #1

Closed JuanCarniglia closed 8 years ago

JuanCarniglia commented 8 years ago

In Kibana 4.4.1, apparently, when creating a new visualization with the Sankey plugin, whenever I change the Terms field, they just keep getting added to the "nodes" collection. If I want to change the Terms field, I have to hit "Refresh" on the browser. That fixes it.

I think this has to do with the JSON that feeds the Sankey plugin, not being correctly updated or something. I'll take a look at the code and add some more information or propose a change.

JuanCarniglia commented 8 years ago

I figured it out. You are adding elements to the nodes array, and never setting it to [], you should set nodes = [] before inverting the array, in the aggregation routine.

chenryn commented 8 years ago

Could you send a pull request for this please? My MBP has some problem to run k4.4.1, so I can't verify this.

JuanCarniglia commented 8 years ago

I sent a PR for this, I modified the agg_response.js file, and I think the problem is solved.