# How to map sorted values on x-axis to integers

**URL:** https://discuss.elastic.co/t/how-to-map-sorted-values-on-x-axis-to-integers/121041
**Category:** Kibana
**Created:** [February 22, 2018, 12:05pm UTC](https://discuss.elastic.co/t/how-to-map-sorted-values-on-x-axis-to-integers/121041 "2018-02-22T12:05:44Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Aditya\_V](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@Aditya\_V](https://discuss.elastic.co/u/Aditya_V)
#### Post date: [February 22, 2018, 12:05pm UTC](https://discuss.elastic.co/t/how-to-map-sorted-values-on-x-axis-to-integers/121041/1 "2018-02-22T12:05:45Z")

</div>

For instance, if I have a set of dates on X-axis starting from June-1-2018 to July-3-2018, I want instead to show the values from 1 - 32

The actual usecase is as follows - I want to use Split Series feature to compare data sets from two different date ranges, on top of each other

Say I have a curve X for all dates, and I want to superimpose curve X at month of June on top of curve X at month of September, how can I do it using a Visualization? (I figured a split-series combined with above mapping should achieve it, but I don't know how to achieve the mapping)

---

<div class="post-metadata">

### Author: ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)
#### Post date: [February 22, 2018, 5:12pm UTC](https://discuss.elastic.co/t/how-to-map-sorted-values-on-x-axis-to-integers/121041/2 "2018-02-22T17:12:22Z")

</div>

The easiest way would be to use either Timelion or the Visual Builder for this.

Here's one post where a user is doing the offset in Timelion;

> [@Timelion and ISO Week](https://discuss.elastic.co/t/timelion-and-iso-week/115238):
>
> Hi there, I would like to compare two weeks with: .es(index=my-index, metric="sum:sessions").label('past week'), .es(index=my-index, metric="sum:sessions", offset=-1w).label('prev week') At the moment with offset=-1w I get one day more then expected and after that every day duplicated in the timeline (x-axis) so how do I tell Kibana that I want to get an iso week?

And a tutorial here which includes offset time;

> **[Getting Started with Time Series Analysis in Kibana](https://www.elastic.co/blog/timelion-tutorial-from-zero-to-hero)**
>
> A tutorial for timelion - the time series composer in Kibana - explaining everything you need to start working with timelion.

And here's some info on the Time Series Visual Builder which can also do offsets;

> **[Kibana Time Series Visual Builder](https://www.elastic.co/blog/master-time-with-kibanas-new-time-series-visual-builder)**
>
> Using Kibana's new time series visual builder feature to analyze and explore time series data living in Elasticsearch.

Regards,  
Lee

---

<div class="post-metadata">

### Author: ![Aditya\_V](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@Aditya\_V](https://discuss.elastic.co/u/Aditya_V)
#### Post date: [February 23, 2018, 10:30am UTC](https://discuss.elastic.co/t/how-to-map-sorted-values-on-x-axis-to-integers/121041/3 "2018-02-23T10:30:30Z")

</div>

Thanks for the response!

I'm wondering if it's possible as part of a shared dashboard/visualization

---

<div class="post-metadata">

### Author: ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)
#### Post date: [February 23, 2018, 2:55pm UTC](https://discuss.elastic.co/t/how-to-map-sorted-values-on-x-axis-to-integers/121041/4 "2018-02-23T14:55:07Z")

</div>

Yes, Timelion and the Visual Builder both save Visualizations that can be shared or used in Dashboards.

---

<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: [March 23, 2018, 2:55pm UTC](https://discuss.elastic.co/t/how-to-map-sorted-values-on-x-axis-to-integers/121041/5 "2018-03-23T14:55:08Z")

</div>

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