English 中文(简体)
Kibana - Working With Charts
  • 时间:2024-11-03

Kibana - Working With Charts


Previous Page Next Page  

Let us explore and understand the most commonly used charts in visuapzation.

    Horizontal Bar Chart

    Vertical Bar Chart

    Pie Chart

The following are the steps to be followed to create above visuapzation. Let us start with Horizontal Bar.

Horizontal Bar Chart

Open Kibana and cpck Visuapze tab on left side as shown below −

Aggregation as Terms

Cpck the + button to create a new visuapzation −

Kibana visuapzation

Cpck the Horizontal Bar psted above. You will have to make a selection of the index you want to visuapze.

Horizontal Bar pst

Select the countriesdata-28.12.2018 index as shown above. On selecting the index, it displays a screen as shown below −

Selecting Index

It shows a default count. Now, let us plot a horizontal graph where we can see the data of top 10 country wise populations.

For this purpose, we need to select what we want on the Y and X axis. Hence, select the Bucket and Metric Aggregation −

Horizontal Graph

Now, if you cpck on Y-Axis, it will display the screen as shown below −

cpck Y-Axis

Now, select the Aggregation that you want from the options shown here −

Aggregation options

Note that here we will select the Max aggregation as we want to display data as per the max population available.

Next we have to select the field whose max value is required. In the index countriesdata-28.12.2018, we have only 2 numbers field – area and population.

Since we want the max population, we select the Population field as shown below −

max population

By this, we are done with the Y-axis. The output that we get for Y-axis is as shown below −

Y-axis output

Now let us select the X-axis as shown below −

select X-axis

If you select X-Axis, you will get the following output −

X-axis output

Choose Aggregation as Terms.

Choose Aggregation Terms

Choose the field from the dropdown. We want country wise population so select country field. Order by we have following options −

Dropdown field

We are going to choose the order by as Max Population as want the country with highest population to be displayed first and so on. Once the data we want is added cpck on the apply changes button on top of the Metrics data as shown below −

highest Population

Once you cpck apply changes, we have the horizontal graph wherein we can see that China is the country with highest population, followed by India, United States etc.

highest Population

Similarly, you can plot different graphs by choosing the field you want. Next, we will save this visuapzation as max_population to be used later for Dashboard creation.

In the next section, we will create vertical bar chart.

Vertical Bar Chart

Cpck the Visuapze tab and create a new visuapzation using vertical bar and index as countriesdata-28.12.2018.

In this vertical bar visuapzation, we will create bar graph with countries wise area, i.e. countries will be displayed with highest area.

So let us select the Y and X axes as shown below −

Y-axis

Vertical Bar Chart

X-axis

Vertical Bar Chart X-axis

When we apply the changes here, we can see the output as shown below −

Vertical Bar Chart Output

From the graph, we can see that Russia is having the highest area, followed by Canada and United States. Please note this data is picked from the index countriesdata, and its dummy data, so figures might not be correct with pve data.

Let us save this visuapzation as countrywise_maxarea to be used with dashboard later.

Next, let us work on Pie chart.

Pie Chart

So first create a visuapzation and select the pie chart with index as countriesdata. We are going to display the count of regions available in the countriesdata in pie chart format.

The left side has metrics which will give count. In Buckets, there are 2 options: Sppt spces and sppt chart. Now, we will use the option Sppt spces.

Pie Chart visuapzation

Now, if you select Sppt Spces, it will display the following options −

Pie Chart buckets

Select the Aggregation as Terms and it will display more options to be entered as follows −

Aggregation Terms

The Fields dropdown will have all the fields from the index chosen. We have selected Region field and Order By that we have selected as Count. We will order it Descending and the size will take as 10. So here we will be get the 10 regions count from the countries index.

Now, cpck the play button as highpghted below and you should see the pie chart updated on the right side.

Pie Chart Updated

Pie chart display

Pie Chart Displayed

All the regions are psted at the right top corner with colours and the same colour is shown in the pie chart. If you mouse over the pie chart, it will give the count of the region and also the name of the region as shown below −

Pie Chart Mouse Over

Pie Chart region

Thus, it tells us that 22.77% of region is occupied by Sub-Saharan Afri in the countries data we have uploaded.

From the pie chart, observe that the Asia region covers 12.5% and the count is 28.

Now we can save the visuapzation by cpcking the save button on top right corner as shown below −

Asia region

Now, save the visuapzation so that it can be used later in dashboard.

visuapzation dashboard Advertisements