Extra Chart in my chartspace

D

DuffyD

I originally had poblems with my chart in owc9... so I decided to upgrade
that chart to owc11.

I am experiencing a new problem in owc11... my chart displays the correct
data and in the correct order, but for some reason, there is an extra chart
in my chartspace that has no data in it. Not exactly sure what my next move
is. Any ideas? Code listed below.

Set chtspc = Server.CreateObject("OWC11.Chartspace")
Set cht = chtspc.Charts.Add(0)
Set c = chtspc.Constants
cht.Type = c.chChartTypeLineMarkers
Set chtspc.DataSource = rs
cht.SetData c.chDimSeriesNames, 0, "ScrapCode"
for each series in cht.SeriesCollection
cht.SetData c.chDimCategories, 0, "Fiscal_Week"
cht.SetData c.chDimValues, 0, "PercentScrap"
next
 
A

Alvin Bruney [MVP]

if you bind to a datasource and you then add a chart object you will get two
charts. either bind or add

--
________________________
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

Ditch the first line
Set chtspc = Server.CreateObject("OWC11.Chartspace")

And reference it from the control reference you have on your form.

Best,
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