Search code examples
kibanakibana-4

How to make a visualization (say a vertical bar graph ) between two field of a single index in kibana


I have some set of data as

@day: 01-01-2016 @count: 20

@day: 02-01-2016 @count: 40

I want to see them as my @day on X-axis and @count on Y-axis

any help?

Edit 1 enter image description here

So I follow below suggestion, I am getting sum of all the values. But I have:

@day 01-01-2016 @count 20
@day 08-01-2016 @count 50
@day 16-01-2016 @count 30
@day 24-01-2016 @count 10
@day 30-01-2016 @count 110
@day 08-02-2016 @count 50
@day 16-02-2016 @count 30

Sum is 300 ( as coming in graph)

and obviously, I need direct X-Y mapping.

any guesses where I am missing the point


Solution

  • Visualize > Vertical bar Chart > New Search > Select your index pattern.

    To have the day on X-axis:
    buckets: Select buckets type: X-Axis > Aggregation : Date histogram > Field: @day

    To have the count on Y-axis: metrics: Y-Axis: Aggregation > Sum > Field: @count

    Of course, for it to work, you'll need to have the @day field as timestamp and the @count as integer

    Result (with data provided by OP)

    enter image description here