-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Vega] Tutorials should be updated to include new inspector #83797
[Vega] Tutorials should be updated to include new inspector #83797
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The vega-lite tutorial looks good! Can you also make a few more related changes?
-
Because you've moved most of the JSON configuration into images, I think we need to add a more detailed title text instead of leaving the titles empty in
[]
-
The Vega tutorial that uses signals doesn't link to the vega-inspector docs, can you add a link about debugging signals? I think it belongs right after the text "The first step is to add a new signal to track the X position of the cursor:"
-
This is not directly related, but both of the Vega tutorials have the "Experimental" warning at the top. Can you remove this?
…emove experimental caption
Pinging @elastic/kibana-app (Team:KibanaApp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some more wording comments, specifically adding captions that explain the contents of the image.
}] | ||
``` | ||
[role="screenshot"] | ||
image::visualize/images/vega_lite_tutorial_4.png[Vega-Lite tutorial Data sets source] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image::visualize/images/vega_lite_tutorial_4.png[Vega-Lite tutorial Data sets source] | |
image::visualize/images/vega_lite_tutorial_4.png[Table for data_0 with columns key, doc_count and array of time_buckets] |
}, ...] | ||
``` | ||
[role="screenshot"] | ||
image::visualize/images/vega_lite_tutorial_3.png[Vega-Lite tutorial Inspector Data sets] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image::visualize/images/vega_lite_tutorial_3.png[Vega-Lite tutorial Inspector Data sets] | |
image::visualize/images/vega_lite_tutorial_3.png[Data set selector showing root, source_0, data_0, and marks] |
To compare to the visually encoded data, change dropdown selection to `data_0`. You will see: | ||
|
||
[role="screenshot"] | ||
image::visualize/images/vega_lite_tutorial_5.png[Vega-Lite tutorial Data sets data] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image::visualize/images/vega_lite_tutorial_5.png[Vega-Lite tutorial Data sets data] | |
image::visualize/images/vega_lite_tutorial_5.png[Table for data_0 where the key is NaN instead of a string] |
}] | ||
``` | ||
[role="screenshot"] | ||
image::visualize/images/vega_lite_tutorial_6.png[Vega-Lite tutorial Data sets updated data] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image::visualize/images/vega_lite_tutorial_6.png[Vega-Lite tutorial Data sets updated data] | |
image::visualize/images/vega_lite_tutorial_6.png[Table for data_0 showing that the column time_buckets.buckets.key is undefined] |
}] | ||
``` | ||
[role="screenshot"] | ||
image::visualize/images/vega_lite_tutorial_7.png[Vega-Lite tutorial Data sets transformed data] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image::visualize/images/vega_lite_tutorial_7.png[Vega-Lite tutorial Data sets transformed data] | |
image::visualize/images/vega_lite_tutorial_7.png[Table showing data_0 with multiple pages of results, but undefined values in the column time_buckets.buckets.key] |
|
||
Vega-Lite generates data using the names `source_0` and `data_0`. `source_0` contains | ||
the results from the {es} query, and `data_0` contains the visually encoded results | ||
which are shown in the chart. To debug this problem, you need to compare both. | ||
|
||
To look at the source, open the browser dev tools console and type | ||
`VEGA_DEBUG.view.data('source_0')`. You will see: | ||
To inspect data sets, go to *Inspect* and select *View: Vega debug*. You will see: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To inspect data sets, go to *Inspect* and select *View: Vega debug*. You will see: | |
To inspect data sets, go to *Inspect* and select *View: Vega debug*. You will see a menu with different data sources: |
|
||
To compare to the visually encoded data, open the browser dev tools console and type | ||
`VEGA_DEBUG.view.data('data_0')`. You will see: | ||
To look closer at the source, select the matching option in the dropdown. It looks like: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To look closer at the source, select the matching option in the dropdown. It looks like: | |
To look closer at the raw data in Vega, select the option for `source_0` in the dropdown: |
[role="screenshot"] | ||
image::visualize/images/vega_lite_tutorial_4.png[Vega-Lite tutorial Data sets source] | ||
|
||
To compare to the visually encoded data, change dropdown selection to `data_0`. You will see: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To compare to the visually encoded data, change dropdown selection to `data_0`. You will see: | |
To compare to the visually encoded data, change the dropdown selection to `data_0`. You will see: |
@@ -382,19 +371,11 @@ To fix this, try updating the `encoding` of your Vega-Lite spec to: | |||
} | |||
``` | |||
|
|||
This will show more errors, and you can inspect `VEGA_DEBUG.view.data('data_0')` to | |||
This will show more errors, and you can inspect `data_0` to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will show more errors, and you can inspect `data_0` to | |
This will show more errors, so you need to debug. Click *Inspect*, switch the view to *Vega Debug*, and switch to look at the visually encoded data in `data_0` to |
@@ -564,7 +532,7 @@ Now that you've enabled a selection, try moving the mouse around the visualizati | |||
and seeing the points respond to the nearest position: | |||
|
|||
[role="screenshot"] | |||
image::visualize/images/vega_lite_tutorial_2.png[] | |||
image::visualize/images/vega_lite_tutorial_2.png[Vega-Lite tutorial selection enabled] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image::visualize/images/vega_lite_tutorial_2.png[Vega-Lite tutorial selection enabled] | |
image::visualize/images/vega_lite_tutorial_2.png[Vega-Lite tutorial selection enabled] | |
The selection is controlled by a Vega signal, and can be viewed using the <<vega-inspector, Vega Inspector>>. |
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. One last comment before merging: can you make sure the title and description of the PR are in their final state? I noticed that the checklist for PRs is empty.
…83797) * [Vega] Tutorials should be updated to include new inspector * Revert unnecessary changes * Add titles to the screenshots. paste the link to vega inspector and remove experimental caption * Update some captions * Update docs/user/dashboard/tutorials.asciidoc Co-authored-by: Wylie Conlon <wylieconlon@gmail.com> Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
…84211) * [Vega] Tutorials should be updated to include new inspector * Revert unnecessary changes * Add titles to the screenshots. paste the link to vega inspector and remove experimental caption * Update some captions * Update docs/user/dashboard/tutorials.asciidoc Co-authored-by: Wylie Conlon <wylieconlon@gmail.com> Co-authored-by: Wylie Conlon <wylieconlon@gmail.com> Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Closes #74423
Summary
Checklist