# Two series linechart with time offset

**URL:** https://discuss.elastic.co/t/two-series-linechart-with-time-offset/260035
**Category:** Kibana
**Tags:** vega
**Created:** [January 3, 2021, 8:03am UTC](https://discuss.elastic.co/t/two-series-linechart-with-time-offset/260035 "2021-01-03T08:03:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![lstoneir](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@lstoneir](https://discuss.elastic.co/u/lstoneir)
#### Post date: [January 3, 2021, 8:03am UTC](https://discuss.elastic.co/t/two-series-linechart-with-time-offset/260035/1 "2021-01-03T08:03:26Z")

</div>

I have 2 data source  
first one's data is for `from: now-1w / to: now`  
second one is `from: now-2w / to: now-1`

I want to visualize both of them in one line chart.  
y axis is ratio and it's clear.  
but how can i define x axis to load both of series in 1 chart? how can set x axis to Date-Time?

my challenge is how to define X axis to draw this 2 line on each other to compare differences. because our times are not same.

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [January 3, 2021, 4:26pm UTC](https://discuss.elastic.co/t/two-series-linechart-with-time-offset/260035/2 "2021-01-03T16:26:21Z")

</div>

You can accomplish with TSVB  
First add your 1st series / data set.  
Then add your second data set and go into the options and change add the new index, offeset etc.

 ![Screen Shot 2021-01-03 at 8.24.00 AM](https://us1.discourse-cdn.com/elastic/original/3X/7/2/72d0a484a855f38baa22296a46f200ff8957704c.png)

---

<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: [January 31, 2021, 4:26pm UTC](https://discuss.elastic.co/t/two-series-linechart-with-time-offset/260035/3 "2021-01-31T16:26:23Z")

</div>

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