# Kibana y axis term

**URL:** <https://discuss.elastic.co/t/kibana-y-axis-term/180653>\
**Category:** Kibana\
**Created:** [May 11, 2019, 1:55pm UTC](https://discuss.elastic.co/t/kibana-y-axis-term/180653 "2019-05-11T13:55:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shauli\_Zak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shauli_zak/32/45578_2.png) [@Shauli\_Zak](https://discuss.elastic.co/u/Shauli_Zak)\
**Post date:** [May 11, 2019, 1:55pm UTC](https://discuss.elastic.co/t/kibana-y-axis-term/180653/1 "2019-05-11T13:55:10Z")

</div>

Hi, I'm a newbie to ELK so try to stay with me 🙂

I have an index with the following mapping

{  
"mapping": {  
"properties": {  
"@timestamp": {  
"type": "date"  
},  
"@version": {  
"type": "text",  
"fields": {  
"keyword": {  
"type": "keyword",  
"ignore\_above": 256  
}  
}  
},  
"number": {  
"type": "long"  
},  
"modifieddate": {  
"type": "date"  
},  
"status": {  
"type": "text",  
"fields": {  
"keyword": {  
"type": "keyword",  
"ignore\_above": 256  
}  
}  
}  
}  
}  
}  
where number is between 0 to 10^8 and status is a value out of a close set like {StatusVal1,StatusVal2,StatusVal3}

let's suppose the documents (data) are like in the following table

```
		X axis Y axis

```

date number status  
5/11/2019 12 StatusVal1  
12/12/2018 15 StatusVal2  
3/23/2019 17 StatusVal3  
2/1/2019 64 StatusVal1  
3/4/2019 65 StatusVal2  
12/11/2018 87 StatusVal3  
7/13/2018 99 StatusVal3

and I would like to draw a chart that X axis is the number term and Y axis is just a bar (lets says with hight equals to one if exist) \ point but with a color depends on the status value.

How can I do that ?

After this I would like to have an interpolation on both axes - so if there is no value (number, status) it will get it from the closest X value exist.

Thank Shaul

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [May 13, 2019, 4:29pm UTC](https://discuss.elastic.co/t/kibana-y-axis-term/180653/2 "2019-05-13T16:29:15Z")

</div>

@Shauli_Zak

your best bet is probably to do this with a heatmap-chart. It's the only visualization that you can map a color of a "bar" to a value. It only works with numerical values though.

- First, use a scripted-field to map your status-codes to a number (`{1,2,3}`). ([https://www.elastic.co/blog/using-painless-kibana-scripted-fields](https://www.elastic.co/blog/using-painless-kibana-scripted-fields))
- Then use the heatmap-visualization type to create the chart ([https://www.elastic.co/blog/awesome-new-kibana-visualizations-heatmap-and-point-series](https://www.elastic.co/blog/awesome-new-kibana-visualizations-heatmap-and-point-series)).
  - On the X-axis, use your `number` field.
  - For the metric-value, use that new scripted field you created.

Note that is will not do the interpolation though.

---

<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:** [June 10, 2019, 4:29pm UTC](https://discuss.elastic.co/t/kibana-y-axis-term/180653/3 "2019-06-10T16:29:15Z")

</div>

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