# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

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

it works,
Thank you very much .

Message 11 of 18
(522 Views)

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

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

Message 12 of 18
(221 Views)

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

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:

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.

Regards,
Srikrishna

Message 13 of 18
(213 Views)

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

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

Message 14 of 18
(205 Views)

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

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
Message 15 of 18
(199 Views)

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

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

Message 16 of 18
(194 Views)

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

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
Message 17 of 18
(175 Views)

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

Hi,

It works perfectly, big thanks!

Regards, Arthur

Message 18 of 18
(162 Views)