# How to get the query result used for visualize chart

**URL:** <https://discuss.elastic.co/t/how-to-get-the-query-result-used-for-visualize-chart/94188>\
**Category:** Kibana\
**Created:** [July 22, 2017, 3:56am UTC](https://discuss.elastic.co/t/how-to-get-the-query-result-used-for-visualize-chart/94188 "2017-07-22T03:56:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![qilifei](https://avatars.discourse-cdn.com/v4/letter/q/6f9a4e/32.png) [@qilifei](https://discuss.elastic.co/u/qilifei)\
**Post date:** [July 22, 2017, 3:56am UTC](https://discuss.elastic.co/t/how-to-get-the-query-result-used-for-visualize-chart/94188/1 "2017-07-22T03:56:08Z")

</div>

Hi , currently i have a json query and get the result in the dev tools. And I want to use it as the soure data in the Visualize chart . How can fulfill this goal ? thx.

![](https://us1.discourse-cdn.com/elastic/original/3X/6/9/6989edb897ed4738b4538361431dc1d1c47dfce2.png)

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [July 24, 2017, 4:59pm UTC](https://discuss.elastic.co/t/how-to-get-the-query-result-used-for-visualize-chart/94188/2 "2017-07-24T16:59:56Z")

</div>

There's no direct way to use your query to build a visualization. Kibana visualizations have their own data format, which uses some parts of Elasticsearch's query DSL, but it doesn't translate directly. Your best bet is simply to build that using the vis builder in Kibana. It's a pretty simple query.

If you're curious how the structure of visualizations works, you can create one, then navigate to Management \> Saved Objects. There, select the Visualizations tab, and open the one you created. You'll see how the DSL is build into the `visState`, along with a lot of the presentations information.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 21, 2017, 5:00pm UTC](https://discuss.elastic.co/t/how-to-get-the-query-result-used-for-visualize-chart/94188/3 "2017-08-21T17:00:10Z")

</div>

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