# Script help, writing blank data for an xy chart when the query doesn't return data for a date

**URL:** <https://forum.inductiveautomation.com/t/script-help-writing-blank-data-for-an-xy-chart-when-the-query-doesnt-return-data-for-a-date/61870>\
**Category:** Ignition\
**Created:** [July 13, 2022, 7:24pm UTC](https://forum.inductiveautomation.com/t/script-help-writing-blank-data-for-an-xy-chart-when-the-query-doesnt-return-data-for-a-date/61870 "2022-07-13T19:24:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [July 13, 2022, 7:24pm UTC](https://forum.inductiveautomation.com/t/script-help-writing-blank-data-for-an-xy-chart-when-the-query-doesnt-return-data-for-a-date/61870/1 "2022-07-13T19:24:15Z")

</div>

Figured it out

I got a dataset of all the dates in the range.

I got all the dates in my query.

I then iterated over the dates, and if the date was in the first dataset, I wrote the blanks.  
If the date was in the second list, I wrote the values from the query.

Had one issue, and I resolved it setting the values of the spaces and zeros to strings.
