Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 847
  • Last Modified:

MSChart Control

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
sriven3
Asked:
sriven3
1 Solution
 
tommy_boyCommented:
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now