diff --git a/docs/CHANGELOG.asciidoc b/docs/CHANGELOG.asciidoc index 23b7ff85aa51..8f7a9ef20002 100644 --- a/docs/CHANGELOG.asciidoc +++ b/docs/CHANGELOG.asciidoc @@ -2694,7 +2694,7 @@ image::images/timelion-vis-paste-expression.png[Timelion advanced editor UI] The Timelion visualization panel appears on the dashboard. + [role="screenshot"] -image::images/timelion-dashboard.png[Final dashboard with saved Timelion app worksheet] +image::user/dashboard/images/timelion-dashboard.png[Final dashboard with saved Timelion app worksheet] [float] [[breaking-v7.10.0]] diff --git a/docs/development/core/server/kibana-plugin-core-server.md b/docs/development/core/server/kibana-plugin-core-server.md index ac8930c52ac5..87b609d788e9 100644 --- a/docs/development/core/server/kibana-plugin-core-server.md +++ b/docs/development/core/server/kibana-plugin-core-server.md @@ -317,6 +317,7 @@ The plugin integrates with the core system via lifecycle events: `setup` | [SavedObjectsImportHook](./kibana-plugin-core-server.savedobjectsimporthook.md) | A hook associated with a specific saved object type, that will be invoked during the import process. The hook will have access to the objects of the registered type.Currently, the only supported feature for import hooks is to return warnings to be displayed in the UI when the import succeeds. The only interactions the hook can have with the import process is via the hook's response. Mutating the objects inside the hook's code will have no effect. | | [SavedObjectsImportWarning](./kibana-plugin-core-server.savedobjectsimportwarning.md) | Composite type of all the possible types of import warnings.See [SavedObjectsImportSimpleWarning](./kibana-plugin-core-server.savedobjectsimportsimplewarning.md) and [SavedObjectsImportActionRequiredWarning](./kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.md) for more details. | | [SavedObjectsNamespaceType](./kibana-plugin-core-server.savedobjectsnamespacetype.md) | The namespace type dictates how a saved object can be interacted in relation to namespaces. Each type is mutually exclusive: \* single (default): This type of saved object is namespace-isolated, e.g., it exists in only one namespace. \* multiple: This type of saved object is shareable, e.g., it can exist in one or more namespaces. \* multiple-isolated: This type of saved object is namespace-isolated, e.g., it exists in only one namespace, but object IDs must be unique across all namespaces. This is intended to be an intermediate step when objects with a "single" namespace type are being converted to a "multiple" namespace type. In other words, objects with a "multiple-isolated" namespace type will be \*share-capable\*, but will not actually be shareable until the namespace type is changed to "multiple". \* agnostic: This type of saved object is global. | +| [SavedObjectTypeExcludeFromUpgradeFilterHook](./kibana-plugin-core-server.savedobjecttypeexcludefromupgradefilterhook.md) | If defined, allows a type to run a search query and return a query filter that may match any documents which may be excluded from the next migration upgrade process. Useful for cleaning up large numbers of old documents which are no longer needed and may slow the migration process.If this hook fails, the migration will proceed without these documents having been filtered out, so this should not be used as a guarantee that these documents have been deleted.Experimental and subject to change | | [SavedObjectUnsanitizedDoc](./kibana-plugin-core-server.savedobjectunsanitizeddoc.md) | Describes Saved Object documents from Kibana < 7.0.0 which don't have a references root property defined. This type should only be used in migrations. | | [ScopeableRequest](./kibana-plugin-core-server.scopeablerequest.md) | A user credentials container. It accommodates the necessary auth credentials to impersonate the current user.See [KibanaRequest](./kibana-plugin-core-server.kibanarequest.md). | | [ServiceStatusLevel](./kibana-plugin-core-server.servicestatuslevel.md) | A convenience type that represents the union of each value in [ServiceStatusLevels](./kibana-plugin-core-server.servicestatuslevels.md). | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectstype.excludeonupgrade.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectstype.excludeonupgrade.md new file mode 100644 index 000000000000..f5446b37dc29 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectstype.excludeonupgrade.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsType](./kibana-plugin-core-server.savedobjectstype.md) > [excludeOnUpgrade](./kibana-plugin-core-server.savedobjectstype.excludeonupgrade.md) + +## SavedObjectsType.excludeOnUpgrade property + +If defined, allows a type to exclude unneeded documents from the migration process and effectively be deleted. See [SavedObjectTypeExcludeFromUpgradeFilterHook](./kibana-plugin-core-server.savedobjecttypeexcludefromupgradefilterhook.md) for more details. + +Signature: + +```typescript +excludeOnUpgrade?: SavedObjectTypeExcludeFromUpgradeFilterHook; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectstype.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectstype.md index c3aba5261561..bdb90be2bc8f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectstype.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectstype.md @@ -52,6 +52,7 @@ Example after converting to a multi-namespace (shareable) type in 8.1: ``` Note: migration function(s) can be optionally specified for any of these versions and will not interfere with the conversion process. | +| [excludeOnUpgrade](./kibana-plugin-core-server.savedobjectstype.excludeonupgrade.md) | SavedObjectTypeExcludeFromUpgradeFilterHook | If defined, allows a type to exclude unneeded documents from the migration process and effectively be deleted. See [SavedObjectTypeExcludeFromUpgradeFilterHook](./kibana-plugin-core-server.savedobjecttypeexcludefromupgradefilterhook.md) for more details. | | [hidden](./kibana-plugin-core-server.savedobjectstype.hidden.md) | boolean | Is the type hidden by default. If true, repositories will not have access to this type unless explicitly declared as an extraType when creating the repository.See [createInternalRepository](./kibana-plugin-core-server.savedobjectsservicestart.createinternalrepository.md). | | [indexPattern](./kibana-plugin-core-server.savedobjectstype.indexpattern.md) | string | If defined, the type instances will be stored in the given index instead of the default one. | | [management](./kibana-plugin-core-server.savedobjectstype.management.md) | SavedObjectsTypeManagementDefinition<Attributes> | An optional [saved objects management section](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.md) definition for the type. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjecttypeexcludefromupgradefilterhook.md b/docs/development/core/server/kibana-plugin-core-server.savedobjecttypeexcludefromupgradefilterhook.md new file mode 100644 index 000000000000..bd1c43529895 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjecttypeexcludefromupgradefilterhook.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectTypeExcludeFromUpgradeFilterHook](./kibana-plugin-core-server.savedobjecttypeexcludefromupgradefilterhook.md) + +## SavedObjectTypeExcludeFromUpgradeFilterHook type + +If defined, allows a type to run a search query and return a query filter that may match any documents which may be excluded from the next migration upgrade process. Useful for cleaning up large numbers of old documents which are no longer needed and may slow the migration process. + +If this hook fails, the migration will proceed without these documents having been filtered out, so this should not be used as a guarantee that these documents have been deleted. + +Experimental and subject to change + +Signature: + +```typescript +export declare type SavedObjectTypeExcludeFromUpgradeFilterHook = (toolkit: { + readonlyEsClient: Pick; +}) => estypes.QueryDslQueryContainer | Promise; +``` diff --git a/docs/management/manage-index-patterns.asciidoc b/docs/management/manage-index-patterns.asciidoc index 28e823e3e48b..ac07aa833c3b 100644 --- a/docs/management/manage-index-patterns.asciidoc +++ b/docs/management/manage-index-patterns.asciidoc @@ -48,7 +48,7 @@ The script must match the field *Type*, or the script fails. + For information on how to create runtime fields in *Discover*, refer to <>. + -For information on how to create runtime fields in *Lens*, refer to <>. +For information on how to create runtime fields in *Lens*, refer to <>. [float] [[runtime-field-examples]] diff --git a/docs/redirects.asciidoc b/docs/redirects.asciidoc index f931d173dbdc..ccdfae458205 100644 --- a/docs/redirects.asciidoc +++ b/docs/redirects.asciidoc @@ -7,6 +7,22 @@ The following pages have moved or been deleted. -- +[role="exclude",id="configuring-tls"] +== Encrypt TLS communications in {kib} +See {ref}/security-basic-setup-https.html#encrypt-kibana-http[Encrypt HTTP client communications for {kib}]. + +[float] +[role="exclude",id="configuring-tls-browser-kib"] +=== Encrypt traffic between the browser and {kib} + +See {ref}/security-basic-setup-https.html#encrypt-kibana-browser[Encrypt traffic between your browser and {kib}]. + +[float] +[role="exclude",id="configuring-tls-kib-es"] +=== Encrypt traffic between {kib} and {es} + +See {ref}/security-basic-setup-https.html#encrypt-kibana-elasticsearch[Encrypt traffic between {kib} and {es}]. + [role="exclude",id="monitoring-xpack-kibana"] == Configuring monitoring in {kib} diff --git a/docs/user/dashboard/aggregation-based.asciidoc b/docs/user/dashboard/aggregation-based.asciidoc index cb102b73f93b..305c460ae7a7 100644 --- a/docs/user/dashboard/aggregation-based.asciidoc +++ b/docs/user/dashboard/aggregation-based.asciidoc @@ -1,8 +1,22 @@ [[add-aggregation-based-visualization-panels]] === Aggregation-based -Aggregation-based visualizations are the core {kib} panels, and are not optimized -for a specific use case. +Aggregation-based visualizations are the core {kib} panels, and are not optimized for a specific use case. + +With aggregation-based visualizations, you can: + +* Split charts up to three aggregation levels, which is more than *Lens* and *TSVB* +* Create visualization with non-time series data +* Use a <> as an input +* Sort data tables and use the summary row and percentage column features +* Assign colors to data series +* Extend features with plugins + +Aggregation-based visualizations include the following limitations: + +* Limited styling options +* Math is unsupported +* Multiple indices is unsupported [float] [[types-of-visualizations]] @@ -135,7 +149,7 @@ Add the sample web logs data that you'll use to create the bar chart, then creat [float] ===== Open and set up the aggregation-based bar chart -Open the bar chart visualization builder and change the time range. +Open the *Aggregation based* editor and change the time range. . On the dashboard, click *All types > Aggregation based*, select *Vertical bar*, then select *kibana_sample_data_logs*. diff --git a/docs/user/dashboard/create-panels-with-editors.asciidoc b/docs/user/dashboard/create-panels-with-editors.asciidoc index 77a4706e249f..4b60b808a15a 100644 --- a/docs/user/dashboard/create-panels-with-editors.asciidoc +++ b/docs/user/dashboard/create-panels-with-editors.asciidoc @@ -1,134 +1,496 @@ -[[create-panels-with-editors]] +[[aggregation-reference]] == Create panels with editors -{kib} provides several editors that you can use to create panels of your data. +{kib} provides several editors that you can use to create panels of your data. Each editor supports different features and {ref}/search-aggregations.html[{es} aggregations]. To choose the best editor for your data, review the following information. -[cols="2"] +[float] +[[chart-types]] +=== Supported panel types + +[options="header"] |=== -| <> -| Create visualizations with the drag and drop editor. +| Panel type | *Lens* | *TSVB* | *Aggregation-based* | *Vega* | *Timelion* + +| Table +| ✓ +| ✓ +| ✓ +| +| + +| Bar, line, and area +| ✓ +| ✓ +| ✓ +| ✓ +| ✓ + +| Split chart and small multiples +| +| ✓ +| ✓ +| ✓ +| + +| Pie and donut +| ✓ +| +| ✓ +| ✓ +| + +| Sunburst +| ✓ +| +| ✓ +| ✓ +| + +| Treemap +| ✓ +| +| +| ✓ +| + +| Heatmap +| ✓ +| +| ✓ +| ✓ +| + +| Gauge and Goal +| +| ✓ +| ✓ +| ✓ +| + +| Markdown +| +| ✓ +| +| +| + +| Metric +| ✓ +| ✓ +| ✓ +| ✓ +| + +| Tag cloud +| +| +| ✓ +| ✓ +| + +|=== -| <> -| Create visualizations with your geographical data. +[float] +[[xy-features]] +=== Bar, line, and area chart features -| <> -| Create visualizations with your time series data. +[options="header"] +|=== -| <> -| Create custom visualizations with the *Vega* and *Vega-Lite* grammars. +| Feature | *Lens* | *TSVB* | *Aggregation-based* | *Vega* | *Timelion* + +| Dense time series +| Customizable +| ✓ +| Customizable +| ✓ +| ✓ + +| Percentage mode +| ✓ +| ✓ +| ✓ +| ✓ +| + +| Break downs +| 1 +| 1 +| 3 +| ∞ +| 1 + +| Custom color with break downs +| +| Only for Filters +| ✓ +| ✓ +| + +| Fit missing values +| ✓ +| +| ✓ +| ✓ +| ✓ + +| Synchronized tooltips +| +| ✓ +| +| +| -| <> -| Build most visualization types using {es} <>. +|=== -| <> -| Create visualizations with your time series data using a simple expression language. +[float] +[[other-features]] +=== Advanced features + +[options="header"] +|=== + +| Feature | *Lens* | *TSVB* | *Vega* | *Timelion* + +| Math +| ✓ +| ✓ +| ✓ +| ✓ + +| Math across indices +| +| +| ✓ +| ✓ + +| Visualize two indices +| ✓ +| ✓ +| ✓ +| ✓ + +| Time shift +| ✓ +| ✓ +| ✓ +| ✓ + +| Custom {es} queries +| +| +| ✓ +| + +| Normalize by time +| ✓ +| ✓ +| +| + +| Automatically generated suggestions +| ✓ +| +| +| + +| Annotations +| +| ✓ +| +| |=== [float] -[[lens-editor]] -=== Lens +[[table-features]] +=== Table features -*Lens* is the drag and drop editor that creates visualizations of your data, recommended for most -users. +[options="header"] +|=== -With *Lens*, you can: +| Feature | *Lens* | *TSVB* | *Aggregation-based* -* Use the automatically generated suggestions to change the visualization type. -* Create visualizations with multiple layers and indices. -* Change the aggregation and labels to customize the data. -* Perform math on aggregations using *Formula*. -* Use time shifts to compare data at two times, such as month over month. +| Summary row +| ✓ +| +| ✓ -[role="screenshot"] -image:dashboard/images/lens_advanced_1_1.png[Lens] +| Pivot table +| ✓ +| +| + +| Calculated column +| Formula +| ✓ +| Percent only + +| Color by value +| ✓ +| ✓ +| + +|=== [float] -[[tsvb-editor]] -=== TSVB +[[custom-functions]] +=== Functions -*TSVB* is a time series data visualization editor that allows you to use the full power of the {es} aggregation framework. +[options="header"] +|=== -With *TSVB*, you can: +| Function | *Lens* | *TSVB* -* Combine an infinite number of <> to display your data. -* Annotate time series data with timestamped events from an {es} index. -* View the data in several types of visualizations, including charts, data tables, and markdown panels. -* Display multiple <> in each visualization. -* Customize the data with labels and colors. +| Counter rate +| ✓ +| ✓ -[role="screenshot"] -image::images/tsvb.png[TSVB UI] +| <> +| Use <> +| ✓ -[float] -[[custom-visualizations]] -=== Custom visualizations +| <> +| +| ✓ -*Vega* and *Vega-Lite* are visualization grammars that are integrated into {kib} for custom visualizations. +| <> +| +| ✓ -* *Vega-Lite* — A high-level grammar for rapid analysis. +| Static value +| +| ✓ -* *Vega* — A declarative language with support for interactivity. +|=== -*Vega* and *Vega-Lite* panels can display one or more data sources, including {es}, Elastic Map Service, -URL, or static data, and support <> that allow you to embed the panels on your dashboard and add interactive tools. +[float] +[[metrics-aggregations]] +=== Metrics aggregations -Use *Vega* or *Vega-Lite* when you want to create visualizations with: +Metric aggregations are calculated from the values in the aggregated documents. The values are extracted from the document fields. -* Aggregations that use `nested` or `parent/child` mapping -* Aggregations without an index pattern -* Queries that use custom time filters -* Complex calculations -* Extracted data from _source instead of aggregations -* Scatter charts, sankey charts, and custom maps -* An unsupported visual theme +[options="header"] +|=== -These grammars have some limitations: they do not support tables, and can't run queries conditionally. +| Aggregation | *Lens* | *TSVB* | *Aggregation-based* | *Vega* + +| Metrics with filters +| ✓ +| +| +| ✓ + +| Average, Sum, Max, Min +| ✓ +| ✓ +| ✓ +| ✓ + +| Unique count (Cardinality) +| ✓ +| ✓ +| ✓ +| ✓ + +| Percentiles and Median +| ✓ +| ✓ +| ✓ +| ✓ + +| Percentiles Rank +| +| ✓ +| ✓ +| ✓ + +| Standard deviation +| +| ✓ +| ✓ +| ✓ + +| Sum of squares +| +| ✓ +| +| ✓ + +| Top hit (Last value) +| ✓ +| ✓ +| ✓ +| ✓ + +| Value count +| +| +| ✓ +| ✓ + +| Variance +| +| ✓ +| +| ✓ -[role="screenshot"] -image::images/vega.png[Vega UI] +|=== -For detailed *Vega* and *Vega-Lite* information and examples, refer to <>. +For information about {es} metrics aggregations, refer to {ref}/search-aggregations-metrics.html[Metrics aggregations]. [float] -[[aggregation-based]] -=== Aggregation-based +[[bucket-aggregations]] +=== Bucket aggregations -With aggregation-based visualizations, you can: +Bucket aggregations group, or bucket, documents based on the aggregation type. To define the document buckets, bucket aggregations compute and return the number of documents for each bucket. -* Create heat map, tag cloud, gauge, and goal visualizations -* Split charts up to three aggregation levels, which is more than *Lens* and *TSVB* -* Time series data is not required -* Use a <> as an input -* Sort data tables and use the summary row and percentage column features -* Assign colors to series -* Extend features with plugins - -[role="screenshot"] -image:dashboard/images/aggregation_based.png[Aggregation-based editor] +[options="header"] +|=== +| Aggregation | *Lens* | *TSVB* | *Aggregation-based* | *Vega* + +| Histogram +| ✓ +| +| ✓ +| ✓ + +| Date histogram +| ✓ +| ✓ +| ✓ +| ✓ + +| Date range +| Use filters +| +| ✓ +| ✓ + +| Filter +| +| ✓ +| +| ✓ + +| Filters +| ✓ +| ✓ +| ✓ +| ✓ + +| GeoHash grid +| +| +| ✓ +| ✓ + +| IP range +| Use filters +| Use filters +| ✓ +| ✓ + +| Range +| ✓ +| Use filters +| ✓ +| ✓ + +| Terms +| ✓ +| ✓ +| ✓ +| ✓ + +| Significant terms +| +| +| ✓ +| ✓ -Aggregation-based visualizations include the following limitations: +|=== -* Limited styling options -* Math is unsupported -* Multiple indices is unsupported +For information about {es} bucket aggregations, refer to {ref}/search-aggregations-bucket.html[Bucket aggregations]. [float] -[[timelion-editor]] -=== Timelion +[[pipeline-aggregations]] +=== Pipeline aggregations -*Timelion* is driven by a simple expression language that you use to: +Pipeline aggregations are dependent on the outputs calculated from other aggregations. Parent pipeline aggregations are provided with the output of the parent aggregation, and compute new buckets or aggregations that are added to existing buckets. Sibling pipeline aggregations are provided with the output of a sibling aggregation, and compute new aggregations for the same level as the sibling aggregation. -* Retrieve time series data from one or more indices -* Perform math across two or more time series -* Visualize the results +[options="header"] +|=== + +| Aggregation | *Lens* | *TSVB* | *Aggregation-based* | *Vega* + +| Avg bucket +| <> +| ✓ +| ✓ +| ✓ + +| Derivative +| ✓ +| ✓ +| ✓ +| ✓ + +| Max bucket +| <> +| ✓ +| ✓ +| ✓ + +| Min bucket +| <> +| ✓ +| ✓ +| ✓ + +| Sum bucket +| <> +| ✓ +| ✓ +| ✓ + +| Moving average +| ✓ +| ✓ +| ✓ +| ✓ + +| Cumulative sum +| ✓ +| ✓ +| ✓ +| ✓ + +| Bucket script +| +| +| ✓ +| ✓ + +| Bucket selector +| +| +| +| ✓ + +| Serial differencing +| +| ✓ +| ✓ +| ✓ + +|=== -[role="screenshot"] -image:dashboard/images/timelion.png[Timelion] +For information about {es} pipeline aggregations, refer to {ref}/search-aggregations-pipeline.html[Pipeline aggregations]. include::lens.asciidoc[] include::tsvb.asciidoc[] include::vega.asciidoc[] include::aggregation-based.asciidoc[] -include::timelion.asciidoc[] \ No newline at end of file +include::timelion.asciidoc[] diff --git a/docs/user/dashboard/dashboard.asciidoc b/docs/user/dashboard/dashboard.asciidoc index c251ce730796..1ff1d5611ca5 100644 --- a/docs/user/dashboard/dashboard.asciidoc +++ b/docs/user/dashboard/dashboard.asciidoc @@ -16,7 +16,7 @@ Panels display your data in charts, tables, maps, and more, which allow you to c [cols="2"] |=== -| <> +| <> | Use the *Lens*, *TSVB*, *Vega*, and *Timelion* editors to create visualizations of your data, or create *Aggregation based* visualizations using {es} aggregations. *Lens* is the recommended editor. @@ -335,5 +335,3 @@ include::lens-advanced.asciidoc[] include::create-panels-with-editors.asciidoc[] include::make-dashboards-interactive.asciidoc[] - -include::aggregation-reference.asciidoc[] diff --git a/docs/user/dashboard/images/final_time_series_analysis_dashboard.png b/docs/user/dashboard/images/final_time_series_analysis_dashboard.png new file mode 100644 index 000000000000..d0a73382dc20 Binary files /dev/null and b/docs/user/dashboard/images/final_time_series_analysis_dashboard.png differ diff --git a/docs/user/dashboard/images/formula_reference.png b/docs/user/dashboard/images/formula_reference.png new file mode 100644 index 000000000000..dff574120c2a Binary files /dev/null and b/docs/user/dashboard/images/formula_reference.png differ diff --git a/docs/user/dashboard/images/lens_advanced_1_1.png b/docs/user/dashboard/images/lens_advanced_1_1.png index 9d67f5cc691f..bfc842914bfb 100644 Binary files a/docs/user/dashboard/images/lens_advanced_1_1.png and b/docs/user/dashboard/images/lens_advanced_1_1.png differ diff --git a/docs/user/dashboard/images/lens_advanced_1_2.png b/docs/user/dashboard/images/lens_advanced_1_2.png index bc5d1f67be46..87c457a10602 100644 Binary files a/docs/user/dashboard/images/lens_advanced_1_2.png and b/docs/user/dashboard/images/lens_advanced_1_2.png differ diff --git a/docs/user/dashboard/images/lens_advanced_2_3.png b/docs/user/dashboard/images/lens_advanced_2_3.png index 1d88bcd238ca..69c76439effb 100644 Binary files a/docs/user/dashboard/images/lens_advanced_2_3.png and b/docs/user/dashboard/images/lens_advanced_2_3.png differ diff --git a/docs/user/dashboard/images/lens_advanced_3_2.png b/docs/user/dashboard/images/lens_advanced_3_2.png index 15f2f0228a0f..b243444a2b50 100644 Binary files a/docs/user/dashboard/images/lens_advanced_3_2.png and b/docs/user/dashboard/images/lens_advanced_3_2.png differ diff --git a/docs/user/dashboard/images/lens_advanced_4_1.png b/docs/user/dashboard/images/lens_advanced_4_1.png index 50d1affa268d..6983b2d27b09 100644 Binary files a/docs/user/dashboard/images/lens_advanced_4_1.png and b/docs/user/dashboard/images/lens_advanced_4_1.png differ diff --git a/docs/user/dashboard/images/lens_drag_drop_2.png b/docs/user/dashboard/images/lens_drag_drop_2.png index 4c3c35ce58c9..e9f425ece65b 100644 Binary files a/docs/user/dashboard/images/lens_drag_drop_2.png and b/docs/user/dashboard/images/lens_drag_drop_2.png differ diff --git a/docs/user/dashboard/images/lens_dropdown_menus.gif b/docs/user/dashboard/images/lens_dropdown_menus.gif new file mode 100644 index 000000000000..753d65e8e43f Binary files /dev/null and b/docs/user/dashboard/images/lens_dropdown_menus.gif differ diff --git a/docs/user/dashboard/images/lens_end_to_end_1_2.png b/docs/user/dashboard/images/lens_end_to_end_1_2.png new file mode 100644 index 000000000000..83cf894dccbc Binary files /dev/null and b/docs/user/dashboard/images/lens_end_to_end_1_2.png differ diff --git a/docs/user/dashboard/images/lens_end_to_end_1_2_1.png b/docs/user/dashboard/images/lens_end_to_end_1_2_1.png new file mode 100644 index 000000000000..6032e8e6b980 Binary files /dev/null and b/docs/user/dashboard/images/lens_end_to_end_1_2_1.png differ diff --git a/docs/user/dashboard/images/lens_end_to_end_1_3.png b/docs/user/dashboard/images/lens_end_to_end_1_3.png new file mode 100644 index 000000000000..a650d407a24a Binary files /dev/null and b/docs/user/dashboard/images/lens_end_to_end_1_3.png differ diff --git a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_2_1_1.png b/docs/user/dashboard/images/lens_end_to_end_2_1_1.png similarity index 100% rename from docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_2_1_1.png rename to docs/user/dashboard/images/lens_end_to_end_2_1_1.png diff --git a/docs/user/dashboard/images/lens_end_to_end_3_1_1.gif b/docs/user/dashboard/images/lens_end_to_end_3_1_1.gif new file mode 100644 index 000000000000..0029e7c24cd6 Binary files /dev/null and b/docs/user/dashboard/images/lens_end_to_end_3_1_1.gif differ diff --git a/docs/user/dashboard/images/lens_end_to_end_4_3.png b/docs/user/dashboard/images/lens_end_to_end_4_3.png new file mode 100644 index 000000000000..61b15ad4feaf Binary files /dev/null and b/docs/user/dashboard/images/lens_end_to_end_4_3.png differ diff --git a/docs/user/dashboard/images/lens_end_to_end_6_1.png b/docs/user/dashboard/images/lens_end_to_end_6_1.png new file mode 100644 index 000000000000..73299bac0354 Binary files /dev/null and b/docs/user/dashboard/images/lens_end_to_end_6_1.png differ diff --git a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_7_2.png b/docs/user/dashboard/images/lens_end_to_end_7_2.png similarity index 100% rename from docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_7_2.png rename to docs/user/dashboard/images/lens_end_to_end_7_2.png diff --git a/docs/user/dashboard/images/lens_end_to_end_dashboard.png b/docs/user/dashboard/images/lens_end_to_end_dashboard.png new file mode 100644 index 000000000000..16d680f955f1 Binary files /dev/null and b/docs/user/dashboard/images/lens_end_to_end_dashboard.png differ diff --git a/docs/user/dashboard/images/lens_missing_values_strategy.png b/docs/user/dashboard/images/lens_missing_values_strategy.png index d77c230b533f..426b8607a92f 100644 Binary files a/docs/user/dashboard/images/lens_missing_values_strategy.png and b/docs/user/dashboard/images/lens_missing_values_strategy.png differ diff --git a/docs/user/dashboard/images/lens_percent_chage.png b/docs/user/dashboard/images/lens_percent_chage.png new file mode 100644 index 000000000000..440240b8916b Binary files /dev/null and b/docs/user/dashboard/images/lens_percent_chage.png differ diff --git a/docs/user/dashboard/images/lens_table_over_time.png b/docs/user/dashboard/images/lens_table_over_time.png new file mode 100644 index 000000000000..48cfbd7d14f6 Binary files /dev/null and b/docs/user/dashboard/images/lens_table_over_time.png differ diff --git a/docs/user/dashboard/images/lens_time_shift.png b/docs/user/dashboard/images/lens_time_shift.png index f7edf80bdd0d..64ea4b2e6f39 100644 Binary files a/docs/user/dashboard/images/lens_time_shift.png and b/docs/user/dashboard/images/lens_time_shift.png differ diff --git a/docs/user/dashboard/images/markdown_example_1.png b/docs/user/dashboard/images/markdown_example_1.png new file mode 100644 index 000000000000..71dd9b76b8ca Binary files /dev/null and b/docs/user/dashboard/images/markdown_example_1.png differ diff --git a/docs/user/dashboard/images/markdown_example_2.png b/docs/user/dashboard/images/markdown_example_2.png new file mode 100644 index 000000000000..f2094c3cbb3f Binary files /dev/null and b/docs/user/dashboard/images/markdown_example_2.png differ diff --git a/docs/user/dashboard/images/markdown_example_3.png b/docs/user/dashboard/images/markdown_example_3.png new file mode 100644 index 000000000000..eca9735b495d Binary files /dev/null and b/docs/user/dashboard/images/markdown_example_3.png differ diff --git a/docs/user/dashboard/images/markdown_example_4.png b/docs/user/dashboard/images/markdown_example_4.png new file mode 100644 index 000000000000..d4a0829fef64 Binary files /dev/null and b/docs/user/dashboard/images/markdown_example_4.png differ diff --git a/docs/visualize/images/read-only-badge.png b/docs/user/dashboard/images/read-only-badge.png similarity index 100% rename from docs/visualize/images/read-only-badge.png rename to docs/user/dashboard/images/read-only-badge.png diff --git a/docs/visualize/images/timelion-dashboard.png b/docs/user/dashboard/images/timelion-dashboard.png similarity index 100% rename from docs/visualize/images/timelion-dashboard.png rename to docs/user/dashboard/images/timelion-dashboard.png diff --git a/docs/user/dashboard/images/tsvb-screenshot.png b/docs/user/dashboard/images/tsvb-screenshot.png new file mode 100644 index 000000000000..15f9f763b254 Binary files /dev/null and b/docs/user/dashboard/images/tsvb-screenshot.png differ diff --git a/docs/visualize/images/vega_lite_tutorial_2.png b/docs/user/dashboard/images/vega_lite_tutorial_2.png similarity index 100% rename from docs/visualize/images/vega_lite_tutorial_2.png rename to docs/user/dashboard/images/vega_lite_tutorial_2.png diff --git a/docs/visualize/images/vega_lite_tutorial_4.png b/docs/user/dashboard/images/vega_lite_tutorial_4.png similarity index 100% rename from docs/visualize/images/vega_lite_tutorial_4.png rename to docs/user/dashboard/images/vega_lite_tutorial_4.png diff --git a/docs/visualize/images/vega_lite_tutorial_5.png b/docs/user/dashboard/images/vega_lite_tutorial_5.png similarity index 100% rename from docs/visualize/images/vega_lite_tutorial_5.png rename to docs/user/dashboard/images/vega_lite_tutorial_5.png diff --git a/docs/visualize/images/vega_lite_tutorial_6.png b/docs/user/dashboard/images/vega_lite_tutorial_6.png similarity index 100% rename from docs/visualize/images/vega_lite_tutorial_6.png rename to docs/user/dashboard/images/vega_lite_tutorial_6.png diff --git a/docs/visualize/images/vega_lite_tutorial_7.png b/docs/user/dashboard/images/vega_lite_tutorial_7.png similarity index 100% rename from docs/visualize/images/vega_lite_tutorial_7.png rename to docs/user/dashboard/images/vega_lite_tutorial_7.png diff --git a/docs/visualize/images/vega_tutorial_3.png b/docs/user/dashboard/images/vega_tutorial_3.png similarity index 100% rename from docs/visualize/images/vega_tutorial_3.png rename to docs/user/dashboard/images/vega_tutorial_3.png diff --git a/docs/visualize/images/vega_tutorial_4.png b/docs/user/dashboard/images/vega_tutorial_4.png similarity index 100% rename from docs/visualize/images/vega_tutorial_4.png rename to docs/user/dashboard/images/vega_tutorial_4.png diff --git a/docs/visualize/images/vega_tutorial_getting_help.png b/docs/user/dashboard/images/vega_tutorial_getting_help.png similarity index 100% rename from docs/visualize/images/vega_tutorial_getting_help.png rename to docs/user/dashboard/images/vega_tutorial_getting_help.png diff --git a/docs/visualize/images/vega_tutorial_inspect_data_sets.png b/docs/user/dashboard/images/vega_tutorial_inspect_data_sets.png similarity index 100% rename from docs/visualize/images/vega_tutorial_inspect_data_sets.png rename to docs/user/dashboard/images/vega_tutorial_inspect_data_sets.png diff --git a/docs/visualize/images/vega_tutorial_inspect_requests.png b/docs/user/dashboard/images/vega_tutorial_inspect_requests.png similarity index 100% rename from docs/visualize/images/vega_tutorial_inspect_requests.png rename to docs/user/dashboard/images/vega_tutorial_inspect_requests.png diff --git a/docs/user/dashboard/lens-advanced.asciidoc b/docs/user/dashboard/lens-advanced.asciidoc index 374d36e7586c..d5a52428cff3 100644 --- a/docs/user/dashboard/lens-advanced.asciidoc +++ b/docs/user/dashboard/lens-advanced.asciidoc @@ -1,76 +1,66 @@ [[create-a-dashboard-of-panels-with-ecommerce-data]] -== Time series analysis with Lens +== Analyze time series data -The tutorial uses sample data from the perspective of a shop owner looking -at sales trends, but this type of dashboard works on any type of data. -To create dashboard panels of the data, open the *Lens* visualization builder, then -create the visualization panels that best display the data. -Before using this tutorial, you should be familiar with the <>. +In this tutorial, you'll use the ecommerce sample data to analyze sales trends, but you can use any type of data to complete the tutorial. +Before using this tutorial, review the <>. [role="screenshot"] -image::images/lens_advanced_result.png[Dashboard view] +image::images/final_time_series_analysis_dashboard.png[Final dashboard with ecommerce sample data, width=50%] [discrete] [[add-the-data-and-create-the-dashboard-advanced]] === Add the data and create the dashboard -If you are working with your own data, you should already have an <>. -To install the sample sales data: +Add the sample ecommerce data that you'll use to create the dashboard panels. -. From the {kib} *Home* page, click *Try our sample data*. +. Go to the {kib} *Home* page, then click *Try our sample data*. -. From *Sample eCommerce orders*, click *Add data*. +. On the *Sample eCommerce orders* card, click *Add data*. -Then create a new dashboard: +Create the dashboard where you'll display the visualization panels. . Open the main menu, then click *Dashboard*. . On the *Dashboards* page, click *Create dashboard*. -. Set the <> to *Last 30 days*. - [float] [[open-and-set-up-lens-advanced]] === Open and set up Lens -*Lens* is designed to help you quickly build visualizations for your dashboard, as shown in <>, while providing support for advanced usage as well. - -Open the *Lens* editor, then make sure the correct fields appear. +Open *Lens*, then make sure the correct fields appear. . From the dashboard, click *Create visualization*. . Make sure the *kibana_sample_data_ecommerce* index appears. ++ +If you are using your own data, select the <> that contains your data. [discrete] [[custom-time-interval]] === View a date histogram with a custom time interval It is common to use the automatic date histogram interval, but sometimes you want a larger or smaller -interval. *Lens* only lets you choose the minimum time interval, not the exact time interval, for -performance reasons. The performance limit is controlled by the <> -advanced setting and the overall time range. To see hourly sales over a 30 day time period, choose -one of these options: +interval. For performance reasonse, *Lens* lets you choose the minimum time interval, not the exact time interval. The performance limit is controlled by the <> setting and the <>. -* View less than 30 days at a time, then use the time picker to select each day separately. +If you are using your own data, use one of the following options to see hourly sales over the last 30 days: -* Increase `histogram:maxBars` from 100 to at least 720, which the number of hours in 30 days. -This affects all visualizations and can reduce performance. +* View less than 30 days at a time, then use the time filter to select each day separately. -* If approximation is okay, use the *Normalize unit* option. This can convert *Average sales per 12 hours* -into *Average sales per 12 hours (per hour)* by dividing the number of hours. +* Increase `histogram:maxBars` to at least 720, which is the number of hours in 30 days. This affects all visualizations and can reduce performance. -For the sample data, approximation is okay. To use the *Normalize unit* option: +If you are using the sample data, use *Normalize unit*, which converts *Average sales per 12 hours* +into *Average sales per 12 hours (per hour)* by dividing the number of hours: . Set the <> to *Last 30 days*. -. From the *Available fields* list, drag and drop *Records* to the visualization builder. +. From the *Available fields* list, drag *Records* to the workspace. + +. To zoom in on the data you want to view, click and drag your cursor across the bars. + [role="screenshot"] image::images/lens_advanced_1_1.png[Added records to the workspace] -. Change the *Vertical axis* title and display the number of orders per day. - -.. In the editor, click *Count of Records*. +. In the layer pane, click *Count of Records*. .. In the *Display name* field, enter `Number of orders`. @@ -80,9 +70,6 @@ image::images/lens_advanced_1_1.png[Added records to the workspace] . To hide the *Horizontal axis* label, open the *Bottom Axis* menu, then deselect *Show*. + -[role="screenshot"] -image::images/lens_advanced_1_1_2.png[Bottom axis menu] -+ You have a bar chart that shows you how many orders were made at your store every hour. + [role="screenshot"] @@ -92,103 +79,89 @@ image::images/lens_advanced_1_2.png[Orders per day] [discrete] [[add-a-data-layer-advanced]] -=== Monitor multiple series within a date histogram +=== Monitor multiple series -It is often required to monitor multiple series within a time interval. These series can be have similar configurations with few changes between one and another. -*Lens* copies a function when you drag and drop it to the *Drop a field or click to add* -field within the same group, or when you drag and drop to the *Duplicate* field on a different group. -You can also drag and drop using your keyboard. For more information, refer to <>. +It is often required to monitor multiple series within a time interval. These series can have similar configurations with minor differences. +*Lens* copies a function when you drag it to the *Drop a field or click to add* field within the same group. To quickly create many copies of a percentile metric that shows distribution of price over time: -. From the *Chart Type* dropdown, select *Line*. -+ -[role="screenshot"] -image::images/lens_advanced_2_1.png[Chart type menu with Line selected, width=50%] +. On the dashboard, click *Create visualization*. -. From the *Available fields* list, drag and drop *products.price* to the visualization builder. +. Open the *Chart Type* dropdown, then select *Line*. -. Create the 95th percentile. +. From the *Available fields* list, drag *products.price* to the workspace. -.. In the editor, click *Median of products.price*. +Create the 95th percentile. -.. From *Select a function*, click *Percentile*. +. In the layer pane, click *Median of products.price*. -.. In the *Display name* field, enter `95th`, then click *Close*. +. Click the *Percentile* function. -. To create the 90th percentile, duplicate the `95th` percentile. +. In the *Display name* field, enter `95th`, then click *Close*. -.. Drag and drop *95th* to *Drop a field or click to add*. +To create the 90th percentile, duplicate the `95th` percentile. -.. Click *95th [1]*, then enter `90` in the *Percentile* field. - -.. In the *Display name* field enter `90th`, then click *Close*. +. Drag the *95th* field to the *Drop a field or click to add* field in the *Vertical axis* group. + [role="screenshot"] image::images/lens_advanced_2_2.gif[Easily duplicate the items with drag and drop] -.. Repeat the duplication steps to create the `50th` and `10th` percentile, naming them accordingly. +. Click *95th [1]*, then enter `90` in the *Percentile* field. -. To change the left axis label, open the *Left Axis* menu, then enter `Percentiles for product prices` in the *Axis name* field. -+ -[role="screenshot"] -image::images/lens_advanced_2_2_1.png[Left Axis menu] +. In the *Display name* field enter `90th`, then click *Close*. + +. Repeat the duplication steps to create the `50th` and `10th` percentiles. + +. Open the *Left Axis* menu, then enter `Percentiles for product prices` in the *Axis name* field. + You have a line chart that shows you the price distribution of products sold over time. + [role="screenshot"] image::images/lens_advanced_2_3.png[Percentiles for product prices chart] -. Add the filter for the redirect codes. +. Click *Save and return*. [discrete] [[add-a-data-layer]] -==== Multiple chart types or index patterns in one visualization +==== Add multiple chart types or index patterns -You can add multiple metrics to a single chart type, but if you want to overlay -multiple chart types or index patterns, use a second layer. When building layered charts, -it is important to match the data on the horizontal axis so that it uses the same -scale. To add a line chart layer on top of an existing chart: +To overlay visualization types or index patterns, add layers. When you create layered charts, match the data on the horizontal axis so that it uses the same scale. -To compare product prices with customers traffic: +. On the dashboard, click *Create visualization*. -. From the *Available fields* list, drag and drop *products.price* to the visualization builder. +. From the *Available fields* list, drag *products.price* to the workspace. -.. In the *KQL* field, enter `response.keyword>=500 AND response.keyword<600`. +. In the layer pane, click *Median of products.price*. -.. From *Select a function*, click *Average*. +.. Click the *Average* function. .. In the *Display name* field, enter `Average of prices`, then click *Close*. -. From the *Chart Type* dropdown, select *Area*. +. Open the *Chart Type* dropdown, then select *Area*. -. Create a new layer to overlay with custom traffic. +Create a new layer to overlay with custom traffic. -. In the editor, click *+*. -+ -[role="screenshot"] -image::images/lens_advanced_3_1.png[Add new layer button] +. In the layer pane, click *+*. -. From the *Available fields* list, drag and drop *customer_id* to the *Vertical Axis* of the newly created layer. +. From the *Available fields* list, drag *customer_id* to the *Vertical Axis* field in the second layer. -.. In the editor, click *Unique count of customer_id*. +. In the second layer, click *Unique count of customer_id*. -.. In the *Display name* field, enter `Unique customers`, then click *Close*. +.. In the *Display name* field, enter `Unique customers`. -. In the *Series color* field, enter *#D36086*, then click *Close*. +.. In the *Series color* field, enter *#D36086*. -. For *Axis side*, click *Right*, then click *Close*. +.. Click *Right* for the *Axis side*, then click *Close*. -. From the *Available fields* list, drag and drop *order_date* to the *Horizontal Axis* of the newly created layer. +. From the *Available fields* list, drag *order_date* to the *Horizontal Axis* field in the second layer. -. From the new layer editor, click the *Chart type* dropdown, then click the line chart. +. In the second layer pane, open the *Chart type* menu, then click the line chart. + [role="screenshot"] image::images/lens_advanced_3_2.png[Change layer type] -The visualization is done, but the legend uses a lot of space. Change the legend position to the top of the chart. - -. From the *Legend* dropdown, select the top position. +. Open the *Legend* menu, then select the arrow that points up. . Click *Save and return*. @@ -198,47 +171,41 @@ The visualization is done, but the legend uses a lot of space. Change the legend By default, *Lens* shows *date histograms* using a stacked chart visualization, which helps understand how distinct sets of documents perform over time. Sometimes it is useful to understand how the distributions of these sets change over time. Combine *filters* and *date histogram* functions to see the change over time in specific -sets of documents. To view this as a percentage, use a *stacked percentage* bar or area chart. +sets of documents. To view this as a percentage, use a *Stacked percentage* bar or area chart. -To see sales change of product by type over time: +. On the dashboard, click *Create visualization*. -. From the *Available fields* list, drag and drop *Records* to the visualization builder. +. From the *Available fields* list, drag *Records* to the workspace. -. Click *Bar vertical stacked*, then select *Area percentage*. +. Open the *Chart type* dropdown, then select *Area percentage*. -For each category type that you want to break down, create a filter. +For each category type, create a filter. -. In the editor, click the *Drop a field or click to add* field for *Break down by*. +. In the layer pane, click the *Drop a field or click to add* field for *Break down by*. -. From *Select a function*, click *Filters*. +. Click the *Filters* function. -. Add the filter for the clothing category. +. Click *All records*, enter the following, then press Return: -.. Click *All records*. +* *KQL* — `category.keyword : *Clothing` -.. In the *KQL* field, enter `category.keyword : *Clothing`. +* *Label* — `Clothing` -.. In the *Label* field, enter `Clothing`, then press Return. +. Click *Add a filter*, enter the following, then press Return: -. Add the filter for the shoes category. +* *KQL* — `category.keyword : *Shoes` -.. Click *Add a filter*. +* *Label* — `Shoes` -.. In the *KQL* field, enter `category.keyword : *Shoes`. +. Click *Add a filter*, enter the following, then press Return: -.. In the *Label* field, enter `Shoes`, then press Return. +* *KQL* — `category.keyword : *Accessories` -. Add the filter for the accessories category. +* *Label* — `Accessories` -.. Click *Add a filter*. +. Click *Close*. -.. In the *KQL* field, enter `category.keyword : *Accessories`. - -.. In the *Label* field, enter `Accessories`, then press Return. - -Change the legend position to the top of the chart. - -. From the *Legend* dropdown, select the top position. +. Open the *Legend* menu, then select the arrow that points up. + [role="screenshot"] image::images/lens_advanced_4_1.png[Prices share by category] @@ -251,43 +218,35 @@ image::images/lens_advanced_4_1.png[Prices share by category] To determine the number of orders made only on Saturday and Sunday, create an area chart, then add it to the dashboard. -. Open *Lens*. +. On the dashboard, click *Create visualization*. -. From the *Chart Type* dropdown, select *Area*. +. Open the *Chart Type* dropdown, then select *Area*. -. Configure the cumulative sum of the store orders. +Configure the cumulative sum of the store orders. -.. From the *Available fields* list, drag and drop *Records* to the visualization builder. +. From the *Available fields* list, drag *Records* to the workspace. -.. From the editor, click *Count of Records*. +. In the layer pane, click *Count of Records*. -.. From *Select a function*, click *Cumulative sum*. +. Click the *Cumulative sum* function. -.. In the *Display name* field, enter `Cumulative orders during weekend days`, then click *Close*. +. In the *Display name* field, enter `Cumulative orders during weekend days`, then click *Close*. -. Filter the results to display the data for only Saturday and Sunday. +Filter the results to display the data for only Saturday and Sunday. -.. From the editor, click the *Drop a field or click to add* field for *Break down by*. +. In the layer pane, click the *Drop a field or click to add* field for *Break down by*. -.. From *Select a function*, click *Filters*. +. Click the *Filters* function. -.. Click *All records*. +. Click *All records*, enter the following, then press Return: -.. In the *KQL* field, enter `day_of_week : "Saturday" or day_of_week : "Sunday"`, then press Return. -+ -The <> displays all documents where `day_of_week` matches `Saturday` or `Sunday`. -+ -[role="screenshot"] -image::images/lens_advanced_5_1.png[Filter aggregation to filter weekend days] +* *KQL* — `day_of_week : "Saturday" or day_of_week : "Sunday"` -. To hide the legend, open the *Legend* menu, then click *Hide*. -+ -[role="screenshot"] -image::images/lens_advanced_5_2_1.png[Legend menu] +* *Label* — `Saturday and Sunday` + -You have an area chart that shows you how many orders your store received during the weekend. +The <> displays all documents where `day_of_week` matches `Saturday` or `Sunday`. -. Click *Bar vertical stacked*, then select *Area*. +. Open the *Legend* menu, then click *Hide*. + [role="screenshot"] image::images/lens_advanced_5_2.png[Line chart with cumulative sum of orders made on the weekend] @@ -298,34 +257,33 @@ image::images/lens_advanced_5_2.png[Line chart with cumulative sum of orders mad [[compare-time-ranges]] === Compare time ranges -*Lens* allows you to compare the currently selected time range with historical data using the *Time shift* option. To calculate the percent -change, use *Formula*. +*Lens* allows you to compare the selected time range with historical data using the *Time shift* option. -If multiple time shifts are used in a single chart, a multiple of the date histogram interval should be chosen - otherwise data points might not line up in the chart and empty spots can occur. -For example, if a daily interval is used, shifting one series by *36h*, and another one by *1d*, is not recommended. In this scenario, either reduce the interval to *12h*, or create two separate charts. +If multiple time shifts are used in a single chart, a multiple of the date histogram interval should be chosen, or the data points might not line up and gaps can appear. +For example, if a daily interval is used, shifting one series by *36h*, and another by *1d* is not recommended. You can reduce the interval to *12h*, or create two separate charts. To compare current sales numbers with sales from a week ago, follow these steps: -. Open *Lens*. - -. From the *Chart Type* dropdown, select *Line*. +. On the dashboard, click *Create visualization*. -. From the *Available fields* list, drag and drop *Records* to the visualization builder. +. Open the *Chart Type* dropdown, then select *Line*. -. Copy the *Count of Records* series by dragging it to the empty drop target of the *Vertical axis* dimension group (*Drop a field or click to add*) +. From the *Available fields* list, drag *Records* to the workspace. -. Shift the second *Count of Records* series by one week to do a week-over-week comparison +. In the layer pane, drag *Count of Records* to the *Drop a field or click to add* field in the *Vertical axis* group. -.. Click the new *Count of Records [1]* dimension +To create a week-over-week comparison, shift the second *Count of Records* by one week. -.. Click *Add advanced options* below the field selector +. In the layer pane, click *Count of Records [1]*. -.. Click *Time shift* +. Open the *Add advanced options* dropdown, then select *Time shift*. -.. Click the *1 week* option. You can also define custom shifts by typing amount followed by time unit (like *1w* for a one week shift), then hit enter. +. Click *1 week ago*. ++ +To define custom time shifts, enter the time value, the time increment, then press Enter. For example, to use a one week time shift, enter *1w*. + [role="screenshot"] -image::images/lens_time_shift.png[Line chart with week-over-week sales comparison, width=50%] +image::images/lens_time_shift.png[Line chart with week-over-week sales comparison] . Click *Save and return*. @@ -333,64 +291,63 @@ image::images/lens_time_shift.png[Line chart with week-over-week sales compariso [[compare-time-as-percent]] ==== Compare time ranges as a percent change -To view the percent change in sales between the current time and the previous week, use a *Formula*: +To view the percent change in sales between the current time and the previous week, create a *Formula*. -. Open *Lens*. +. On the dashboard, click *Create visualization*. -. From the *Available fields* list, drag and drop *Records* to the visualization builder. +. From the *Available fields* list, drag *Records* to the workspace. -. Click *Count of Records*, then click *Formula*. +. In the layer pane, click *Count of Records*. -. Type `count() / count(shift='1w') - 1`. To learn more about the formula -syntax, click *Help*. +.. Click *Formula*, then enter `count() / count(shift='1w') - 1`. -. Click *Value format* and select *Percent* with 0 decimals. +.. Open the *Value format* dropdown, select *Percent*, then enter `0` in the *D*ecimals* field. -. In the *Display name* field, enter `Percent change`, then click *Close*. +.. In the *Display name* field, enter `Percent change`, then click *Close*. ++ +[role="screenshot"] +image::images/lens_percent_chage.png[Bar chart with percent change in sales between the current time and the previous week] . Click *Save and return*. [discrete] [[view-customers-over-time-by-continents]] -=== View table of customers by category over time +=== Create a table of customers by category over time -Tables are an alternative type of visualization for time series, useful when you want to read the actual values. -You can build a date histogram table, and group the customer count metric by category, like the continent registered in their profile. +Tables are useful when you want to display the actual field values. +You can build a date histogram table, and group the customer count metric by category, such as the continent registered in user accounts. In *Lens* you can split the metric in a table leveraging the *Columns* field, where each data value from the aggregation is used as column of the table and the relative metric value is shown. -To build a date histogram table: +. On the dashboard, click *Create visualization*. -. Open *Lens*. +. Open the *Chart Type* dropdown, then click *Table*. -. From the *Chart Type* dropdown, select *Table*. +. From the *Available fields* list, drag *customer_id* to the *Metrics* field in the layer pane. -.. From the *Available fields* list, drag and drop *customer_id* to the *Metrics* field of the editor. +. In the layer pane, click *Unique count of customer_id*. -.. From the editor, click *Unique count of customer_id*. +. In the *Display name* field, enter `Customers`, then click *Close*. -.. In the *Display name* field, enter `Customers`, then click *Close*. +. From the *Available fields* list, drag *order_date* to the *Rows* field in the layer pane. -.. From the *Available fields* list, drag and drop *order_date* to the *Rows* field of the editor. +. In the layer pane, click the *order_date*. -.. From the editor *Rows*, click the *order_date* field just dropped. +.. Select *Customize time interval*. -. Select *Customize time interval*. - -. Change the *Minimum interval* to `1 days`, then click *Close*. +.. Change the *Minimum interval* to *1 days*. .. In the *Display name* field, enter `Sale`, then click *Close*. -To split the customers count by continent: +Add columns for each continent. -. From the *Available fields* list, drag and drop *geoip.continent_name* to the *Columns* field of the editor. +. From the *Available fields* list, drag *geoip.continent_name* to the *Columns* field in the layer pane. + [role="screenshot"] -image::images/lens_advanced_6_1.png[Table with daily customers by continent configuration, width=50%] +image::images/lens_table_over_time.png[Date histogram table with groups for the customer count metric] . Click *Save and return*. - [discrete] === Save the dashboard @@ -398,4 +355,8 @@ Now that you have a complete overview of your ecommerce sales data, save the das . In the toolbar, click *Save*. -. On the *Save dashboard* window, enter `Ecommerce sales data`, then click *Save*. +. On the *Save dashboard* window, enter `Ecommerce sales`, then click *Save*. + +. Select *Store time with dashboard*. + +. Click *Save*. diff --git a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_1_2.png b/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_1_2.png deleted file mode 100644 index ea58057433a1..000000000000 Binary files a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_1_2.png and /dev/null differ diff --git a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_1_2_1.png b/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_1_2_1.png deleted file mode 100644 index fa404d50b4dd..000000000000 Binary files a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_1_2_1.png and /dev/null differ diff --git a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_1_3.png b/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_1_3.png deleted file mode 100644 index b069acae4316..000000000000 Binary files a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_1_3.png and /dev/null differ diff --git a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_3_1_1.gif b/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_3_1_1.gif deleted file mode 100644 index 469cb3d02c10..000000000000 Binary files a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_3_1_1.gif and /dev/null differ diff --git a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_4_3.png b/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_4_3.png deleted file mode 100644 index 2cd75d2797a9..000000000000 Binary files a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_4_3.png and /dev/null differ diff --git a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_6_1.png b/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_6_1.png deleted file mode 100644 index 19fd00a44797..000000000000 Binary files a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_6_1.png and /dev/null differ diff --git a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_dashboard.png b/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_dashboard.png deleted file mode 100644 index 9e9a5ed3d758..000000000000 Binary files a/docs/user/dashboard/lens-end-to-end/images/lens_end_to_end_dashboard.png and /dev/null differ diff --git a/docs/user/dashboard/lens.asciidoc b/docs/user/dashboard/lens.asciidoc index 2071f17ecff3..4b39d001de8c 100644 --- a/docs/user/dashboard/lens.asciidoc +++ b/docs/user/dashboard/lens.asciidoc @@ -1,8 +1,14 @@ [[lens]] === Lens -To create visualizations with *Lens*, you drag and drop data fields onto the visualization builder, -then *Lens* uses heuristics to apply each field. +To create visualization panels with *Lens*, you drag the data fields you want to visualize to the workspace, then *Lens* uses heuristics to apply each field and create a visualization for you. + +With *Lens*, you can: + +* Create area, line, and bar charts with multiple layers, indices, and visualization types. +* Change the aggregation function and labels to customize the data. +* Perform math on aggregations using *Formula*. +* Use time shifts to compare data for two time intervals, such as month over month. ++++