01-29-2009 11:29 AM
Hi,
I need some help with formatting the AXIS on a Word Graph using Labview. In my situation I have data reads like this:
0.0033
0.0003
0.0203
Etc...
I need FOUR decimal points to correctly display the numbers.
When I run it through Labview and into Word...All I get is ZEROES across my Axis.
If I double click the AXIS (In Word) and go to the properties "Number" tab, and CHANGE it from "General" to "NUMBER", and set the "DECIMAL PLACES" to "4".
The graph looks EXACTLY the way I want it to look:
After Manual Settings Are Applied:
After manually applying the Word settings The AXIS is formatted perfect! I have the correct 4 decimals points for my data.
NOW, the Question...
How do I use the "Word Set Graph Font.vi" to format the Axis with four decimal points?
I have tried countless combination, and I can't seem to make it work. I even called NI Tech support, and they kinda of "shrugged" their shoulders and referred me to a "help" file.
I maybe approaching this the wrong way, but my goal is to use a "Word Template", and "Generate a Word Doc Report" without having the user to format the Graph MANUALLY.
Here is a sample of what I think should work...but I can't seem to find a working combination.
Looking for any suggestions! Let me know what you think and I'll give it a try!
Many Thanks!
Doug
Solved! Go to Solution.
01-29-2009 12:43 PM
I figured it out!
The "Word Set Graph Font.vi" help file isn't too helpful. But I found the combination that works!
Here is the example code that worked:
What's tricky about the "help" file:
"number format (general)". To me I thought it was referring to Word's Categories..I.E....General, Number, Currency...etc.
"number format (general)" really means is "Number Format Mask". I replaced this with the type of Mask I wanted "0.0000"
"axis type (category)" again, another confusing title. The Word Properties Names "General, Number, Currency...etc." as a "Category".
I tried all the combinations (3) using a "constant"...but using these caused the problem! I REMOVED the input for the vi!
"graph index (-1)" again the Help file is lacking explanation. But it does give a little hint.
This references the order of Graphical Objects in your Word doc. In my template I had the following:
0 = Graphic Header
1 = Histogram one.
2 = Histogram two.
I changed the Graph Index to 2.
I have literally been working on this problem for days! No sooner I post my problems, I figured it out.
Doug
08-11-2009 02:51 PM
hi can you give me the vi?
cause i've some problem that's i cant give name to x-y axis
tanx
08-12-2009 10:34 AM
Sorry, the image links were broken. I relinked them again. Take a look now...this should explain it better.
Doug