Results 1 to 8 of 8

Thread: MSChart - how to adjust the y-axis manually?

  1. #1
    Lysandra
    Guest

    Question MSChart - how to adjust the y-axis manually?

    my problem is that I want to compare two different bar charts (on the same form). Therefore I need to have equal scale of the y-axis. The biggest bar should not be 100% of the hight of the chart. e.g. when I have 4 as my biggest y-value, but the theoretical maximum is 5, the bar should only extend to 80% and not to 100%.
    Is there any way to set the minimum and maximun value for the y-axis? I didn't find any example so far.

    thanks!

  2. #2
    New Member
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    8

    format y axis

    If we are talking about the same thing, try this:
    Right click over the y-axis, choose format axis. A window should open with tab choices. Choose scale. It has the min and max as well as the major and minor units.

    let me know if that helped.
    LeopardHunting

  3. #3
    New Member
    Join Date
    Aug 2001
    Posts
    13
    Yo, Lysandra. Are you familiar with MSChart? Cause i'm using mschart too and i'm new using this. Do you know if i can overlap (super impose) the graph? I want to compare my chart that's on the same form and on the same chart. For example, plot a chart first with the data sent to the computer and then send another pack of data to the computer and update the chart. Do you think MSChart can do that?

    Or anyone?
    Last edited by Kinmon; Aug 27th, 2001 at 05:59 PM.

  4. #4
    Lysandra
    Guest

    Thumbs up Re: format y axis

    Thanks leopardhunting!
    That helped. I always forget to check the object itself for more properties by right-clicking on it.

  5. #5
    Lysandra
    Guest
    Hey Kinmon,
    My data is based on a Access database. Using the "Set" command you can update your chart. I put it on a command-button. In my case it looks like this:

    Private Sub Command1_Click()
    Dim dbChart As Connection
    Set dbChart = dbcls.dbName
    Set rsChart= New Recordset

    rsChart.Open "select SummeV2 from Module", dbChart,_
    adOpenStatic, adLockOptimistic

    With MSChart1
    Set .DataSource = rsChart
    .ShowLegend = True
    End With
    End Sub


    dbcls is the class which I use to open my database-connection.

    I'm fairly new to MSChart too, but hope this helps.

  6. #6
    New Member
    Join Date
    Aug 2001
    Posts
    13
    Hi Lysandra, thanks for posting the code. But can you explain how the code works, if possible. Like, ....as connection, rschart (is that your chart name?), rschart.Open.....(what's this command? does it call a database, cause i don't use database. I use matrix to store my data collected).

  7. #7
    New Member
    Join Date
    Aug 2001
    Posts
    13
    please help. anyone?

  8. #8
    Junior Member
    Join Date
    Nov 2000
    Posts
    17
    Lysandra use a recordset that extract datas from a database.
    So if you don't use a databse you cannot use this code.

    instead, Try to set the Chartdata property = your matrix

    If the first series of a multi-dimensional array contains strings, those strings will become the labels of the chart
    Martin Nadeau, B.Sc.A.
    Centre de recherche en géomatique
    Université Laval

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width