How to use Microsoft Office Chart control ?

S

Scott H

Hello,
I'm trying it use the Microsoft Office Chart control 11.0 in VB.net
(for a windows forms project) and can't seem to get it to work, I've
been playing around with various snippets of code. below is what I've
got at the moment, I'm trying to feed in literal numbers.

I placed a chart control on the form and called it ChartSpace1 and
adjusted a couple of settings to get it roughly as I want it, then ran
this code:

Dim chConstants
Dim chtNewChart

chConstants = ChartSpace1.Constants
chtNewChart = ChartSpace1.Charts.Item(0)
chtNewChart.SetData(OWC11.ChartDimensionsEnum.chDimCategories,
0, "Test")


It fails on the last line, with an "unspecified error"
I'm not looking to do anything complicated, just a simple bar graph,
and no, I do not want to pay $400 for a third-party control :)

Thanks for any help offered.

Scott
 
J

jo0ls

Hello,
I'm trying it use the Microsoft Office Chart control 11.0 in VB.net
(for a windows forms project) and can't seem to get it to work, I've
been playing around with various snippets of code. below is what I've
got at the moment, I'm trying to feed in literal numbers.

I placed a chart control on the form and called it ChartSpace1 and
adjusted a couple of settings to get it roughly as I want it, then ran
this code:

Dim chConstants
Dim chtNewChart

chConstants = ChartSpace1.Constants
chtNewChart = ChartSpace1.Charts.Item(0)
chtNewChart.SetData(OWC11.ChartDimensionsEnum.chDimCategories,
0, "Test")


It fails on the last line, with an "unspecified error"
I'm not looking to do anything complicated, just a simple bar graph,
and no, I do not want to pay $400 for a third-party control :)

Thanks for any help offered.

Scott

I gave up on the chart control. A free version of the dundas winchart
control is in the resource kit:
http://msdn.microsoft.com/vbasic/vbrkit/default.aspx
download, or get MS to send it to you for free (or do both)

It says "powered by dundas winchart" on the control in your app as you
didn't pay for it. Oh, it puts something similar on printouts too (though
you can save the chart as a picture, draw a white box over the added
caption and then print the picture *cough cough*).
 
S

Scott H

jo0ls said:
I gave up on the chart control. A free version of the dundas winchart
control is in the resource kit:
http://msdn.microsoft.com/vbasic/vbrkit/default.aspx
download, or get MS to send it to you for free (or do both)

It says "powered by dundas winchart" on the control in your app as you
didn't pay for it. Oh, it puts something similar on printouts too (though
you can save the chart as a picture, draw a white box over the added
caption and then print the picture *cough cough*).

Nice one, thanks for that joOls I'll check it out.

Scott H
 

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