Solved

Series labels on MSChart control

Posted on 2001-07-02
2
1,447 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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…
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…

739 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