Solved

MS Chart Control - Dotted Line?

Posted on 2004-04-22
6
850 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

749 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