Modifying index data for visual based of user entered values?

I have some data I want to graph and display in a table. I want the user to be able to run scenarios where by they can add a "weight" multiplier to some of the values - I need to take the "raw" value and multiple it by the weight - I thought scripted fields may be of help, but I see no way to tie a scripted field to a user parameter - any thoughts ??

I am not sure if this is possible.

@flash1293 what do you think?


I can't think of a good way to achieve this in Kibana today - visualizations like table are optimized for reading data, you can't write (like changing a weight multiplier). If I understand you correctly you can achieve something like this by letting your user edit the scripted field definition and adding more clauses to it for the individual weights:

int weight = 1;
if (doc["myField"].value === "A") {
  weight = 3.4;
} else if (doc["myField"].value === "B") {
  weight = 2.1;
} else ...

return doc["myOtherField"].value * weight;

But the user would have to go back and forth from the visualization to the index pattern management page to do that.

This sounds like it's complex enough to justify the development of a custom visualization plugin that includes this logic and does it on the fly on behalf of the user.

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