# Using a query for time series chart

**URL:** <https://forum.inductiveautomation.com/t/using-a-query-for-time-series-chart/71244>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 17, 2023, 4:31pm UTC](https://forum.inductiveautomation.com/t/using-a-query-for-time-series-chart/71244 "2023-03-17T16:31:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hw79](https://avatars.discourse-cdn.com/v4/letter/h/838e76/32.png) [@hw79](https://forum.inductiveautomation.com/u/hw79)\
**Post date:** [March 17, 2023, 4:31pm UTC](https://forum.inductiveautomation.com/t/using-a-query-for-time-series-chart/71244/1 "2023-03-17T16:31:03Z")

</div>

More noob questions and my google-fu is failing me today.

How do I use a query as the data for a time series chart? I keep getting object found, array expected error.

Is there a resource where this is explained?

Thanks for your patience.

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [March 17, 2023, 4:54pm UTC](https://forum.inductiveautomation.com/t/using-a-query-for-time-series-chart/71244/2 "2023-03-17T16:54:06Z")

</div>

This gives a description of the properties for a Perspective Time Series Chart:

[https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Time+Series+Chart#PerspectiveTimeSeriesChart-Properties](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Time+Series+Chart#PerspectiveTimeSeriesChart-Properties)

It's hard to say without more information, but my guess is you're binding an object to the series property. The series property needs to be an array, each element of which must contain a name and data property. The data property can be an object.

---

<div class="post-metadata">

**Author:** ![hw79](https://avatars.discourse-cdn.com/v4/letter/h/838e76/32.png) [@hw79](https://forum.inductiveautomation.com/u/hw79)\
**Post date:** [March 17, 2023, 5:11pm UTC](https://forum.inductiveautomation.com/t/using-a-query-for-time-series-chart/71244/3 "2023-03-17T17:11:46Z")

</div>

Well, I'm trying to make a histogram and I'm just in way over my head.

I can't find any demos or tutorials about how to do it.

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [March 17, 2023, 5:49pm UTC](https://forum.inductiveautomation.com/t/using-a-query-for-time-series-chart/71244/4 "2023-03-17T17:49:59Z")

</div>

This doesn't specifically cover a histogram, but it's a good introduction to the Time Series Chart. If you want your histogram to be time-based this may be the best component.

> **[Time Series Chart Video at Inductive University](https://inductiveuniversity.com/videos/time-series-chart/8.1)**
>
> The Perspective Time Series Chart is a component designed to trend data on a time-based axis. Learn more about the component in this lesson.

The XYChart can also show columns. If your histogram is based on anything other than time this will probably work better.

> **[XY Chart Video at Inductive University](https://inductiveuniversity.com/videos/perspective-xy-chart/8.1)**
>
> Learn how to work with the Perspective XY Chart component.

---

<div class="post-metadata">

**Author:** ![hw79](https://avatars.discourse-cdn.com/v4/letter/h/838e76/32.png) [@hw79](https://forum.inductiveautomation.com/u/hw79)\
**Post date:** [March 17, 2023, 5:58pm UTC](https://forum.inductiveautomation.com/t/using-a-query-for-time-series-chart/71244/5 "2023-03-17T17:58:07Z")

</div>

> [@zacht](#):
>
> The XYChart can also show columns. If your histogram is based on anything other than time this will probably work better.

This is what I need, my histogram will be showing buckets by the weight. I think I'm going to use the chart range selector for the time.

---

<div class="post-metadata">

**Author:** ![jcaudle](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jcaudle](https://forum.inductiveautomation.com/u/jcaudle)\
**Post date:** [March 27, 2023, 2:16pm UTC](https://forum.inductiveautomation.com/t/using-a-query-for-time-series-chart/71244/6 "2023-03-27T14:16:57Z")

</div>

Is there an existing method or best practice for displaying Min Max lines on a XYChart?
