Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MS Chart Control - Dotted Line?

Posted on 2004-04-22
6
Medium Priority
?
866 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Accepted Solution

by:
loverman911 earned 375 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses

916 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