Groups | Blog | Home
all groups > vb.net > february 2005 >

vb.net : How to use Microsoft Office Chart control ?


Scott H
2/1/2005 9:41:37 PM

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
jo0ls
2/2/2005 3:06:44 AM
Scott H <e@mc.sqr> wrote in news:l6tvv0903bfikqftd8bemrtssoef90hoip@
4ax.com:

[quoted text, click to view]

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
Scott H
2/3/2005 5:36:50 PM

[quoted text, click to view]

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

Scott H

componentxtra NO[at]SPAM yahoo.com
2/18/2005 11:41:53 AM
You could also try our free XYGraph.

----
Bob
http://www.componentXtra.com
AddThis Social Bookmark Button