How would you accomplish the following in OWC 10

  • Thread starter Douglas Osborne
  • Start date
D

Douglas Osborne

My reference object would be frm1.ChartSpace1.Charts(0)

How do you hide the Drop Areas on a Chart linked to a Pivot table via
JavaScript?
How do you hide or display the ToolBar for the Chart linked to a Pivot table
via JavaScript?
How to programmatically carry out what the 'Show/Hide Legend' button does
for a Chart linked to a Pivot table via JavaScript?
How to programmatically carry out what the 'By Row/Column' button does for a
Chart linked to a Pivot table via JavaScript?

This would be using the
http://msdn.microsoft.com/library/default.asp?url=/msdnmag/issues/03/10/olap/toc.asp
example as a base.

TIA,
Doug
 
A

Alvin Bruney [MVP]

First, you would need a reference to the chart component. From the chart
component, you obtain a reference to the toolbar object. On the toolbar
object, you can set the visibility property appropriately. You can use this
pattern and apply it to your other questions using javascript. Note that the
top most object (chartspace) contains references to these objects. Where no
reference exists, then the object is not customizable. Also, for the drop
areas, they may be available but throw an exception because they are only
usable in the context of a bound data source.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
 
D

Douglas Osborne

My reference object would be frm1.ChartSpace1.Charts(0)
How do you hide the Drop Areas on a Chart linked to a Pivot table via
JavaScript?

frm1.ChartSpace1.DisplayFieldButtons = false;
How do you hide or display the ToolBar for the Chart linked to a Pivot
table via JavaScript?

frm1.ChartSpace1.DisplayToolbar = false;
How to programmatically carry out what the 'Show/Hide Legend' button does
for a Chart linked to a Pivot table via JavaScript?

frm1.ChartSpace1.Charts(0).HasLegend = false;
How to programmatically carry out what the 'By Row/Column' button does for
a Chart linked to a Pivot table via JavaScript?

Still open

Bonus: How to set the chart background color/texture.

frm1.ChartSpace1.interior.SetTextured(
frm1.PivotTable1.Constants.chTextureBlueTissuePaper );

Display the values of the graphs on the chart

if(
frm1.ChartSpace1.Charts(0).SeriesCollection(0).DataLabelsCollection.Count ==
0 )
{
frm1.ChartSpace1.Charts(0).SeriesCollection(0).DataLabelsCollection.Add();
frm1.ChartSpace1.Charts(0).SeriesCollection(0).DataLabelsCollection(0).HasValue= true;}>> This would be using thehttp://msdn.microsoft.com/library/default.asp?url=/msdnmag/issues/03/10/olap/toc.asp example as a base.>> TIA,> Doug>
 

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