Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 10th, 2006, 01:47 PM
Registered User
 
Join Date: Feb 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rfrancisco
Default OWC10: binding Chart to Pivot Table

Hi i work for PRO IT, Brazil, and i'm trying to use the method
objChart.SetData in OWC10 (I did it in OWC9) but i'm having som problems.
The following code was written using vbscript on a client script.
I'm using VB.NET(VS 2003)


sub ChartBind()
Dim cht 'reference to my chart
Dim c 'reference to ChartSpace constants
Dim ctr

document.all.ChartDiv.innerHTML = "<CENTER><OBJECT name='WebChart' id='WebChart' height='75%' width='100%' classid='CLSID:0002E556-0000-0000-C000-000000000046'><PARAM NAME='XMLData' VALUE=''></OBJECT></CENTER>"
myForm.WebChart.Clear
Set myForm.WebChart.DataSource = myForm.myPivotTable
myForm.WebChart.PlotAllAggregates = myForm.WebChart.Constants.chPlotAggregatesSeries

set cht = myForm.WebChart.Charts(0) 'I already have a chart
Set c = myForm.WebChart.Constants

cht.Type = 6
cht.HasLegend = False
cht.HasTitle = True
cht.Title.Caption = myForm.PivotTable.ActiveView.TitleBar.Caption

If chkBoxInvertSerie Then 'Invert selection
   cht.SetData c.chDimSeriesNames, 0, c.chPivotColumns
   cht.SetData c.chDimCategories, 0, c.chPivotRows
Else 'Do not invert it
   cht.SetData c.chDimSeriesNames, 0, c.chPivotRows
   cht.SetData c.chDimCategories, 0, c.chPivotColumns
End If

cht.SetData c.chDimValues, 0, 0
end sub

'I've tried to use c.chPivotColAggregates and c.chPivotRowAggregates
'but it didn't work either

 When i run my project a error occurs in the first SetData
   -> cht.SetData c.chDimSeriesNames, 0, c.chPivotRows

 What am i doing wrong???

 I need to develop a 2 value-axes scalling chart, where a series can be plotted against its own value axis with scaling that is different from the axis for the others series.
 And the chart must be able to show series from PivotTable columns and from rows either. (that's why i used invert)







Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting Excel pivot chart into Word document jfejsa Excel VBA 3 March 15th, 2007 03:53 PM
Inserting Excel pivot chart into Word documents jfejsa Word VBA 1 January 23rd, 2006 09:16 PM
Pivot Chart View Problems wall_of_jericho Access 1 July 27th, 2005 11:05 AM
Pivot Table mikeparams SQL Server 2000 1 February 9th, 2005 10:10 AM
Using Customized chart for Pivot Chart kliu9 Excel VBA 3 October 13th, 2004 09:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.