mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
# Backport This will backport the following commits from `main` to `8.x`: - [[Docs] Update nav instructions and sample data installation to accommodate for the solution views (#199163)](https://github.com/elastic/kibana/pull/199163) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"florent-leborgne","email":"florent.leborgne@elastic.co"},"sourceCommit":{"committedDate":"2024-11-08T10:10:32Z","message":"[Docs] Update nav instructions and sample data installation to accommodate for the solution views (#199163)\n\nThis PR:\r\n- updates navigation instructions to accommodate for the navigation\r\nchanges related to solution views.\r\n- updates instructions for adding sample data to rely on the\r\nintegrations page instead of the home page, that only exists with the\r\nclassic solution view\r\n- updates references to the home page to avoid confusing users using one\r\nof the new solution views\r\n\r\nCloses: https://github.com/elastic/platform-docs-team/issues/529\r\nCloses: https://github.com/elastic/platform-docs-team/issues/540","sha":"8e7fb7a77e2399e3e946bbba0462517fd7dad0f7","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","v9.0.0","docs","v8.16.0","backport:version","v8.17.0"],"title":"[Docs] Update nav instructions and sample data installation to accommodate for the solution views","number":199163,"url":"https://github.com/elastic/kibana/pull/199163","mergeCommit":{"message":"[Docs] Update nav instructions and sample data installation to accommodate for the solution views (#199163)\n\nThis PR:\r\n- updates navigation instructions to accommodate for the navigation\r\nchanges related to solution views.\r\n- updates instructions for adding sample data to rely on the\r\nintegrations page instead of the home page, that only exists with the\r\nclassic solution view\r\n- updates references to the home page to avoid confusing users using one\r\nof the new solution views\r\n\r\nCloses: https://github.com/elastic/platform-docs-team/issues/529\r\nCloses: https://github.com/elastic/platform-docs-team/issues/540","sha":"8e7fb7a77e2399e3e946bbba0462517fd7dad0f7"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199163","number":199163,"mergeCommit":{"message":"[Docs] Update nav instructions and sample data installation to accommodate for the solution views (#199163)\n\nThis PR:\r\n- updates navigation instructions to accommodate for the navigation\r\nchanges related to solution views.\r\n- updates instructions for adding sample data to rely on the\r\nintegrations page instead of the home page, that only exists with the\r\nclassic solution view\r\n- updates references to the home page to avoid confusing users using one\r\nof the new solution views\r\n\r\nCloses: https://github.com/elastic/platform-docs-team/issues/529\r\nCloses: https://github.com/elastic/platform-docs-team/issues/540","sha":"8e7fb7a77e2399e3e946bbba0462517fd7dad0f7"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
136 lines
4.2 KiB
Text
136 lines
4.2 KiB
Text
[role="xpack"]
|
|
[[canvas-tutorial]]
|
|
== Tutorial: Create a workpad for monitoring sales
|
|
|
|
To familiarize yourself with *Canvas*, add the Sample eCommerce orders data, then use the data to create a workpad for monitoring sales at an eCommerce store.
|
|
|
|
[float]
|
|
=== Open and set up Canvas
|
|
|
|
To create a workpad of the eCommerce store data, add the data set, then create the workpad.
|
|
|
|
. <<gs-get-data-into-kibana,Install the eCommerce sample data>>.
|
|
|
|
. Go to **Canvas** using the navigation menu or the <<kibana-navigation-search,global search field>>.
|
|
|
|
. Select *Create workpad*.
|
|
|
|
[float]
|
|
=== Customize your workpad with images
|
|
|
|
To customize your workpad to look the way you want, add your own images.
|
|
|
|
. Click *Add element > Image > Image*.
|
|
+
|
|
The default Elastic logo image appears on the page.
|
|
|
|
. Add your own image.
|
|
|
|
.. Click the Elastic logo.
|
|
|
|
.. Drag the image file to the *Select or drag and drop an image* field.
|
|
+
|
|
[role="screenshot"]
|
|
image::images/canvas_tutorialCustomImage_7.17.0.png[The Analytics logo added to the workpad]
|
|
|
|
[float]
|
|
=== Customize your data with metrics
|
|
|
|
Customize your data by connecting it to the Sample eCommerce orders data.
|
|
|
|
. Click *Add element > Chart > Metric*.
|
|
+
|
|
By default, the element is connected to the demo data, which enables you to experiment with the element before you connect it to your own.
|
|
|
|
. To connect the element to your own data, make sure the element is selected, then click *Data > Demo data > Elasticsearch SQL*.
|
|
|
|
.. To select the total price field and set it to the sum_total_price field, enter the following in the *Query* field:
|
|
+
|
|
[source,text]
|
|
--
|
|
SELECT sum(taxless_total_price) AS sum_total_price FROM "kibana_sample_data_ecommerce"
|
|
--
|
|
|
|
.. Click *Save*.
|
|
+
|
|
All fields are pulled from the sample eCommerce orders {data-source}.
|
|
|
|
. At this point, the element appears as an error, so you need to change the element display options.
|
|
|
|
.. Click *Display*
|
|
|
|
.. From the *Value* dropdowns, make sure *Unique* and *sum_total_price* are selected.
|
|
|
|
.. Change the *Label* to `Total sales`.
|
|
|
|
. The error is gone, but the element could use some formatting. To format the number, use the *Canvas* expression language.
|
|
|
|
.. Click *Expression editor*.
|
|
+
|
|
You're now looking at the raw data syntax that Canvas uses to display the element.
|
|
|
|
.. Change `metricFormat="0,0.[000]"` to `metricFormat="$0a"`.
|
|
|
|
.. Click *Run*.
|
|
|
|
[role="screenshot"]
|
|
image::images/canvas_tutorialCustomMetric_7.17.0.png[The total sales metric added to the workpad using Elasticsearch SQL]
|
|
|
|
[float]
|
|
=== Show off your data with charts
|
|
|
|
To show what your data can do, add charts, graphs, progress monitors, and more to your workpad.
|
|
|
|
. Click *Add element > Chart > Area*.
|
|
|
|
. Make sure that the element is selected, then click *Data > Demo data > Elasticsearch SQL*.
|
|
|
|
.. To obtain the taxless total price by date, enter the following in the *Query* field:
|
|
+
|
|
[source,text]
|
|
--
|
|
SELECT order_date, taxless_total_price FROM "kibana_sample_data_ecommerce" ORDER BY order_date
|
|
--
|
|
|
|
.. Click *Save*.
|
|
|
|
. Change the display options.
|
|
|
|
.. Click *Display*
|
|
|
|
.. From the *X-axis* dropdown, make sure *Value* and *order_date* are selected.
|
|
|
|
.. From the *Y-axis* dropdown, select *Value*, then select *taxless_total_price*.
|
|
|
|
[role="screenshot"]
|
|
image::images/canvas_tutorialCustomChart_7.17.0.png[Custom line chart added to the workpad using Elasticsearch SQL]
|
|
|
|
[float]
|
|
=== Show how your data changes over time
|
|
|
|
To focus your data on a specific time range, add the time filter.
|
|
|
|
. Click *Add element > Filter > Time filter*.
|
|
|
|
. Click *Display*
|
|
|
|
. To use the date time field from the sample data, enter `order_date` in the *Column* field, then click *Set*.
|
|
|
|
[role="screenshot"]
|
|
image::../setup/images/canvas_tutorialCustomTimeFilter_7.17.0.png[Custom time filter added to the workpad]
|
|
|
|
To see how the data changes, set the time filter to *Last 7 days*. As you change the time filter options, the elements automatically update.
|
|
|
|
Your workpad is complete!
|
|
|
|
[float]
|
|
=== What's next?
|
|
Now that you know the basics, you're ready to explore on your own.
|
|
|
|
Here are some things to try:
|
|
|
|
* Play with the {kibana-ref}/add-sample-data.html[sample Canvas workpads].
|
|
|
|
* Build presentations of your own data with <<create-workpads,workpads>>.
|
|
|
|
* Deep dive into the {kibana-ref}/canvas-function-reference.html[expression language and functions] that drive *Canvas*.
|