Solved

mschart  - how to represent the line instead of color

Posted on 2002-06-24
1
421 Views
Last Modified: 2012-05-04
hi,
I have a mschart in my vb form.
I set the chart type to 2DLine.
Inside this chart,there are 3 lines where by the data is read
from the database.
During the run-time,the output is pretty good,each line is represent
with different colour.
But when I print the chart (Using a non-color printer).Then
I can't differenziate which line represent which line...
So I am wondering is there any method to represent the line in mschart
instead of color?

Thank You in advance.
0
Comment
Question by:boyyle
1 Comment
 
LVL 15

Accepted Solution

by:
ameba earned 100 total points
ID: 7106602
Yes, there is.  Change the Style of the Pen object.
You can also change the width of the Pen - default is 40 (a bit too wide)

                MSChart1.SeriesCollection(1).Pen.Style = VtPenStyle.VtPenStyleDashed
                MSChart1.SeriesCollection(1).Pen.Width = 10


or change line style like this:

                Select Case CurSeries Mod 5
                Case 0
                    ps = VtPenStyleDashDotDot
                Case 1
                    ps = VtPenStyleSolid
                Case 2
                    ps = VtPenStyleDashed
                Case 3
                    ps = VtPenStyleDotted
                Case 4
                    ps = VtPenStyleDitted
                End Select
                MSChart1.SeriesCollection(CurSeries).Pen.Style = ps
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

920 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

13 Experts available now in Live!

Get 1:1 Help Now