# Time Series Visual Builder - Inverted Y-Axis

**URL:** <https://discuss.elastic.co/t/time-series-visual-builder-inverted-y-axis/212138>\
**Category:** Kibana\
**Created:** [December 17, 2019, 10:28am UTC](https://discuss.elastic.co/t/time-series-visual-builder-inverted-y-axis/212138 "2019-12-17T10:28:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hlamsc](https://avatars.discourse-cdn.com/v4/letter/h/eb9ed0/32.png) [@hlamsc](https://discuss.elastic.co/u/hlamsc)\
**Post date:** [December 17, 2019, 10:28am UTC](https://discuss.elastic.co/t/time-series-visual-builder-inverted-y-axis/212138/1 "2019-12-17T10:28:31Z")

</div>

Hey there,

so I'm trying to build an area chart in Kibana 6.8 that visualizes the document count of a specific filter.

My plan:  
We have firewall logs and I want an area chart. One area is based on filtering specific source hosts. The other area consists of specific destination hosts. Now I want both of them in one chart, but one of them inverted.

I already found this tutorial [https://www.elastic.co/blog/master-time-with-kibanas-new-time-series-visual-builder](https://www.elastic.co/blog/master-time-with-kibanas-new-time-series-visual-builder) but the function doesn't seem to work if there is no calculation in the metric.

The aggregation "Calculation" is missing, so I guessed it has to be "Math". But taking the formular "params.test \> 0 ? params.test\* -1 : null" doesn't work on my end.

 ![kibana](https://us1.discourse-cdn.com/elastic/original/3X/f/b/fbb4759e1a314147a39fbf364156895afa1bb9b3.png)

Am I doing something wrong here?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [December 17, 2019, 7:50pm UTC](https://discuss.elastic.co/t/time-series-visual-builder-inverted-y-axis/212138/2 "2019-12-17T19:50:47Z")

</div>

Try just doing `params.test* -1`

I think the new TinyMath library introduced when the name changed from "Calculation" to "Math" handles undefined values for you.

---

<div class="post-metadata">

**Author:** ![hlamsc](https://avatars.discourse-cdn.com/v4/letter/h/eb9ed0/32.png) [@hlamsc](https://discuss.elastic.co/u/hlamsc)\
**Post date:** [December 18, 2019, 6:12am UTC](https://discuss.elastic.co/t/time-series-visual-builder-inverted-y-axis/212138/3 "2019-12-18T06:12:03Z")

</div>

Hey Bargs,

thanks for the answer but unfortunately it doesn't work.  
Its not just the negative calculation won't work. I tried to multiplicate with 2 or anything else but the numbers wont change.

Edit:

Oh, it works now. I had to have "Count" first then the "Math" aggregation.

---

<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 15, 2020, 6:12am UTC](https://discuss.elastic.co/t/time-series-visual-builder-inverted-y-axis/212138/4 "2020-01-15T06:12:07Z")

</div>

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