Javascript and OWC

D

Denver

I have this code which works fine

function configurePivot()
{
pvt = document.all.PivotData;
vew = pvt.ActiveView;
vew.ColumnAxis.InsertFieldSet(vew.FieldSets("Aging Bracket"));
vew.RowAxis.InsertFieldSet(vew.FieldSets("Customer"));
vew.DataAxis.InsertTotal(vew.Totals("Invoice Amount"))
}

So here I am setting the Row (.RowAxis.), Column (.ColumnAxis.) and
Data (.DataAxis.) of the Pivot TABLE, can you tell me what I would put
here for the Pivot CHART, i.e Series, Categories and Data

Thanks

Denver
 
A

Alvin Bruney

posted in here is some code to do just that, simply google for it

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
 
D

Denver

I have searched for ages can't seem to find it anywhere, do you have
any idea where it is? Also is it possible to just show the TOP TEN or
certain MEMBERS via Javascript?

Thanks

Denver
 
A

Alvin Bruney - ASP.NET MVP

The following is code-behind but you should be able to easily modify it to
client script.

Visual Basic

Private Sub Top5()

Dim table As Excel.PivotTable =
Globals.Sheet1.PivotTables("MyPivotTable")

If Not table Is Nothing Then

Dim pField As Excel.PivotField = table.PivotFields("Customerid")

pField.AutoShow(Excel.Constants.xlAutomatic,
Excel.Constants.xlTop, 5, "Sum of EmployeeID")

End If

End Sub


That will show the top 5 customer ID's.
I have searched for ages can't seem to find it anywhere, do you have
?any idea where it is?
start here
http://www.tushar-mehta.com/powerpoint/pivottable_in_slideshow/
--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
 

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