kibana/docs/canvas/canvas-elements.asciidoc
Kaarina Tungseth 809ec97649
[DOCS] Removed references to left (#60807)
* [DOCS] Removed references to left

* Fixed broken build
2020-04-06 15:37:45 -05:00

183 lines
5.4 KiB
Plaintext

[role="xpack"]
[[add-canvas-elements]]
=== Add elements
Create a story about your data by adding elements to your workpad that include images, text, charts, and more. You can create your own elements and connect them to your data sources, add saved objects, and add your own images.
[float]
[[create-canvas-element]]
==== Create an element
Choose the type of element you want to use, then connect it to your own data.
. Click *Add element*, then select the element you want to use.
+
[role="screenshot"]
image::images/canvas-element-select.gif[Canvas elements]
. To familiarize yourself with the element, use the preconfigured data demo data.
+
By default, most of the elements you create use demo data until you change the data source. The demo data includes a small data set that you can use to experiment with your element.
. To connect the element to your data, select *Data*, then select one of the following data sources:
* *{es} SQL* — Access your data in {es} using SQL syntax. For information about SQL syntax, refer to {ref}/sql-spec.html[SQL language].
* *{es} documents* &mdash; Access your data in {es} without using aggregations. To use, select an index and fields, and optionally enter a query using the <<lucene-query,Lucene Query Syntax>>. Use the *{es} documents* data source when you have low volume datasets, to view raw documents, or to plot exact, non-aggregated values on a chart.
* *Timelion* &mdash; Access your time series data using <<timelion,Timelion>> queries. To use Timelion queries, you can enter a query using the <<lucene-query,Lucene Query Syntax>>.
[float]
[[canvas-add-object]]
==== Add a saved object
Add a <<managing-saved-objects,saved object>>, such as a map or Lens visualization, then customize it to fit your display needs.
. Click *Embed object*.
. Select the object you want to add.
+
[role="screenshot"]
image::images/canvas-map-embed.gif[]
. To use the customization options, click the panel menu, then select one of the following options:
* *Edit map* &mdash; Opens <<maps,Maps>> so that you can edit the original map.
* *Customize panel* &mdash; Specifies the object title options.
* *Inspect* &mdash; Allows you to drill down into the element data.
* *Customize time range* &mdash; Exposes a time filter dedicated to the map.
[float]
[[canvas-add-image]]
==== Add your own image
To personalize your workpad, add your own logos and graphics.
. Click *Manage assets*.
. On the *Manage workpad assets* window, drag and drop your images.
. To add the image to the workpad, click the *Create image element* icon.
+
[role="screenshot"]
image::images/canvas-add-image.gif[]
[float]
[[move-canvas-elements]]
==== Organize elements
Move and resize your elements to meet your design needs.
* To move, click and hold the element, then drag to the new location.
* To move by 1 pixel, select the element, press and hold Shift, then use your arrow keys.
* To move by 10 pixels, select the element, then use your arrow keys.
* To resize, click and drag the resize handles to the new dimensions.
[float]
[[format-canvas-elements]]
==== Format elements
Align, distribute, and reorder elements for consistency and readability across your workpad pages.
Access the align, distribute, and reorder options by clicking the *Element options* icon.
[role="screenshot"]
image::images/canvas_element_options.png[]
To align elements:
. Press and hold Shift, then select the elements you want to align.
. Click the , then select *Group*.
. Click the *Element options* icon, then select *Alignment*.
. Select the alignment option.
To distribute elements:
. Press and hold Shift, then select the elements you want to distribute.
. Click the *Element options* icon, then select *Group*.
. Click the *Element options* icon, then select *Distribution*.
. Select the distribution option.
To reorder elements:
. Select the element you want to reorder.
. Click the *Element options* icon, then select *Order*.
. Select the order option.
[float]
[[data-display]]
==== Change the element display options
Each element has its own display options to fit your design needs.
To choose the display options, click *Display*, then make your changes.
To define the appearance of the container and border:
. Next to *Element style*, click *+*, then select *Container style*.
. Expand *Container style*.
. Change the *Appearance* and *Border* options.
To apply CSS overrides:
. Next to *Element style*, click *+*, then select *CSS*.
. Enter the *CSS*.
+
For example, to center the Markdown element, enter:
+
[source,text]
--------------------------------------------------
.canvasRenderEl h1 {
text.align: center;
}
--------------------------------------------------
. Click *Apply stylesheet*.
[float]
[[save-elements]]
==== Save elements
To use the elements across all workpads, save the elements.
When you're ready to save your element, select the element, then click the *Save as new element* icon.
[role="screenshot"]
image::images/canvas_save_element.png[]
To save a group of elements, press and hold Shift, then select the elements you want to save.
To access your saved elements, click *Add element*, then select *My elements*.
[float]
[[delete-elements]]
==== Delete elements
When you no longer need an element, delete it from your workpad.
. Select the element you want to delete.
. Click the *Element options* icon.
+
[role="screenshot"]
image::images/canvas_element_options.png[]
. Select *Delete*.