Solved

MS Chart Controls

Posted on 2009-07-09
3
369 Views
Last Modified: 2012-05-07
I'm fairly new to MS Chart Controls and am having a difficult time.  I'd like to be able to dynamically change the Chart Type based on a drop down list (i.e. Pie, bar, etc.).  Can anyone provide any insight on how to go about this?

I downloaded the WebSamples from MS but they don't seem to help.  See the code below.  Intellisense isn't picking up the Type property of Series.

Or better yet, does anyone have any alternate reporting methods for charts and graphs besides MS Charts?
' Set series chart type
Chart1.Series("Default").Type = SeriesChartType.Bar

Open in new window

0
Comment
Question by:mmeisel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 15

Accepted Solution

by:
spprivate earned 250 total points
ID: 24815054
You can use OWC for this.

http://www.csharphelp.com/archives2/archive457.html

I have used this and it is pretty,but havent tried to change it dynamically.

This line is where you need to set the property for the chart type
objChart.Type = OWC.ChartChartTypeEnum.chChartTypeColumnClustered;
0
 
LVL 2

Expert Comment

by:badgerfire
ID: 25018220
Calling a chart objkect on an access form

Me.chtTEST.ChartType = xlLine  ' Line Chart

Me.chtTEST.ChartType = xlPie 'Pie Chart

Me.chtTEST.ChartType = xl3DPie '3d Pie chart

Be aware that not all chart types share the same types of parameters.

A list of constants can be found under the object browser in the visual basic editor in Access
The library is graph.

I would love to tell you there is a lot of information on this but it's more trial and error when programming graph and even OWC.  The saving grace is that you can record macros in excel when modifying charts and the code is almost a one for one in VBA.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question