Variety of data in Y axis

Hi! I have downloaded the data from: Democracy index - Our World in Data

Which has the democracy index for countries and different years. I would like to represent something similar like this photo

However I cannot because Kibana just breakdown the results to the average or another metric.

Can someone please help me?

Thank you a lot!!

Hi @juandres117

what's the mapping of your data?
Also, can you post an example of a record?

Hi! Sorry to answer now. I send to you an image of the mapping:

image

And the records are like these

{
        "_index": "democracy_index",
        "_id": "DMd85JABaAYfS6nxnRVY",
        "_score": 1,
        "_source": {
          "Entity": "Afghanistan",
          "Year": 2014,
          "Code": "AFG",
          "Democracy score": 2.77
        }
      },
      {
        "_index": "democracy_index",
        "_id": "Dcd85JABaAYfS6nxnRVY",
        "_score": 1,
        "_source": {
          "Entity": "Afghanistan",
          "Year": 2015,
          "Code": "AFG",
          "Democracy score": 2.77
        }
      },
      {
        "_index": "democracy_index",
        "_id": "Dsd85JABaAYfS6nxnRVY",
        "_score": 1,
        "_source": {
          "Entity": "Afghanistan",
          "Year": 2016,
          "Code": "AFG",
          "Democracy score": 2.55
        }
      },
      {
        "_index": "democracy_index",
        "_id": "D8d85JABaAYfS6nxnRVY",
        "_score": 1,
        "_source": {
          "Entity": "Afghanistan",
          "Year": 2017,
          "Code": "AFG",
          "Democracy score": 2.55
        }
      }

Ok, so I think the challenging part is the Year mapping, set as long instead of date.
I think creating a runtime field in this case should do the trick, something like year_as_date would work.
YYYY is already a valid date value, so no even need to transform it.

Once created the runtime field create a date histogram vs the metric value, with a breakdown on Entity.