# Trying to create a pie chart but Im a bit lost

**URL:** https://discuss.elastic.co/t/trying-to-create-a-pie-chart-but-im-a-bit-lost/124559
**Category:** Kibana
**Created:** [March 19, 2018, 12:56pm UTC](https://discuss.elastic.co/t/trying-to-create-a-pie-chart-but-im-a-bit-lost/124559 "2018-03-19T12:56:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![solo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/solo/32/29084_2.png) [@solo](https://discuss.elastic.co/u/solo)
#### Post date: [March 19, 2018, 12:56pm UTC](https://discuss.elastic.co/t/trying-to-create-a-pie-chart-but-im-a-bit-lost/124559/1 "2018-03-19T12:56:07Z")

</div>

I've managed to get some data from Jboss Fuse into my Kibana, and now I want to create a Pie chart displaying log level. It can either be TRACE, DEBUG, INFO, WARN, ERROR or FATAL.

I've studied some tutorials on YouTube but they state that I have to do some search before creating pie chart?

This is a example entry:

```
offset:
    57,393
subsystem:
    FelixDispatchQueue
level:
    INFO 
class:
    io.fabric8.patch.patch-management
beat.name:
    selite
beat.hostname:
    selite
beat.version:
    6.2.2
source:
    /usr/lib/jboss-fuse/data/log/fuse.log
prospector.type:
    log
@timestamp:
    March 19th 2018, 13:43:35.191
tags:
    beats_input_codec_plain_applied
message:
    Storing user changes
timestamp:
    2018-03-19 13:43:35,191
route:
host:
    selite
@version:
    1
_id:
    WaVJPmIBRSa89YvqV2-V
_type:
    %{[metadata][type]}
_index:
    filebeat-2018.03.19
_score:
    - 

```

Here is a screenshot with my data so far:  
[https://imgur.com/kkWO0p6](https://imgur.com/kkWO0p6)

---

<div class="post-metadata">

### Author: ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)
#### Post date: [March 19, 2018, 1:23pm UTC](https://discuss.elastic.co/t/trying-to-create-a-pie-chart-but-im-a-bit-lost/124559/2 "2018-03-19T13:23:39Z")

</div>

Hi,

you don't need a search if you don't want to narrow your documents down any further.

In your case you could just go to visualize, create a new pie chart, select the index pattern that holds your documents and select the following configuration:

- Metrics, Slice Size: Count (is the default value)
- Under Buckets:
  - Split Slices
  - Terms aggregation on field `level`
  - Set size to 6 (since you have 6 possible values)

And that should give you a pie chart, showing the percentage of the different log levels.

Cheers,  
Tim

---

<div class="post-metadata">

### Author: ![solo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/solo/32/29084_2.png) [@solo](https://discuss.elastic.co/u/solo)
#### Post date: [March 19, 2018, 1:41pm UTC](https://discuss.elastic.co/t/trying-to-create-a-pie-chart-but-im-a-bit-lost/124559/3 "2018-03-19T13:41:09Z")

</div>

I cant use level as Field, because it doesnt exist in the drop down list.  
What did I do wrong? I can see it on "Discover".

> **[kibana level](https://ibb.co/fYn4Sx)**
>
> Image kibana level hosted in imgbb.com

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 16, 2018, 1:41pm UTC](https://discuss.elastic.co/t/trying-to-create-a-pie-chart-but-im-a-bit-lost/124559/4 "2018-04-16T13:41:17Z")

</div>

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