How can I get the data from Elasticsearch which build the Visualization


I would check if there is a way to get the data from Elasticsearch which builds the Visualization. Let's take this Pie like an example:

Now if I click in the red area, I can access to the response which is a list of accounts where the balance is between X and Y (I need the documents).

I don't need this response :wink: :

Other question, can I access to source code of the Pie plugin and add this this click event ? or I need to build my own Pie plugin ?

Thanks for advance guys ^^

hmm, you need the list of documents that are in that range. Easiest way is to have a saved search and the pie on the same dashboard. If you set the filter on the pie chart, the list of documents will be shown in the saved search. You can specify a set of filters for the data. You can specify a filter as a query string or in JSON format, just as in the Discover search bar. Click Add Filter to add another filter. Click the images/labelbutton.png label button to open the label field, where you can type in a name to display on the visualization.


1 Like

Thank you for the reply @rashmi :slight_smile:, I already know that (maybe I didn't explain well my use case). For example, if I click in this row (see the picture):

I can see the 402 hits or documents (instead of going to the Discover and add the same filter to display the data from Elasticsearch... ) I hope the requirement is clear now :smile:

I need to get the 402 hits which build the Red area which I talked about it on the main topic). Is that possible now? If yes, how can I do that? if no, have I develop my own Pie plugin (Pie is an example here, if I need the same requirement in other Visualization, I have to recreate it by myself) ?

Best regards ^^

Hello, the same thing should happen when you click the Pie and when you click the Row in the table. It basically generates a filter that will only show the values in that row/slice. You are looking in the request information right there.

What Rasmi suggested is the way to see all those 402 documents without going to Discover.
1 Create your Pie Chart.
2. Open Discover and click on Save without any filter added there. This will generate a saved search that can be embedded on a dashboard.
3. Create a dashboard with the Pie Chart and the Saved Search next to it.
4. If you click on the slice of the Pie, the saved search will filter to only see those 402 documents.

1 Like

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