# Help with custom vega visualization

**URL:** <https://discuss.elastic.co/t/help-with-custom-vega-visualization/199297>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [September 12, 2019, 5:15pm UTC](https://discuss.elastic.co/t/help-with-custom-vega-visualization/199297 "2019-09-12T17:15:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alvaro\_lopez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alvaro_lopez/32/54096_2.png) [@alvaro\_lopez](https://discuss.elastic.co/u/alvaro_lopez)\
**Post date:** [September 12, 2019, 5:15pm UTC](https://discuss.elastic.co/t/help-with-custom-vega-visualization/199297/1 "2019-09-12T17:15:43Z")

</div>

Hello

I'm new in Vega visualization, is it possible to create a visualization to compare 2 different dates in the same period?

Something similar to timelion offset, for example today between 10 AM and 11 AM and last week with the same period but with a control in the visualization to modify -7d, -15d or another value without changes the code of the visualization?

Thanks

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [September 12, 2019, 6:17pm UTC](https://discuss.elastic.co/t/help-with-custom-vega-visualization/199297/2 "2019-09-12T18:17:15Z")

</div>

Yes, this is possible. If you take a look at the docs here you can see about the `shift` property:

[https://www.elastic.co/guide/en/kibana/7.4/vega-querying-elasticsearch.html](https://www.elastic.co/guide/en/kibana/7.4/vega-querying-elasticsearch.html)

---

<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 10, 2019, 6:17pm UTC](https://discuss.elastic.co/t/help-with-custom-vega-visualization/199297/3 "2019-10-10T18:17:18Z")

</div>

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