# Creating a line chart in kibana without aggregation

**URL:** <https://discuss.elastic.co/t/creating-a-line-chart-in-kibana-without-aggregation/314383>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [September 14, 2022, 8:23am UTC](https://discuss.elastic.co/t/creating-a-line-chart-in-kibana-without-aggregation/314383 "2022-09-14T08:23:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manasa\_reddy09](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manasa_reddy09/32/110847_2.png) [@Manasa\_reddy09](https://discuss.elastic.co/u/Manasa_reddy09)\
**Post date:** [September 14, 2022, 8:23am UTC](https://discuss.elastic.co/t/creating-a-line-chart-in-kibana-without-aggregation/314383/1 "2022-09-14T08:23:23Z")

</div>

Hello Folks,

I am new to Kibana, although i have worked with other visualization tools before. Kibana is new to me. I know that Kibana is based on Buckets and we need an aggregation to create charts in Kibana.. But when i read a few similar discussions I understood that there is a way in kibana to work with vega script to create visualization without aggregation.

I have written a few lines of code in vega. I am not getting any error , but i dont see any values in the graph.

I explain more about my use case. I have a column with values ranging from -70 to -140 called Power, and a Name field with the radio names and a time field... What i want to visualize is , to be able to view power generated by a particular radio with respect to time. I am not really sure how to visualize this data.

I will paste my vega script below. I am pretty sure i have to change a few things but I dont know where.

```auto
{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "title": "Event counts from all indexes",
  "data": {
    "url": {
      "%context%": true,
      "%timefield%": "Time",
      "index": "rrd*",
      "body": {
        "aggs": {
          "time_buckets": {
            "date_histogram": {
              "field": "Time",
              "interval": {"%autointerval%": true},
              "extended_bounds": {
                "min": {"%timefilter%": "min"},
                "max": {"%timefilter%": "max"}
              }
            }
          }
        }
      }
    },
    "format": {"property": "aggregations.time_buckets.buckets"}
  },
  "mark": "line",
  "encoding": {
    "x": {"field": "key", "type": "temporal", "axis": {"title": false}},
    "y": {"field": "power", "type": "ordinal", "axis": {"title": "Power Range"}}
  }
}

```

the output is just a plain graph with X axis as time(like i want it to be), Y axis, it just shows undefined. I want to display the range from -70 to -140 on y axis.

Please help me with this. I have been working on this from so many days but I am not able to think of any further.

Thank you so much in advance.

---

<div class="post-metadata">

**Author:** ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)\
**Post date:** [September 26, 2022, 12:48pm UTC](https://discuss.elastic.co/t/creating-a-line-chart-in-kibana-without-aggregation/314383/2 "2022-09-26T12:48:09Z")

</div>

Hello, maybe this article could help you?

> **[Scatterplot in Kibana using Vega](https://www.timroes.de/kibana-vega-scatterplot)**
>
> Tutorial on how to use Kibana's Vega visualization to create a scatter plot in
> Kibana.

It creates a scatterplot with non-aggregated data.

---

<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:** [October 24, 2022, 12:48pm UTC](https://discuss.elastic.co/t/creating-a-line-chart-in-kibana-without-aggregation/314383/3 "2022-10-24T12:48:23Z")

</div>

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