LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change orientation on Excel axis label

Solved!
Go to solution

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

0 Kudos
Message 1 of 10
(6,710 Views)
Solution
Accepted by topic author gnunesjr

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

 

Brian
Message 2 of 10
(6,693 Views)

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

0 Kudos
Message 3 of 10
(6,680 Views)

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

0 Kudos
Message 4 of 10
(6,173 Views)

Actually - I figured out what you meant, but now both my X and Y axis titles are rotated!  harumph....

0 Kudos
Message 5 of 10
(6,171 Views)

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

District Sales Engineer
0 Kudos
Message 6 of 10
(6,147 Views)

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

0 Kudos
Message 7 of 10
(6,104 Views)

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

0 Kudos
Message 8 of 10
(6,082 Views)

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?

 

 

0 Kudos
Message 9 of 10
(6,070 Views)

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.

0 Kudos
Message 10 of 10
(6,046 Views)