Dec 24th, 2020 [EN] Create stunning Lens visualizations in Kibana 7.10

                       **New kid on the block, Kibana Lens**

Millions of people already use Kibana for a wide range of purposes, but it was still a challenge for the average business user to quickly learn. Visualizations often require quite a bit of experimentation and several iterations to get the results “just right”. Visualizations in Kibana paired with the speed of Elasticsearch is up to the challenge, but it still requires advance planning or you’ll end up having to redo it a few times.

The new kid on the block, Kibana Lens, was designed to change this and we’re here to learn how to take advantage of this capability. So let’s get started! We are excited to announce that with the 7.10 release, Kibana Lens has officially become generally available. Lens is the easiest and most intuitive way to visualize data in Elasticsearch with a simple drag-and-drop interface that lets anyone instantly begin exploring data for insights, regardless of their previous Kibana experience.

To try Kibana Lens today, spin up the latest version of the Elastic Stack with Elasticsearch Service or download 7.10 for your own self-managed deployment. So let's get started…

Here is a small sneak peak of Lens:

Benefits of using Lens

A few key benefits of Kibana Lens include:

  • Convenient features for fields such as:
    • Showing their distribution of values
    • Searching fields by name for quickly tracking down the data you want
  • Quick aggregation metrics like min, max, average, sum, count, and unique count.
  • Switching between multiple chart types after the fact, such as bar, area, line, and stacked charts.
  • The ability to drag and drop any field to get it immediately visualized or to break down the existing chart by its values.
  • Automatic suggestions for other possible visualization types.
  • Showing the raw data in data tables.
  • Combining the visualization with searching and filtering capabilities.
  • Combining data from multiple index patterns.
  • Quickly saving the visualization for inclusion in a dashboard.

Give Lens a try
Follow this tutorial to get the basics of Lens, and once you get the feel of it, feel free to just “click around” and explore all it’s rich features. Lens is designed to make experimenting with data easy.

## Add data

First we need some data to visualize . It’s easy to install sample data into Kibana. Sample data sets come with visualizations, dashboards, and more to help you explore Kibana without adding your own data.

  1. On the home page, click Try our sample data.
  2. On the “Sample eCommerce orders” card, click Add data.

Create your visualization

Now we are going to create our visualizations using Lens. Go to the main menu and open the Visualize app in Kibana. Click Create visualization and then select the Lens visualization type (first in the selection grid).

You’re welcomed by an empty screen telling you to Drop some fields.

Before we start, we need an index pattern that “points” to the indices that we want to draw the data from. Make sure the index pattern is set to “kibana_sample_data_ecommerce”. Also set the time filter to Last 7 days to make sure we have a good amount of data to work with.

Let’s drop some fields! From the left panel, drag Records to the main area and see the instant magic that is Kibana Lens. It gives you the count of records by time and populates the configuration in the right panel. It helps me see the historical trend of this data.

In the configuration pane, click Average of taxful_total_price. Click Sum and close the panel. This now gives us an idea of how price orders change over time. That's a bit more useful. We will break this down again to give more meaningful data.

Now, let's filter by type - string from the right hand side field list - This will show us the string fields. We could pick something like “customer_gender” and drop it in the middle. This is going to break down the numbers by “Gender” ( see the left hand side menu -the breakdown is shown)

Now let’s show the data in a “data table” — just pick the desired visualization from the drop down menu. Your visualization now looks like this:

Let's choose yet another visualization — the percentage bar chart visualization.

We’re now pretty happy with this visualization, so let's save it as a new visualization called “Total by gender over time”.

Create your dashboard

Naturally, the final step is combining everything we’ve done into a single dashboard to monitor our vitals.

Let’s open the Dashboard app from the main menu. Click Create a dashboard → Add an existing visualization ( click Add on the top right menu) → and click on all of our saved Lens visualizations and add it to the dashboard. Save the dashboard.


Feel free to play around with the dashboard and add more visualizations. You are well prepared for any data exploration and visualization in the wild!

What’s next?

Use Lens whenever you need to perform some data-driven experiments with various metrics and dimensions that you have in your data to tune your dashboards for the most effective storytelling.

More reading and examples

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.