Solved

mschart  - how to represent the line instead of color

Posted on 2002-06-24
1
414 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

759 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

18 Experts available now in Live!

Get 1:1 Help Now