07-08-2009 10:56 AM
Greetings all-
I'm trying to use the Report Generation Toolkit to make an Excel report. I've got a graph, and I would like to rotate the axis label for the vertical axis so that it is vertical! I can add the label, but it defaults to horizontal, wasting too much space....
Any ideas? (Bearing in mind that I have very little knowledge of either VBA or ActiveX...)
-GN
Solved! Go to Solution.
07-08-2009 12:47 PM
I will try to you lead on the right path.
Open up NI_ReportGenerationToolkit.lvlib:Excel_Set_Scale.vi and expand the Axis class to show more properties.
In the attached doc I show the AxisTitle class and there you can see the Orientation property(I am thinking this is what you need).
Good luck
07-08-2009 02:43 PM
Brian-
Perfect!
The actual vi I needed to modify was slightly different:
Excel_Chart_Font.vi, called by
Excel_Set_Chart_Axis_Font.vi, which is invoked by
Excel Set Graph Font.vi
I just cast the value 90 to a variant and wired it to the Orientation property, and bingo!
Thanks,
-GN
03-11-2011 02:50 PM
I'd also like to rotate the Y-axis title, but am having a hard time understanding what you're describing. Would you mind posting your code?
Thanks!
-DS
03-11-2011 02:55 PM
Actually - I figured out what you meant, but now both my X and Y axis titles are rotated! harumph....
03-14-2011 05:45 PM
Hey dansteed,
What do you mean your axes are rotated? The names are reversed? Could you post your code, or a screenshot of the issue you are experiencing?
~kgarrett
03-23-2011 08:36 AM
Dan-
Sounds like you fixed your problem, but just in case...here's my VI. Compare it to the original Excel_Chart_Font.vi which is found in C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\addons\_office\_exclsub.llb on my computer. It's been a while since I've used this (that project got canned...).
-GN
03-25-2011 01:43 PM
Hi GN.
Thanks for your replies. I actually did not get my issue fully resolved because I decided to go in a different direction. I ended up creating my graph using an XY chart and then using the property nodes to control the axis titles, caption, etc. I found that this gave me a little better control over the graph (as compared to the Report Generation / Excel method).
Just so you don't think that I ignored the previous post - I sent a private message to the user that asked for a screenshot/code, explained my situation, and asked if I should post my issue anyway. I did not receive a reply.
I appreciate your help and I'm sure we'll be talking again soon,
-DS
03-28-2011 02:52 PM
Hi Dan,
Since kgarrett never responded, let us know what this new direction is you've taken on here. Now that you are using property nodes to take control of the graph, where does your new problem lie? What are you trying to do and what is it your actually seeing?
04-04-2011 10:28 AM
I decided to use a XY chart and then use Property Nodes to control the axis titles, caption, etc... After a little bit of effort (because this method was new to me), I was able to create my graphs as I wanted them and do not have any further problems.
Ultimately, the Property Node method ended up being a much easier and (more importantly) a more controllable solution. While the Report Generation tools (using Excel) were useful to create a quick plot, I was not able to have as much control over the appearance of the graph as I had hoped for.