Rarefying Pivot Chart Tick Labels When the X Axis Gets Crowd

grovelli
4StarLounger
Posts: 528
Joined: 26 Jan 2010, 15:14

Rarefying Pivot Chart Tick Labels When the X Axis Gets Crowd

Post by grovelli »

Do you think it's possible to prevent the tick labels on the x axis of a pivot chart from cluttering it when there are lots of points to display?

On the startup form of the attached mdb, select the "Lake Level" option button then, on the calendar, select 1 January 2004, click on the button that says, "set begins date", on the calendar select 31 December 2004 and click on the button that says, "set ends date" and click the Chart button.
You can see you cannot read the labels on the x axis because they are too close to each other. I've tried to work around the problem by using the TickLabelUnitType property to display a tick label for every month on the time-scaled category axis but when I open the chart, the code stops at the line
axCategory.GroupingUnitType = chConstants.chAxisUnitMonth
in the FormatSeriesLabel sub in Module1 with the message
Invalid Parameter
but this same code is given as valid in the description of the GroupingUnitType Property
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78512
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Rarefying Pivot Chart Tick Labels When the X Axis Gets C

Post by HansV »

I get the same error message, even though exactly the same code is given in an example from Microsoft...

It's dangerous to rely on the Office Web Components (which the pivot table and pivot chart are part of): Microsoft has discontinued this library in Office 2007.
Best wishes,
Hans

grovelli
4StarLounger
Posts: 528
Joined: 26 Jan 2010, 15:14

Re: Rarefying Pivot Chart Tick Labels When the X Axis Gets C

Post by grovelli »

Thanks Hans, I thought I read on the Access Team Blog some time ago that pivot charts were still available in 2007/2010...

User avatar
HansV
Administrator
Posts: 78512
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Rarefying Pivot Chart Tick Labels When the X Axis Gets C

Post by HansV »

Yes, pivot charts are still available but programming them has become harder because the object library isn't available any more.
Best wishes,
Hans

grovelli
4StarLounger
Posts: 528
Joined: 26 Jan 2010, 15:14

Re: Rarefying Pivot Chart Tick Labels When the X Axis Gets C

Post by grovelli »

So what do you suggest using in 2007/2010 instead?

User avatar
HansV
Administrator
Posts: 78512
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Rarefying Pivot Chart Tick Labels When the X Axis Gets C

Post by HansV »

Either an MSGraph object, or an Excel chart (either embedded in an Access form or report, or in a separate instance of Excel controlled from Access by automation).
Best wishes,
Hans