LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting the title font and axis labels in a graph created with the Report Generation Toolkit

I'm using the LabVIEW Report Generation Toolkit for Microsoft Office to generate Excel worksheets containing plots. Unfortunately, the default font size used in the plots is huge (see attached worksheet). I was able to use Excel Set Graph Font.vi to reduce the size of the axis labels, but there does not appear to be a function to do this to the title and legend. In addition, there does not appear to be a function to set the axis text labels. Before I write my own, has NI released additional functions to perform these tasks?

Thanks for your help,

Zach Lerner
Software Engineer
OnWafer Technologies, Inc.
0 Kudos
Message 1 of 8
(6,762 Views)
The LabVIEW Report Generation Toolkit for Microsoft Office manual suggests using a template for options not found in the palette. You can find the manual by opening help for the report generation VIS. Goto the related documentation and click on the user manual. The end of chapeter 4 is where I found the info.

Jeremy Braden
National Instruments
0 Kudos
Message 2 of 8
(6,760 Views)
I am facing the same problem that the font size cannot be changed in title and legend. I follow the above path, but I cannot find the solution mentioned. I can only find "Report Generation Toolkit User Guide", but it doesn't state any solution to the problem. Have the location been changed?

Wilson P.S. Cheung
0 Kudos
Message 3 of 8
(6,701 Views)

Jeremy was referring to the April 2001 Version of the LabVIEW Report Generation Toolkit for Microsoft Office User Manual Here's the paragraph he was referring to:

Formatting Graphs
You can use the VIs located on the Graphs and Pictures palettes of both the Functions»Report Generation»Word Specific VIs and the Functions»Report Generation»Excel Specific VIs palettes to format existing graphs. The Word Format Picture VI and the Excel Format Picture VI can set graph size or change color type. Other Graph and Picture VIs can set color attributes, modify scale, and set font attributes for existing graphs. To specify the location of a graph that you want to format, transfer the graph index number from the Inlineshapes or Shapes collection to the graph index parameter.

Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 4 of 8
(6,690 Views)
I am new to the Report Generation Toolkit and I am also having a problem with the title and legend font.  I have been able to generate my graph in Excel exactly as I have wanted except for the title and legend problem.  I looked at the paragraph mentioned earlier in this thread, but I was still confused on how I will be able to change the fonts in the MS Graph.  I have thought either towards an Active X control (which I have no experience) or maybe an Excel Macro.  The Excel Macro idea seems as though it may not work due to the way LabView creates the graph for Excel.  I can post the code and a template if it helps. Thank you for help.
0 Kudos
Message 5 of 8
(6,607 Views)

I know that the thread goes back to 2005, but I still have this problem of not being able to change the font of both the Legend and the Chart title when using Excel Report Generation tool from within LabVIEW. Has this problem been looked at since then? Is there still no way to change the font size of chart legend and title?!

I've also tried Macros, and I couldn't make it to work because of the way the report generation tool creates charts as embedded objects.

Anyone had luck in this?

Thanks,

Zeidan

0 Kudos
Message 6 of 8
(6,295 Views)

Hello Zeidan Smiley Wink

The graph title and legend font sizes can be changed by accessing a low level VI (Excel_Insert_Chart.vi) that is part of the excelsub.llb that is located at (C:\Program Files\National Instruments\LabVIEW 8.2\vi.lib\addons\_office). This VI is called dynamically from within the Excel Insert Graph.vi and it uses VI server technology to access the Excel exposed properties. Attached to this post is an image of the block diagram of this VI after I have modified it to set the font sizes of the title and legend to 15. The circles in the image represent what I had to add to accomplish this.

Best Regards,

Ayman Kabire

Message 7 of 8
(6,278 Views)
Works Great! Thanks for the info!
0 Kudos
Message 8 of 8
(6,108 Views)