Skip to content

Commit 58a1d93

Browse files
committed
Merge remote-tracking branch 'upstream/master' into 81738
2 parents 6952981 + 72f36b4 commit 58a1d93

File tree

218 files changed

+2122
-2463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+2122
-2463
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [exporters](./kibana-plugin-plugins-data-public.exporters.md)
4+
5+
## exporters variable
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
exporters: {
11+
datatableToCSV: typeof datatableToCSV;
12+
CSV_MIME_TYPE: string;
13+
}
14+
```

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
| [esFilters](./kibana-plugin-plugins-data-public.esfilters.md) | |
109109
| [esKuery](./kibana-plugin-plugins-data-public.eskuery.md) | |
110110
| [esQuery](./kibana-plugin-plugins-data-public.esquery.md) | |
111+
| [exporters](./kibana-plugin-plugins-data-public.exporters.md) | |
111112
| [extractSearchSourceReferences](./kibana-plugin-plugins-data-public.extractsearchsourcereferences.md) | |
112113
| [fieldFormats](./kibana-plugin-plugins-data-public.fieldformats.md) | |
113114
| [fieldList](./kibana-plugin-plugins-data-public.fieldlist.md) | |
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [exporters](./kibana-plugin-plugins-data-server.exporters.md)
4+
5+
## exporters variable
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
exporters: {
11+
datatableToCSV: typeof datatableToCSV;
12+
CSV_MIME_TYPE: string;
13+
}
14+
```

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
| [esFilters](./kibana-plugin-plugins-data-server.esfilters.md) | |
7777
| [esKuery](./kibana-plugin-plugins-data-server.eskuery.md) | |
7878
| [esQuery](./kibana-plugin-plugins-data-server.esquery.md) | |
79+
| [exporters](./kibana-plugin-plugins-data-server.exporters.md) | |
7980
| [fieldFormats](./kibana-plugin-plugins-data-server.fieldformats.md) | |
8081
| [indexPatterns](./kibana-plugin-plugins-data-server.indexpatterns.md) | |
8182
| [mergeCapabilitiesWithFields](./kibana-plugin-plugins-data-server.mergecapabilitieswithfields.md) | |

docs/user/dashboard/tutorials.asciidoc

Lines changed: 28 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ Now that you've created your *Lens* visualization, add it to a <<dashboard,dashb
7676
[[vega-lite-tutorial-create-your-first-visualizations]]
7777
=== Create your first visualization with Vega-Lite
7878

79-
experimental[]
80-
8179
In this tutorial, you will learn about how to edit Vega-Lite in {kib} to create
8280
a stacked area chart from an {es} search query. It will give you a starting point
8381
for a more comprehensive
@@ -88,7 +86,7 @@ In this tutorial, you will build a stacked area chart from one of the {kib} samp
8886
sets.
8987

9088
[role="screenshot"]
91-
image::visualize/images/vega_lite_tutorial_1.png[]
89+
image::visualize/images/vega_lite_tutorial_1.png[Vega-Lite tutorial stacked area chart]
9290

9391
Before beginning this tutorial, install the <<add-sample-data, eCommerce sample data>>
9492
set.
@@ -98,7 +96,7 @@ line chart which shows the total number of documents across all your indices
9896
within the time range.
9997

10098
[role="screenshot"]
101-
image::visualize/images/vega_lite_default.png[]
99+
image::visualize/images/vega_lite_default.png[Vega-Lite tutorial default visualization]
102100

103101
The text editor contains a Vega-Lite spec written in https://hjson.github.io/[HJSON],
104102
which is similar to JSON but optimized for human editing. HJSON supports:
@@ -134,7 +132,7 @@ Click "Update". The result is probably not what you expect. You should see a fla
134132
line with 0 results.
135133

136134
You've only changed the index, so the difference must be the query is returning
137-
no results. You can try the <<vega-browser-debugging-console, Vega debugging process>>,
135+
no results. You can try the <<vega-debugging, Vega debugging process>>,
138136
but intuition may be faster for this particular problem.
139137

140138
In this case, the problem is that you are querying the field `@timestamp`,
@@ -332,38 +330,29 @@ your spec:
332330

333331
If you copy and paste that into your Vega-Lite spec, and click "Update",
334332
you will see a warning saying `Infinite extent for field "key": [Infinity, -Infinity]`.
335-
Let's use our <<vega-browser-debugging-console, Vega debugging skills>> to understand why.
333+
Let's use our <<vega-inspector, Vega debugging skills>> to understand why.
336334

337335
Vega-Lite generates data using the names `source_0` and `data_0`. `source_0` contains
338336
the results from the {es} query, and `data_0` contains the visually encoded results
339337
which are shown in the chart. To debug this problem, you need to compare both.
340338

341-
To look at the source, open the browser dev tools console and type
342-
`VEGA_DEBUG.view.data('source_0')`. You will see:
339+
To inspect data sets, go to *Inspect* and select *View: Vega debug*. You will see a menu with different data sources:
343340

344-
```js
345-
[{
346-
doc_count: 454
347-
key: "Men's Clothing"
348-
time_buckets: {buckets: Array(57)}
349-
Symbol(vega_id): 12822
350-
}, ...]
351-
```
341+
[role="screenshot"]
342+
image::visualize/images/vega_lite_tutorial_3.png[Data set selector showing root, source_0, data_0, and marks]
352343

353-
To compare to the visually encoded data, open the browser dev tools console and type
354-
`VEGA_DEBUG.view.data('data_0')`. You will see:
344+
To look closer at the raw data in Vega, select the option for `source_0` in the dropdown:
355345

356-
```js
357-
[{
358-
doc_count: 454
359-
key: NaN
360-
time_buckets: {buckets: Array(57)}
361-
Symbol(vega_id): 13879
362-
}]
363-
```
346+
[role="screenshot"]
347+
image::visualize/images/vega_lite_tutorial_4.png[Table for data_0 with columns key, doc_count and array of time_buckets]
348+
349+
To compare to the visually encoded data, change the dropdown selection to `data_0`. You will see:
350+
351+
[role="screenshot"]
352+
image::visualize/images/vega_lite_tutorial_5.png[Table for data_0 where the key is NaN instead of a string]
364353

365354
The issue seems to be that the `key` property is not being converted the right way,
366-
which makes sense because the `key` is now `Men's Clothing` instead of a timestamp.
355+
which makes sense because the `key` is now category (`Men's Clothing`, `Women's Clothing`, etc.) instead of a timestamp.
367356

368357
To fix this, try updating the `encoding` of your Vega-Lite spec to:
369358

@@ -382,21 +371,13 @@ To fix this, try updating the `encoding` of your Vega-Lite spec to:
382371
}
383372
```
384373

385-
This will show more errors, and you can inspect `VEGA_DEBUG.view.data('data_0')` to
374+
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
386375
understand why. This now shows:
387376

388-
```js
389-
[{
390-
doc_count: 454
391-
key: "Men's Clothing"
392-
time_buckets: {buckets: Array(57)}
393-
time_buckets.buckets.doc_count: undefined
394-
time_buckets.buckets.key: null
395-
Symbol(vega_id): 14094
396-
}]
397-
```
377+
[role="screenshot"]
378+
image::visualize/images/vega_lite_tutorial_6.png[Table for data_0 showing that the column time_buckets.buckets.key is undefined]
398379

399-
It looks like the problem is that the `time_buckets` inner array is not being
380+
It looks like the problem is that the `time_buckets.buckets` inner array is not being
400381
extracted by Vega. The solution is to use a Vega-lite
401382
https://vega.github.io/vega-lite/docs/flatten.html[flatten transformation], available in {kib} 7.9 and later.
402383
If using an older version of Kibana, the flatten transformation is available in Vega
@@ -411,23 +392,10 @@ Add this section in between the `data` and `encoding` section:
411392
```
412393

413394
This does not yet produce the results you expect. Inspect the transformed data
414-
by typing `VEGA_DEBUG.view.data('data_0')` into the console again:
395+
by selecting `data_0` in *Data sets* again:
415396

416-
```js
417-
[{
418-
doc_count: 453
419-
key: "Men's Clothing"
420-
time_bucket.buckets.doc_count: undefined
421-
time_buckets: {buckets: Array(57)}
422-
time_buckets.buckets: {
423-
key_as_string: "2020-06-30T15:00:00.000Z",
424-
key: 1593529200000,
425-
doc_count: 2
426-
}
427-
time_buckets.buckets.key: null
428-
Symbol(vega_id): 21564
429-
}]
430-
```
397+
[role="screenshot"]
398+
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]
431399

432400
The debug view shows `undefined` values where you would expect to see numbers, and
433401
the cause is that there are duplicate names which are confusing Vega-Lite. This can
@@ -564,7 +532,9 @@ Now that you've enabled a selection, try moving the mouse around the visualizati
564532
and seeing the points respond to the nearest position:
565533

566534
[role="screenshot"]
567-
image::visualize/images/vega_lite_tutorial_2.png[]
535+
image::visualize/images/vega_lite_tutorial_2.png[Vega-Lite tutorial selection enabled]
536+
537+
The selection is controlled by a Vega signal, and can be viewed using the <<vega-inspector, Vega Inspector>>.
568538

569539
The final result of this tutorial is this spec:
570540

@@ -683,8 +653,6 @@ The final result of this tutorial is this spec:
683653
[[vega-tutorial-update-kibana-filters-from-vega]]
684654
=== Update {kib} filters from Vega
685655

686-
experimental[]
687-
688656
In this tutorial you will build an area chart in Vega using an {es} search query,
689657
and add a click handler and drag handler to update {kib} filters.
690658
This tutorial is not a full https://vega.github.io/vega/tutorials/[Vega tutorial],
@@ -935,6 +903,7 @@ The first step is to add a new `signal` to track the X position of the cursor:
935903
}]
936904
}
937905
```
906+
To learn more about inspecting signals, explore the <<vega-inspector, Vega Inspector>>.
938907

939908
Now add a new `mark` to indicate the current cursor position:
940909

@@ -1756,4 +1725,4 @@ Customize and format the visualization using functions:
17561725
image::images/timelion-conditional04.png[]
17571726
{nbsp}
17581727

1759-
For additional information on Timelion conditional capabilities, go to https://www.elastic.co/blog/timeseries-if-then-else-with-timelion[I have but one .condition()].
1728+
For additional information on Timelion conditional capabilities, go to https://www.elastic.co/blog/timeseries-if-then-else-with-timelion[I have but one .condition()].
18.3 KB
Loading
64.3 KB
Loading
85 KB
Loading
71.6 KB
Loading
171 KB
Loading

0 commit comments

Comments
 (0)