How to change the category label of a radar graph??

L

Lee

Hi,

I am using writing some program (using LabVIEW) and in my program, I am
using ActiveX to call Excel and create a radar chart. I would like to know
how to change to font size of the category label of a radar graph.

Thank you & Regards
Lee
 
J

Jon Peltier

Does your program use VBA? If so, go into Excel and manually do what you
want with the macro recorder on, then adapt this recorded code into your
program.

- Jon
 
L

Lee

Hi Jon,

Could you give me a rough VB code on how to do that?? I am not using VB but
I believe it should be similar as VB is also using ActiveX. Correct me if I
am wrong.

I have searched MSDN but cant seems to link up what ActiveX are called to
change the font size of the category label of a radar graph.

Appreciate your help greatly.

Regards
Lee
 
J

Jon Peltier

If you have Excel, you can use its macro recorder yourself. I just changed
the category axis label size in a radar chart, and this is what was
recorded:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 7/13/2007 by Jon Peltier
'
ActiveChart.ChartGroups(1).RadarAxisLabels.Select
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
End Sub

I would shorten it to this, since most of that code is reapplying defaults.

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 7/13/2007 by Jon Peltier
'
With ActiveChart.ChartGroups(1).RadarAxisLabels.Font
.Name = "Arial"
.Size = 12
End With
End Sub

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top