Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to submit Kibana Vega question

How to submit Kibana Vega question

It is usually very difficult to debug Vega questions without having your data. To make it easier, please follow these steps to include data with your graph when posting:

  • Reduce your data query to the smallest possible dataset, e.g. set the time range to 15 minutes. It will work as long as it is not empty and represents your data well enough.
  • Open Browser Debugger (for Chrome, right click and click Inspect)
  • Switch to the Console tab
  • Copy the right command, paste it in the console at the > symbol and hit enter (check the schema in your graph to see if you use Vega or Vega-Lite)
JSON.stringify(VEGA_DEBUG.vega_spec)  // <-- if you use Vega
JSON.stringify(VEGA_DEBUG.vegalite_spec)  // <-- if you use Vega-Lite
  • Copy the entire result string into your post, or if it is too big, attach it as a file.

Useful debugging tips

You can use VEGA_DEBUG for more than just exporting raw code with data. See debugging docs. Examlpes:

  • VEGA_DEBUG.view.data('mydatasource') -- shows data of a specific data source after all transformations. In Vega, use the data source names. Vega Lite automatically creates them for you - to see which ones were created, see the VEGA_DEBUG.vega_spec data section.
  • VEGA_DEBUG.view.signal('mysignal') -- shows the current value of a signal.
@a03nikki

This comment has been minimized.

Copy link

a03nikki commented Sep 18, 2019

❤️ 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.