LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I format the X-axis numbers with Set_Excel_Graph_Font?

I am creating graphs using the Report Generation Toolkit and I have most of the formatting down. The Help says to refer to the Microsoft Graph documentation for more information about number formatting. I haven't been able to find the documentation or any help on the forums.

 

Has anyone done this before?

0 Kudos
Message 1 of 9
(3,716 Views)

Hi,

 

Can you be more specific as to exactly what kind of number formating you need more information on? I believe the help is referring to the help sections in Microsoft Excel and Word that deal with graphs and thier number format.

Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
Message 2 of 9
(3,678 Views)
I am trying to set the number format on the x-axis to numeric with 2 digits of precision. The default for the vi is "General" and it's a string input with no other options (see attached). I am sure that all that is needed is to type in the correct string to change from "General" to "Numeric" but I don't know what the string should look like.
0 Kudos
Message 3 of 9
(3,668 Views)

Hi,

 

The choices for number format can be any of the common formats seen in the picture below (this comes from Office 2007, but you can find the equivalent Number property tab in any of the previous Microsoft Office application editions.)

 

 

If you need a more custom numeric definition, you can create a "custom" format in the same style as the Custom option in the Numeric properties tab pictured above. For example, for a numeric with 2 digits of precision, I believe the string should be "#,##0.00". Of course, your milege may vary, and experimentation is always warranted. But basically, putting any entry in the tab pictured above, or a similar variation, should work. You may also search the Microsoft Office help for a document "Create or delete a custom number format." It exists in the Office 2007 Documentation, but may be absent in previous editions.

Message Edited by Captain Kirby on 09-16-2008 12:55 PM
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
0 Kudos
Message 4 of 9
(3,649 Views)
I know how to change the cell format in Excel. I am trying to change the graph x-axis programatically in LabVIEW before it goes to Excel.
0 Kudos
Message 5 of 9
(3,625 Views)

My intention was not to explain how to change the format in Excel, but to note that the same strings used in excel to format numbers, can be used as an input to the report generation VI "Excel Set Graph Font." Note that in the following graph

 

 

The Y axis is formatted "0.00". The following block diagram was used to generate this graph. Changing the constant string input to the VI will change the number format. Any string found in the "Format Cells" property page in excel can be used in LabVIEW as an input. You can also use the custom string formats to gain flexibility.

 

 

I hope this clears up the miscommunication.

Message Edited by Captain Kirby on 09-18-2008 10:34 AM
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
Download All
0 Kudos
Message 6 of 9
(3,608 Views)

Thanks, that works.

 

Bert

0 Kudos
Message 7 of 9
(3,554 Views)

Hi

 

The vi shown above uses the excel set graph font to apply temp(c) to the y-axis. how is this done what is the flag which says add this text to the y-axis. I would like to add an x-axis, a y-axis and a title and not sure how

 

cheers

 

0 Kudos
Message 8 of 9
(3,203 Views)

Ok

 

 

I have worked out by sticking a title in to xlCategory I can get the x-axis and by sticking the graph title in  insert graph vi I can get a graph title.

Using the above figure is there a way of rotating temp (c)?

0 Kudos
Message 9 of 9
(3,192 Views)