Solved

MSChart Control

Posted on 1998-12-08
1
833 Views
Last Modified: 2013-12-25
Hi guys,
: I have a problem in getting a chart displayed in a particular format.Iam using MSChart control for this.Is it possible to draw in
: the following format using MSchart.if not is there any other ActiveX control which supports the problem.

:     Parts
: 2000_|                  ___________
: .....|             D1   |          |
: .500_|__________________|          |______
: .....|
: .200_|        __________
: .....| D2     |         |
: ..10_|________|         |_____
: .....|
: .....|______________________________
: .........|    |    |    |     |     |
: ........Jan..Feb..Mar..Apr...May...June...

: ........------------------->MONTHS

: The labels in the x axis are the  months.
: The values in the y axis are the total quantity of parts.
: Here I have a problem in plotting a graph in the required way as x axis takes only the labels and not the values.I just wanted to
: divide the month(x axis) into no of days(units).Which I was not able to do.Is There any method or property or object which
: can print in the desired way.Please help out.Please ignore the dots in the chart.

: Raghavendra Tantri
   











0
Comment
Question by:sriven3
1 Comment
 
LVL 1

Accepted Solution

by:
tommy_boy earned 50 total points
ID: 1488799
If you wish to have days, then you need to have days stored in the Array which will be used to plot the graph.
ie.

Dim arrayName(days, no_of_columns)

With MSChart1
        .Plot.Axis(VtChAxisIdY).ValueScale.Auto = False
        .Plot.Axis(VtChAxisIdY).ValueScale.Minimum = 0
        .Plot.Axis(VtChAxisIdY).ValueScale.Maximum = maxVal
        .ChartData = arrayName()
End With

MaxVal is the number of days, not the months

Ok, now with your your graph
In the Axis Tab of the Chart Properties, make sure that Show Scale is true and that Auto Scaling is off.

Set Divisions Per Label to 10
Set Divisions Per Tick to 10

This will increment the graph by 10 (you'll find that if you use every day the graph wil be cluttered), but you can leave it as AutoScale if you want to plot everyday.





0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…

707 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

19 Experts available now in Live!

Get 1:1 Help Now