# Which chart select to display non-timestamp series

**URL:** <https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616>\
**Category:** Ignition\
**Created:** [August 9, 2023, 9:07am UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616 "2023-08-09T09:07:05Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matabufalez](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matabufalez/32/42267_2.png) [@Matabufalez](https://forum.inductiveautomation.com/u/Matabufalez)\
**Post date:** [August 9, 2023, 9:07am UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/1 "2023-08-09T09:07:05Z")

</div>

Hello,

I am getting from a query this values, and after split them, I am getting a Dataset for each A,B and C with 6x1 dimension. A and B are the Y values for two lines in the graph, and C is the X axis. Both A and B, matches the C value.  
A=0 9.15 9.16 9.15 9.16 9.16  
B=0 0 9.06 9.06 9.06 9.07  
C=0 77 254 432 610 787

So i am trying to create a graph, but I am stuck in which one select, because power chart is oriented to time series as far as i understand, and X-Y graph seems no work in the desired way, or at least i am not capable to do that.  
This is what I am getting:

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

Do anyone knows how to get that?

Thank you!

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [August 9, 2023, 9:33am UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/2 "2023-08-09T09:33:39Z")

</div>

You should not put a binding on every element in the array.  
Put one on the example that fills the whole array.

---

<div class="post-metadata">

**Author:** ![Matabufalez](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matabufalez/32/42267_2.png) [@Matabufalez](https://forum.inductiveautomation.com/u/Matabufalez)\
**Post date:** [August 9, 2023, 10:07am UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/3 "2023-08-09T10:07:36Z")

</div>

For me its easier to do in your way, but how do I match the element A0,A1...With C0,C1...?  
And just for me to know, what is the problem in doing that? Overload the system? As you can see, i am learning on this.

Thank you!

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [August 9, 2023, 10:26am UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/4 "2023-08-09T10:26:36Z")

</div>

Array properties are not ordered.  
Array bindings use indexes.  
which means the bindings might be selecting a different element than you expect

and idk i dont understand your question, the data you show does not match anything in the chart

C= t\_stamp? dont let that axis render as date, turn x-axis.render to value i guess

---

<div class="post-metadata">

**Author:** ![Matabufalez](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matabufalez/32/42267_2.png) [@Matabufalez](https://forum.inductiveautomation.com/u/Matabufalez)\
**Post date:** [August 9, 2023, 10:48am UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/5 "2023-08-09T10:48:36Z")

</div>

Thats the point, the data in the chart does not match anything in the chart, may be because it is formatted as date? Idk.  
My problem is A,B and C are query fields dates, but they are a string, so I have created separated dataset with split function.  
So, the point is creating a new dataset containing A and C, and B and C to represent both graphs.

---

<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 9, 2023, 11:17am UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/6 "2023-08-09T11:17:35Z")

</div>

Your data should be something on the order of:

```auto
[
    {
        A: 0.0, 
        B: 0.0, 
        C: 0
    }, 
    {
        A: 9.15, 
        B: 0.0, 
        C: 77
    }, 
    {
        A: 9.16, 
        B: 9.06, 
        C: 254
    }, 
    {
        A: 9.15, 
        B: 9.06, 
        C: 432
    }, 
    {
        A: 9.16, 
        B: 9.06, 
        C: 610
    }, 
    {
        A: 9.16, 
        B: 9.07, 
        C: 787
    }
]

```

I'f I'm reading your first post correctly, your underlying data is already like this from your query. Do you have a sample of that unaltered query data you can share?

---

<div class="post-metadata">

**Author:** ![Matabufalez](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matabufalez/32/42267_2.png) [@Matabufalez](https://forum.inductiveautomation.com/u/Matabufalez)\
**Post date:** [August 9, 2023, 11:53am UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/7 "2023-08-09T11:53:09Z")

</div>

Hello,

The problem comes from the source data. Data is formatted as a string with blank spaces:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/7/77993fd0f8e8ebfffd7933d8858c21b2e231a319.png)

So, what I made is take each column separated, and make "Trim" in each space, generating 3 different dataset, but that makes impossbiel to plot it in XY chart since they are separated dataset.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [August 9, 2023, 12:07pm UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/8 "2023-08-09T12:07:23Z")

</div>

> [@Matabufalez](#):
>
> Data is formatted as a string with blank spaces:

jikes, where does this come from?

---

<div class="post-metadata">

**Author:** ![Matabufalez](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matabufalez/32/42267_2.png) [@Matabufalez](https://forum.inductiveautomation.com/u/Matabufalez)\
**Post date:** [August 9, 2023, 12:09pm UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/9 "2023-08-09T12:09:59Z")

</div>

SQL table

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [August 9, 2023, 12:10pm UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/10 "2023-08-09T12:10:22Z")

</div>

why not store it as array?

---

<div class="post-metadata">

**Author:** ![Matabufalez](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matabufalez/32/42267_2.png) [@Matabufalez](https://forum.inductiveautomation.com/u/Matabufalez)\
**Post date:** [August 9, 2023, 12:15pm UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/11 "2023-08-09T12:15:04Z")

</div>

Do you mean prior to save in the SQL?  
I can not change the format of the data in the SQL.  
It comes from another software and is not available to edit unfortunatly.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [August 9, 2023, 12:19pm UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/12 "2023-08-09T12:19:05Z")

</div>

What does the data in each column from the table really represent?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [August 9, 2023, 12:19pm UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/13 "2023-08-09T12:19:46Z")

</div>

sigh xd

something like this then i guess

```auto
A= "0 0 14"
B= "0 0 14"
C= "0 0.5 14"

splitA=A.split()
splitB=B.split()
splitC=C.split()

shortestLength = len(min([splitA,splitB,splitC],key=len))
returnList=[]
for x in range(shortestLength):
    returnList.append({"A":float(splitA[x]),"B":float(splitB[x]),"C":float(splitC[x])})
return returnList

```

returns

```auto
[{'A': 0.0, 'B': 0.0, 'C': 0.0}, {'A': 0.0, 'B': 0.0, 'C': 0.5}, {'A': 14.0, 'B': 14.0, 'C': 14.0}]
> 

```

---

<div class="post-metadata">

**Author:** ![Matabufalez](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matabufalez/32/42267_2.png) [@Matabufalez](https://forum.inductiveautomation.com/u/Matabufalez)\
**Post date:** [August 9, 2023, 12:51pm UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/14 "2023-08-09T12:51:30Z")

</div>

One column is for the maxium diameter of a piece  
The other is for the minimum diameter.  
The third column represent the position in the piece.

---

<div class="post-metadata">

**Author:** ![Matabufalez](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matabufalez/32/42267_2.png) [@Matabufalez](https://forum.inductiveautomation.com/u/Matabufalez)\
**Post date:** [August 9, 2023, 12:51pm UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/15 "2023-08-09T12:51:54Z")

</div>

> [@victordcq](#):
>
> ```auto
> A= "0 0 14"
> B= "0 0 14"
> C= "0 0.5 14"
> 
> ```

I will check it, thank youuuu!

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [August 9, 2023, 2:25pm UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/16 "2023-08-09T14:25:40Z")

</div>

Not really here nor there, but I would do it like this, probably a little less readable for those newer to python, but it avoids the calculation of the length, zip will automatically only return groups to the length of the shortest iterable passed to it.

```auto
from intertools import chain

A = '0 0 14'
B = '0 0 14'
C = '0 0.5 14'

return [dict(zip('ABC',map(float,c))) for c in chain(zip(A.split(),B.split(),C.split()))]

```

Returns

```auto
[{'A': 0.0, 'B': 0.0, 'C': 0.0}, {'A': 0.0, 'B': 0.0, 'C': 0.5}, {'A': 14.0, 'B': 14.0, 'C': 14.0}]

```

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [August 9, 2023, 2:41pm UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/17 "2023-08-09T14:41:37Z")

</div>

> [@lrose](#):
>
> `chain(zip(A.split(),B.split(),C.split()]`

i think you are missing some `) )` here

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [August 9, 2023, 3:01pm UTC](https://forum.inductiveautomation.com/t/which-chart-select-to-display-non-timestamp-series/77616/18 "2023-08-09T15:01:05Z")

</div>

Yeah, smh I was rushing to get that posted before I went to take care of an issue. 😂
