Debugging

edit

Browser Debugging console

edit

Use browser debugging tools (e.g. F12 or Ctrl+Shift+J in Chrome) to inspect the VEGA_DEBUG variable: * view - access to the Vega View object. See Vega Debugging Guide on how to inspect data and signals at runtime. For Vega-Lite, VEGA_DEBUG.view.data('source_0') gets the main data set. For Vega, it uses the data name as defined in your Vega spec. * vega_spec - Vega JSON graph specification after some modifications by Kibana. In case of Vega-Lite, this is the output of the Vega-Lite compiler. * vegalite_spec - If this is a Vega-Lite graph, JSON specification of the graph before Vega-Lite compilation.

Data

edit

If you are using Elasticsearch query, make sure your resulting data is what you expected. The easiest way to view it is by using "networking" tab in the browser debugging tools (e.g. F12). Modify the graph slightly so that it makes a search request, and view the response from the server. Another approach is to use Kibana Dev Tools tab - place the index name into the first line: GET <INDEX_NAME>/_search, and add your query as the following lines (just the value of the "query" field)

If you need to share your graph with someone, you may want to copy the raw data response to gist.github.com, possibly with a .json extension, use the [raw] button, and use that url directly in your graph.

To restrict Vega from using non-ES data sources, add vega.enableExternalUrls: false to your kibana.yml file.