Solved

MS Chart Control - Dotted Line?

Posted on 2004-04-22
6
841 Views
Last Modified: 2013-12-26
I'm using the MS Chart Control to plot some data that I'm reading in from an access database.  The data is plotted in two series on the chart.  The first series is the actual data that I want to see on the chart.  The second series of data is basically a data limit (one repeated number).  

What I'm trying to do is display both series on the same chart, which I can do.  I set up series one as a bar chart, and the other as a line.  It is exactly like I want, however I would like to be able to change the line to a dotted line and perhaps make it "thinner" so that it doesn't stand out as much.

Anyone have any ideas on how to change the chart type from line to a dotted line or somehow modify the line style?

For a line I'm using MSChart1.chartType= VtChChartType2dLine



0
Comment
Question by:jg0069_2002
  • 4
  • 2
6 Comments
 

Expert Comment

by:loverman911
ID: 10899321
You can do it manually by right-clicking on the graph and select Properties.

- click the tab labeled 'Series Color'
- in the Edge/Line frame you can select your style, width and color

Do you need to know how to do this in code or is this good enough?

I am not sure how to do it in code but id you need it I can try to figure it out.

-Bri
0
 
LVL 2

Author Comment

by:jg0069_2002
ID: 10899474
Thanks for the response Bri... But I'm looking do do it through code, because my charts are dynamic and are loaded at runtime.
0
 

Expert Comment

by:loverman911
ID: 10900454
try this

MSChart1.Plot.SeriesCollection(1).Pen.Style =VtPenStyleDashed

-Bri
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

Accepted Solution

by:
loverman911 earned 125 total points
ID: 10900552
Here are more style types you can use

VtPenStyleDashDit
VtPenStyleDashDitDit
VtPenStyleDashDot
VtPenStyleDashDotDot
VtPenStyleDashed
VtPenStyleDitted
VtPenStyleDotted
VtPenStyleNative
VtPenStyleNull
VtPenStyleSolid

-Bri
0
 
LVL 2

Author Comment

by:jg0069_2002
ID: 10901098
Thanks Bri... It worked Great!!!
0
 

Expert Comment

by:loverman911
ID: 10901287
Glad I could help
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

815 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now