Solved

Series labels on MSChart control

Posted on 2001-07-02
2
1,434 Views
Last Modified: 2008-03-10
I have an MSChart control that reads data from text files and displays a 2D line chart. I have couple of questions:

1. I can change the scale on vertical axis, but can not change on X Axis. How do I change the scale on X-axis?

2. I would like to display series labels on the chart. I don't know how to...

Thanks in advance.
Mani
0
Comment
Question by:mani_ravipati
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 50 total points
ID: 6247954
mani_ravipati,

1) If you are using a line graph, changing the scale may not have much of an effect. It may be better to use an x-y chart type. To set the scale use:

Chart1.Plot.Axis(VtChAxisIdX).ValueScale.Minimum = 0
Chart1.Plot.Axis(VtChAxisIdX).ValueScale.Maximum = 100
Chart1.Plot.Axis(VtChAxisIdX).ValueScale.MajorDivision = 5
Chart1.Plot.Axis(VtChAxisIdX).ValueScale.MinorDivision = 4

To set a scale of 0-100 with major markers every 20 and minor every 5. (The division is the number of markers within the relevant scale).

2) I don't think you can show a series label as such. You can set the legend to display and set the text for each series using:

Chart1.Plot.SeriesCollection(1).LegendText = "My Series One"
0
 

Author Comment

by:mani_ravipati
ID: 6261958
TimCottee,

thank you for the reply.
My main concern was to find a way to show the series labels on the chart itself, as i have many series to plot....displaying the legend was second option.. looks like i have to make it my only option now..

when i set the markers as u mentioned, the x-axis labels were aligned in wrong direction.

thank again.
Mani
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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 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…

708 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

15 Experts available now in Live!

Get 1:1 Help Now