+ Reply to Thread
Results 1 to 2 of 2

Excel VBA - Problems with 3D Column Clustered chart

  1. #1
    Bryan via OfficeKB.com
    Guest

    Excel VBA - Problems with 3D Column Clustered chart

    Hello all,
    I am having some trouble creating the nice 3D column chart in my macro.
    When I code it, the chart always comes out much smaller (the 'walls' part,
    not the chart area is smaller). Also, the depth of the 'walls' area is not
    deep. Also, the 'walls' area is always tilted too much. I know how to
    change the tilt, that's not the problem. But I just can't make the actual
    columns part larger, even by increasing the size of the chart area.

    The funny thing is that I am able to get a nice looking chart by using the
    chart wizard manually. I have also tried recording a macro of the chart
    wizard. Still, no luck. Does anyone have any suggestions? Any help would
    be appreciated. Here is the code (not the recorded macro, but my own) that
    I am using:


    With ActiveSheet.ChartObjects.Add _
    (Left:=450, Width:=375, Top:=300, Height:=225)
    .Chart.SetSourceData Source:=ProgramSheet.Range("N3:O14")
    .Chart.ChartType = xl3DColumnClustered
    .Chart.HasTitle = True
    .Chart.ChartTitle.Characters.Text = "title"
    .Chart.Axes(xlCategory, xlPrimary).HasTitle = True
    .Chart.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "x
    lab"
    .Chart.Axes(xlValue, xlPrimary).HasTitle = True
    .Chart.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "y lab"
    .Chart.HasLegend = False
    End With

    --
    Message posted via http://www.officekb.com

  2. #2
    Peter T
    Guest

    Re: Excel VBA - Problems with 3D Column Clustered chart

    Try adding the following line:

    ..Chart.RightAngleAxes = True

    just after defining the chart type

    Regards,
    Peter T


    "Bryan via OfficeKB.com" <[email protected]> wrote in message
    news:[email protected]...
    > Hello all,
    > I am having some trouble creating the nice 3D column chart in my macro.
    > When I code it, the chart always comes out much smaller (the 'walls' part,
    > not the chart area is smaller). Also, the depth of the 'walls' area is

    not
    > deep. Also, the 'walls' area is always tilted too much. I know how to
    > change the tilt, that's not the problem. But I just can't make the actual
    > columns part larger, even by increasing the size of the chart area.
    >
    > The funny thing is that I am able to get a nice looking chart by using the
    > chart wizard manually. I have also tried recording a macro of the chart
    > wizard. Still, no luck. Does anyone have any suggestions? Any help

    would
    > be appreciated. Here is the code (not the recorded macro, but my own)

    that
    > I am using:
    >
    >
    > With ActiveSheet.ChartObjects.Add _
    > (Left:=450, Width:=375, Top:=300, Height:=225)
    > .Chart.SetSourceData Source:=ProgramSheet.Range("N3:O14")
    > .Chart.ChartType = xl3DColumnClustered
    > .Chart.HasTitle = True
    > .Chart.ChartTitle.Characters.Text = "title"
    > .Chart.Axes(xlCategory, xlPrimary).HasTitle = True
    > .Chart.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "x
    > lab"
    > .Chart.Axes(xlValue, xlPrimary).HasTitle = True
    > .Chart.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "y

    lab"
    > .Chart.HasLegend = False
    > End With
    >
    > --
    > Message posted via http://www.officekb.com




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1