LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

bar chart ploting

Solved!
Go to solution
hi i have this 2 d array and i need to pass to a xy graph and view it a a bar plot...x will b the date and time and y will b the data, plz help urgent
0 Kudos
Message 1 of 14
(4,466 Views)

Hi jeyanthi,

 

I'd like to know in what format is the date and the time stored. Can't you just use the date only? In the attached image, date seems to be unique for every entry.

0 Kudos
Message 2 of 14
(4,463 Views)

the first character 1 will b ignored and the date format will b in YYMMDD...the time is in 24 hours format... if it is zero there is no data for tht day.

 

plz help

0 Kudos
Message 3 of 14
(4,458 Views)

First way, I'd recommend you use time stamp to store time and date, rather than two different numeric values.

 

If you're reading this data from a file or port as string and converting it into two numeric data, I'd recommend that you use scan from string and convert the string to a time stamp and then use that time stamp.

 

If you are somehow getting data in the two numeric formats above, you will require to change it to string first, then use that string to update the time stamp data and then use that as y entry...

 

Once you have got an array of time stamp and an array of values, all you need to do is, convert the time stamp to double and use it in the XY Graph as done in the attached image.

 

0 Kudos
Message 4 of 14
(4,446 Views)

HH:MM:SS YY/MM/DD 

01:35:00 09/09/04

14:00:02 09/09/05

 

How to convert tis to a time format?

0 Kudos
Message 5 of 14
(4,412 Views)
Solution
Accepted by topic author jeyanthi

You can do so using the code as shown in the attached image.

 

Please refer to the LabVIEW Help Files for the functions. They are documented pretty well. For more string to time conversion details, search for "Format Codes for the Time Format String" in the LabVIEW Help Files.

 

Hope this helps. 

0 Kudos
Message 6 of 14
(4,383 Views)

thk u nithin... now i able to plot bar plot..

but...the width of each bar is different how to make the width look same and tidy..

i attach the image here..

 

plz help..

y this happen..if i check ,the data is correct..but the bar width only look not nice..y

0 Kudos
Message 7 of 14
(4,381 Views)
I'm sorry, but I'm not able to reproduce this behaviour. Could you please attach the VI with relevant data, so that I can figure whats wrong?
0 Kudos
Message 8 of 14
(4,370 Views)
now its ok aftr i remove the time...i just use the date and data...for ploting..now its ok..nithin..thks for the help.
0 Kudos
Message 9 of 14
(4,368 Views)

Please mark the relevant answer as the solution to your problem. It helps other people looking for similar queries.

 

PS. My name is Nitin not Nithin.

0 Kudos
Message 10 of 14
(4,366 Views)