# Trouble getting my dataset into chart data

**URL:** <https://forum.inductiveautomation.com/t/trouble-getting-my-dataset-into-chart-data/19341>\
**Category:** Ignition\
**Created:** [August 21, 2018, 1:52pm UTC](https://forum.inductiveautomation.com/t/trouble-getting-my-dataset-into-chart-data/19341 "2018-08-21T13:52:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bluemonkey136](https://avatars.discourse-cdn.com/v4/letter/b/71e660/32.png) [@Bluemonkey136](https://forum.inductiveautomation.com/u/Bluemonkey136)\
**Post date:** [August 21, 2018, 1:52pm UTC](https://forum.inductiveautomation.com/t/trouble-getting-my-dataset-into-chart-data/19341/1 "2018-08-21T13:52:32Z")

</div>

I managed to get the counts of my data into memory tags. Now I am trying to get those memory tags into a dataset to use in a chart and basically make a pareto out of the dataset.

I currently have this on the property change event for the chart.  
Currently running Ignition version 7.6.7, so I have no dataset tags

* * *

bloCnt = system.tag.read(“TouchupCounts/blowthroughCountVal”).value  
lenCnt = system.tag.read(“TouchupCounts/lengthCountVal”).value  
ntuCnt = system.tag.read(“TouchupCounts/notouchupCountVal”).value  
offCnt = system.tag.read(“TouchupCounts/offlocationCountVal”).value  
othCnt = system.tag.read(“TouchupCounts/otherCountVal”).value  
porCnt = system.tag.read(“TouchupCounts/porosityCountVal”).value

headers = [“Blow Through”, “Length”, “No Touch Up”, “Off Location”, “Other”, “Porosity”]

data = []

data.append([bloCnt,lenCnt,ntuCnt,offCnt,othCnt,porCnt])

countDs = system.dataset.toDataSet(headers,data)

/\* commented out currently  
pds = system.dataset.toPyDataSet(countDs)

for row in pds:  
\_ for value in row:\_  
\_ print value\_  
\_ \_  
event.source.pythonDataset = system.dataset.toDataSet(pds)  
\*/

for row in range(countDs.rowCount):  
for col in range(countDs.columnCount):  
print data.getValueAt(row, col)

event.source.pythonDataset = system.dataset.toDataSet(countDs)

* * *

I would like to have it clear the dataset values each time the tag values change as well. I’m kind of confused on how to call this into the dataset on the chart though.

You have been a great help so far I’m just really new to ignition myself.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 21, 2018, 2:42pm UTC](https://forum.inductiveautomation.com/t/trouble-getting-my-dataset-into-chart-data/19341/2 "2018-08-21T14:42:00Z")

</div>

Instead of reading the tags in your script consider using tag bindings on root container custom properties. Then use a propertyChange event that runs the rest of your script when any of them change. You would assign the resulting dataset to the chart's dataset property.

> [@Bluemonkey136](#):
>
> Currently running Ignition version 7.6.7, so I have no dataset tags

> [@Bluemonkey136](#):
>
> I'm just really new to ignition myself.

These two quotes don't go together. Starting with an ancient and unsupported version of Ignition is a really bad plan.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [August 21, 2018, 6:39pm UTC](https://forum.inductiveautomation.com/t/trouble-getting-my-dataset-into-chart-data/19341/3 "2018-08-21T18:39:25Z")

</div>

> [@pturmel](#):
>
> Starting with an ancient and unsupported version of Ignition is a really bad plan.

Sometimes, however, we have to play the had we're dealt.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 21, 2018, 10:12pm UTC](https://forum.inductiveautomation.com/t/trouble-getting-my-dataset-into-chart-data/19341/4 "2018-08-21T22:12:01Z")

</div>

> [@JordanCClark](#):
>
> Sometimes, however, we have to play the had we're dealt.

Yeah, well, sometimes it helps to pass on to the powers that be that they are making it unnecessarily difficult to achieve the results they are asking for.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [August 22, 2018, 10:41am UTC](https://forum.inductiveautomation.com/t/trouble-getting-my-dataset-into-chart-data/19341/5 "2018-08-22T10:41:55Z")

</div>

> [@pturmel](#):
>
> Yeah, well, sometimes it helps to pass on to the powers that be that they are making it unnecessarily difficult to achieve the results they are asking for.

Usually it's "All good projects require time, money and resources. You may pick any 2" 😁.

(Sorry to derail your thread, @Bluemonkey136.)
