Solved

MS Chart Control - Dotted Line?

Posted on 2004-04-22
6
838 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

705 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

21 Experts available now in Live!

Get 1:1 Help Now