Why OWC10 chart binding to the spreadsheet doesn't work?

B

barbara_dave

Hi,

I have some code worked for VS2003 .NET but doesn't work for VS 2005.
Could somebody see what is wrong?

chartspace1.DataSource = spreadsheet1.GetOcx()

Dim oChart As OWC10.ChChart
Dim oSer As OWC10.ChSeries

oChart = chartspace1.Charts.Add()
oChart.HasLegend = True
oChart.Legend.Position =
OWC10.ChartLegendPositionEnum.chLegendPositionBottom oChart.Type =
OWC10.ChartChartTypeEnum.chChartTypeRadarLine

oSer = oChart.SeriesCollection.Add
oSer.SetData(OWC10.ChartDimensionsEnum.chDimSeriesNames, 0, "A4")
oSer.SetData(OWC10.ChartDimensionsEnum.chDimValues, 0, "B4:G4")

the error message is "Value does not fall within the expect range"

Thanks for the help!
 
A

Alvin Bruney [ASP.NET MVP]

radar charts behave a bit differently. Try changing the type to a simple
line chart to see if it renders. Then you can work from there.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
 
B

barbara_dave

radar charts behave a bit differently. Try changing the type to a simple
line chart to see if it renders. Then you can work from there.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively onwww.lulu.com/owc$19.99
-------------------------------------------------------




I have some code worked for VS2003 .NET but doesn't work for VS 2005.
Could somebody see what is wrong?
chartspace1.DataSource = spreadsheet1.GetOcx()
Dim oChart As OWC10.ChChart
Dim oSer As OWC10.ChSeries
oChart = chartspace1.Charts.Add()
oChart.HasLegend = True
oChart.Legend.Position =
OWC10.ChartLegendPositionEnum.chLegendPositionBottom    oChart.Type =
OWC10.ChartChartTypeEnum.chChartTypeRadarLine
oSer = oChart.SeriesCollection.Add
oSer.SetData(OWC10.ChartDimensionsEnum.chDimSeriesNames, 0, "A4")
oSer.SetData(OWC10.ChartDimensionsEnum.chDimValues, 0, "B4:G4")
the error message is "Value does not fall within the expect range"
Thanks for the help!- Hide quoted text -

- Show quoted text -

When I added one line code: chartspace1.Capture = true, it works. but
I cannot explain why and I cannot find the Capture property from OWC10
chart help document. Anyway it works now. Thanks!
 
A

Alvin Bruney [ASP.NET MVP]

I have no clue why that works. Who cares anyway? It works.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------


radar charts behave a bit differently. Try changing the type to a simple
line chart to see if it renders. Then you can work from there.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively onwww.lulu.com/owc$19.99
-------------------------------------------------------




I have some code worked for VS2003 .NET but doesn't work for VS 2005.
Could somebody see what is wrong?
chartspace1.DataSource = spreadsheet1.GetOcx()
Dim oChart As OWC10.ChChart
Dim oSer As OWC10.ChSeries
oChart = chartspace1.Charts.Add()
oChart.HasLegend = True
oChart.Legend.Position =
OWC10.ChartLegendPositionEnum.chLegendPositionBottom oChart.Type =
OWC10.ChartChartTypeEnum.chChartTypeRadarLine
oSer = oChart.SeriesCollection.Add
oSer.SetData(OWC10.ChartDimensionsEnum.chDimSeriesNames, 0, "A4")
oSer.SetData(OWC10.ChartDimensionsEnum.chDimValues, 0, "B4:G4")
the error message is "Value does not fall within the expect range"
Thanks for the help!- Hide quoted text -

- Show quoted text -

When I added one line code: chartspace1.Capture = true, it works. but
I cannot explain why and I cannot find the Capture property from OWC10
chart help document. Anyway it works now. Thanks!
 

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