How can display horizontal bar on the Timelion? (or another chart)

Help this please. (sample json too)

Hi @Cusis_Eel

do you have a sample record with the data to represent?
As first sight I would say Vega is your best bet, as that looks like some sort of Gantt chart.
One question I have is, can detected timings overlap each other? If not, then probably borrowing some code from a Vega Gantt chart can work (using just one category for the Y axis)

Thank you for your answer.
Perhaps don't overlap each other.
There is no sample code. We will prepare the json data needed to draw the graph above.
Either way is fine, so please let me know.
(The using current version is 7.17.5, but we can upgrade to 8.3.2 if necessary.)

Have a look at this answer here with a semi-full Vega configuration: Gantt chart on Kibana using version 7.11 - #4 by Marco_Liberati

In the y encoding you might use always the same value (so either a field with a static value, or a static string) to have a single "swimlane":

encoding: {
    y: {
      field: _source.Date // <== change this in the linked configuration
      type: nominal

thanks for your reply.
Your reply, and trying various ways,
The results were obtained as shown in the following figure.

However, there is a problem that the width area over time is not properly visualized like an image. What's the problem?

All I want is an absolute size. For example, I want to divide it into 24 hours of size by 1 minute or 5 minutes.

  data: {
    url: {
      %context%: true
      %timefield%: input_date
      index: dummy02
      body: { }
    format: {
      property: hits.hits
  mark: bar
    encoding: {
      "x": {
        "field": "_source.start","type" : "ordinal"
      "x2": {
        "field": "_source.end","type" : "ordinal"
      "y": {
        "field": "","type" : "nominal"

this is json data

    "input_date" : "2022-12-01",
    "start" : "02:15",
    "end" : "02:30",
    "name" : "noname"

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