# First attempt at using a Status Chart

**URL:** <https://forum.inductiveautomation.com/t/first-attempt-at-using-a-status-chart/91227>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [May 31, 2024, 9:32pm UTC](https://forum.inductiveautomation.com/t/first-attempt-at-using-a-status-chart/91227 "2024-05-31T21:32:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahardin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ahardin/32/66398_2.png) [@ahardin](https://forum.inductiveautomation.com/u/ahardin)\
**Post date:** [May 31, 2024, 9:32pm UTC](https://forum.inductiveautomation.com/t/first-attempt-at-using-a-status-chart/91227/1 "2024-05-31T21:32:27Z")

</div>

I'm trying to use a Status Chart to display the history of a machine. The dataset contains a timestamp\_of\_transaction, duration\_since\_last\_change, color\_for\_status, and status\_code. I've looked through the documentation but I'm struggling to see how to wire the chart up.

Can anyone offer a link or any insight on how to wire the chart? My goal is to show over the course of the shift what the machine status has been (Production, Setup, Problem, Break, Off) and in an ideal world the future time of the shift would show to the right as gray.

Thanks!

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [June 1, 2024, 10:11am UTC](https://forum.inductiveautomation.com/t/first-attempt-at-using-a-status-chart/91227/2 "2024-06-01T10:11:58Z")

</div>

> [@ahardin](#):
>
> The dataset contains a timestamp\_of\_transaction, duration\_since\_last\_change, color\_for\_status, and status\_code

How are you getting this dataset?

The `data` property of the chart should have at least two columns. The first column will be for the timestamp, and each additional column will be for the status code of a particular machine.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/0/208b4eca89ebd2111b7cdfd91b2b4fa25b93dc0e.png)  
Whatever header name is given to the machine column will be the name displayed for the machine's corresponding status bar.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/9/e98a19b900e05e2737e583d1e46647c96a0446bd.png)

The easiest way to set up the status colors is to right click on the chart and select "Status Chart Customizer"

From there, simply assign each possible status code a color:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/f/2fad3b6a4b634499c805fbfce5b69b7da57d0e5c.png)  
Each machine can be set up independently, or a color scheme can be applied to all:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/6/76bdfe668de1c9a417eee824ae6ee373566cc37b.png)

It is also possible to assign a color scheme directly using the chart's `properties` property:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/e/5ea461ccdb8a880d07aa4b02717b2f97129cc315.png)

> [@ahardin](#):
>
> how to wire the chart?

These datasets could be "wired" just like anything else with query bindings, initialization scripts, etc

---

<div class="post-metadata">

**Author:** ![ahardin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ahardin/32/66398_2.png) [@ahardin](https://forum.inductiveautomation.com/u/ahardin)\
**Post date:** [June 3, 2024, 5:35pm UTC](https://forum.inductiveautomation.com/t/first-attempt-at-using-a-status-chart/91227/3 "2024-06-03T17:35:36Z")

</div>

Thanks Justin! I think this is perfect. I'm going to try and apply this now.

---

<div class="post-metadata">

**Author:** ![ahardin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ahardin/32/66398_2.png) [@ahardin](https://forum.inductiveautomation.com/u/ahardin)\
**Post date:** [June 3, 2024, 6:44pm UTC](https://forum.inductiveautomation.com/t/first-attempt-at-using-a-status-chart/91227/4 "2024-06-03T18:44:10Z")

</div>

My next issue is the API timestamp is UTC and I need to convert because it's an invalid date format.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/d/8d8b6cea723497111f2ffb92994e5ceae96a9b48.png)
