# Help to convert hardcoded data values in Vega to ElasticSearch

**URL:** <https://discuss.elastic.co/t/help-to-convert-hardcoded-data-values-in-vega-to-elasticsearch/320694>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [December 7, 2022, 3:28pm UTC](https://discuss.elastic.co/t/help-to-convert-hardcoded-data-values-in-vega-to-elasticsearch/320694 "2022-12-07T15:28:18Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![tinrik](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@tinrik](https://discuss.elastic.co/u/tinrik)\
**Post date:** [December 8, 2022, 3:24pm UTC](https://discuss.elastic.co/t/help-to-convert-hardcoded-data-values-in-vega-to-elasticsearch/320694/8 "2022-12-08T15:24:19Z")

</div>

I replaced mentions of `p1` with `_source.p1` inspired by [this thread](https://discuss.elastic.co/t/accessing-elasticsearch-from-vega-to-create-custom-visualizations/200714) but it seems it doesn't work?

---

_[View the full topic](https://discuss.elastic.co/t/help-to-convert-hardcoded-data-values-in-vega-to-elasticsearch/320694)._
