LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph => to put array of string to X scale .

Solved!
Go to solution

it works,
Thank you very much .Citation

0 Kudos
Message 11 of 18
(1,440 Views)

Hi, 

 

I need to plot a XY graph but on the X-abscis there needs to come string of a date.

I tried already the VI that stands here but is don't find the solution.

In the picture you see the data that needs to come in the graph. "prijs" on the Y-abcis and "datum" on the X-abcis. The problem is that the array of "datums" is an array of string. 

 

Hopefully you can give me a solution on this problem. 

 

Regards, Arthur

 

ArthurMalengier_0-1604964191259.png

ArthurMalengier_1-1604964511212.png

 

 

0 Kudos
Message 12 of 18
(1,139 Views)

Hi ArhurMalengier,

As you mentioned that both datums and prijs are array of strings,you need to convert them respectively to array of time stamps and array of doubles respectively.And also you need to set the 'displayformat' of X-scale in XY graphs properties to Absolute time with Y/M/D as below:

 

GraphProperties.PNG

The conversion of datums string array to timestamp array is trickier part.I had copy pasted the block diagram where i had tested for 8 elements of datums and prijs each..you can use it for all data which you have.

 

BD1.PNG

Regards,
Srikrishna


0 Kudos
Message 13 of 18
(1,131 Views)

Hi,

 

My x abcis stand in the right format but i don't get my datums on my x abcis. In the picture you see what i have already now.

 

Regards, Arthur

 

 

ArthurMalengier_0-1605007355920.png

 

0 Kudos
Message 14 of 18
(1,123 Views)

Hi Arthur,

 

what's the point in parsing the very same strings a million times?

 

Can you attach your VI with some data?

What timestamp do you get after the ScanFromString function?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 18
(1,117 Views)

Hi, 

 

I don't now exactly haw many times i need te run the loop.

In attach you see the Vi.

 

The project is about requesting shares and their price. These prices has to come in a graph with on the x abcis the date and on the y abcis the prices.

 

Regards, Arthur

0 Kudos
Message 16 of 18
(1,112 Views)

Hi Arthur,

 


@ArthurMalengier wrote:

I don't now exactly haw many times i need te run the loop.


You know that! You already created arrays from Date/Price!

 

Simple solution:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 17 of 18
(1,093 Views)

Hi, 

 

It works perfectly, big thanks!

 

Regards, Arthur

0 Kudos
Message 18 of 18
(1,080 Views)