Solved

MS Chart Control - Dotted Line?

Posted on 2004-04-22
6
857 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
[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
  • 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

734 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