Rubrikenachse Titel ändern

A

Andreas Wöckl

hi group!

and und für sich möchte man meinen eine leichte aufgabe - nur finde ich mich
in dem web komponenten gewirr nicht zurecht und schaffe es nicht den titel
der rubrikenachse zu ändern - wer ned ahnung wie das funktioniert? (X-Achse)

mfg

a.w
 
S

Sascha Sertel

Andreas,

this is an English newsgroup, please don't post requests in any other
language than English, otherwise only a limited number of people will
actually be able to understand what you are asking. If you need help in
German, please try to find help in one of the German Microsoft newsgroups
such as microsoft.public.de.german.office or in one of the
microsoft.public.de.german.entwickler.* groups.

That being said, I happen to understand German and also know the answer to
your question: Every chart has the ChAxes collection, which holds all axes
in your graph, that is at least the initial X and Y axes as well as any
additional axis you might have added (if you are using different scales
etc.). Every ChAxis object in that collection has the Title property, which
you can set to the string you want to display as the title. Also remember to
set the HasTitle property for that axis to True, otherwise you won't be able
to see the title. The following is an example from the OWC11 help file,
which does exactly what I described above:

<---- Example ---->
Dim axCategoryAxis

' Set a variable to the Category (X) axis.
Set axCategoryAxis = ChartSpace1.Charts(0).Axes(0)

' The following two lines of code enable, and then
' set the title for the category axis.
axCategoryAxis.HasTitle = True
axCategoryAxis.Title.Caption = "Sales by Quarter"
<---- Example End ---->

Hope that helps,
Sascha
 
A

Andreas Wöckl

Dear Sascha!

I am very sorry for writing in German - after searching a long time for a
solution I think I got crazy..

Thanks for your code but I still have same troubles with it (I am using
OWC10.dll)

I get a compile error at the

--> ChartSpace1.Charts(0).Axes(0)

What's going wrong here? From where do I get a reference to ChartSpace1?

cu and thanks!

andi
 
S

Sascha Sertel

The ChartSpace object is the object you create from the OWC, in an ASP file
you would have a line like this:

set ChartSpace1 = server.CreateObject("OWC10.ChartSpace")

Then the example should work.

Sascha
 
A

Andreas Wöckl

hi sascha!

The problem is that I am using the web components in an access form -> so i
do not really know where to get the ChartSpace object?

cu

andi
 
S

Sascha Sertel

Hey Andi,

that's why I asked in what environment you are using the OWC. Access changes
the whole thing of course, although the code should still work (VBScript and
VBA are not that different). So I just tried it quickly and didn't have time
to play around with it more, but what I did was the following:

1. Start up Access with a fresh database
2. Added the OWC Chart control to a form and entered some data in the Data
Sheet to have some columns display
3. Then I added the title on the X-Axis and changed it manually, but you
know how that works, right? Just to be sure, I did that over the Commands &
Options menu item and then went to the General tab, where the X-Axis Title
Caption is at the bottom.
4. Then I clicked on the Code button in Access which brought me to the VBA
editor, where I could see at the left side that the active object is the
inserted OWC object. The default name assigned to it was ChartSpace0.
5. With the ChartSpace0 object, you should be able to do everything I
usually do from ASP, use the Charts and Axis object etc.

Does it work like that for you?
Sascha
 
A

Andreas Wöckl

Hi Sascha!

hmm - that's not the same procedure i use - i open the form with the
following code:

DoCmd.OpenForm "pivot_soll_ist", acFormPivotChart

and then:

Dim pTable As OWC10.PivotTable
Set pTable = Me.PivotTable
Dim pTableView As OWC10.PivotView
Set pTableView = pTable.ActiveView

..... -> any subobject of pTableView would be the right for me - but which..?

cu

andy

So I open the Form in the PivotChart mode
 

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

Similar Threads


Top