Showing results for 
Search instead for 
Did you mean: 

display strings on x axis on graph

Go to solution



I need a graph with 2 axis, on X axis I need display array of text and on Y axsi I have array of string or array of numrics (can I have both).

how can i connect my data to graph?


0 Kudos
Message 1 of 10

A graph can only plot numerical data, how else would you know how to graphically represent the data on a cartesian plane?


But I think you can replace the axis labels with custom text. So, if you use numerics for your data and replace the axis labels with the text then you might get what you want.

Thoric (CLA, CLED, CTD and LabVIEW Champion)

0 Kudos
Message 2 of 10

Nope. Apparently my hunch was wrong, you can't use string markers. But there are other proposed solutions:


Thoric (CLA, CLED, CTD and LabVIEW Champion)

0 Kudos
Message 3 of 10

thanks for your reply

My X axis data is special time format that I save in SQL database and I read my data from database in string mode like this (1995/05/12 12:45:13) Now I need display this data on X axis.

Now I try your solution I hop it work.

0 Kudos
Message 4 of 10

Another reason to support this idea. 🙂

0 Kudos
Message 5 of 10
Accepted by topic author meysam_b

Hi meysam,


why do you think you need string markers on your X axis?


All you need to do is converting those database information into LabVIEW timestamps:


and format your X axis to show time…

Best regards,

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10

Hi GerdW,


thank you very much for your good solution,

It is nice and worked!



0 Kudos
Message 7 of 10

Yes, you didn't say your x axis was a timestamp! As Gerd has shown, you can display time in the x axis natively, you just need to interpret your SQL format.

Thoric (CLA, CLED, CTD and LabVIEW Champion)

0 Kudos
Message 8 of 10

Hi Thoric,

I do have the same issue, but in my case are real strings and not dates. 

I have seen this post here: Re: Is there a way to make table entries vertical rather than horizontal? - NI Community

But it is quite old and not very elegant and flexible.

Do you know whether in the last years something better came up?


Thank you  

0 Kudos
Message 9 of 10

Hi logatto,

I am sorry but I'm not aware of any improvements to axes in this regard.

Thoric (CLA, CLED, CTD and LabVIEW Champion)

0 Kudos
Message 10 of 10