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
(541 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
(240 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
(232 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
(224 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 LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 15 of 18
(218 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
(213 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 LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 17 of 18
(194 Views)

Hi, 

 

It works perfectly, big thanks!

 

Regards, Arthur

0 Kudos
Message 18 of 18
(181 Views)