Solved

How to plot vertical Excel 3D Chart ?

Posted on 2001-09-17
6
436 Views
Last Modified: 2008-03-06
Hi
  I wish to plot a 3D Bar Chart onto a Web page and I did this :

    Const xl3DBarClustered=60
    Const xlWorkSheet = -4167
       
    ' -- Create an instance of Excel Application
    Set xlapp = Server.CreateObject("Excel.Application")
    ' -- Create a new workbook
    Set wb = xlapp.Workbooks.Add(xlWorksheet)
    ' -- Grab the first worksheet of the new workbook
    Set ws = wb.Worksheets(1)
   
    ' -- Insert the data the user requested
    ' -- First, the title
    ws.Range("A1").Value = "Some Histogram Plot"
   
    ' -- Then the data in two vertical columns
    For i = 1 To 12
       iDay = i
       ws.Range("A" & i + 1).Value = i+1
       ws.Range("B" & i + 1).Value = iDay & "-08-2001"
    Next
   
    ' -- Set our source range
    Set SourceRange = ws.Range("A2:B13")
    ' -- Create a new Chart Object
    Set crt = ws.ChartObjects.Add(20, 20, 600, 400)
   
    crt.Chart.ChartWizard SourceRange, 4, , 2, 1, 0, 2, "Histogram Plot"    

    ' -- Configure the Chart
    crt.Chart.ChartType = xl3DBarClustered
    crt.Chart.SeriesCollection(1).Name = "=Sheet1!R1C1"
    crt.Chart.HasTitle = True
    crt.Chart.BarShape = 3
    crt.Chart.Axes(1, 1).HasTitle = True
    crt.Chart.Axes(1, 1).AxisTitle.Characters.Text = "No of Postings"
    crt.Chart.Axes(2, 1).HasTitle = True
    crt.Chart.Axes(2, 1).AxisTitle.Characters.Text = "Time Period"
   
... continue


    By doing so, the chart is horizontal. Also I can't seem to rotate the Chart by calling crt.Chart.rotate = 90. Does anyone have a clue on this?

Thanks
0
Comment
Question by:tigresz
[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
  • 3
  • 2
6 Comments
 
LVL 7

Accepted Solution

by:
weesiong earned 300 total points
ID: 6490061
tigresz,

Try change :

crt.Chart.ChartType = xl3DBarClustered

To:

crt.Chart.ChartType = VtChChartType3dBar

Regards,
Wee Siong
0
 
LVL 7

Expert Comment

by:weesiong
ID: 6490064
tigresz,

xl3DBarClustered for Excel 97 using, if not wrong :)


Regards,
Wee Siong
0
 
LVL 7

Expert Comment

by:weesiong
ID: 6490071
tigresz,

See this page:
http://www.vbcodemaster.com/mschart.asp

Regards,
Wee Siong
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:ourselves
ID: 8305546
Hi guys,

I know Excel has very good chart presentation. Can I ask a few questions?

1. With the embeded Excel chart, will every user be able to view Excel chart even if he/she hasn't installed Excel on PC?

2. Is Excel chart browser compatible on Netscape as well?

3. What's the advantage of using Excel chart, compared with some chart components, such as Dundas, JPowered, etc?

I will pass points if necessary.

Thanks in advance!!!

Ourselves
0
 

Expert Comment

by:it31
ID: 8306036
ourselves,

This is no possible, in netscape is no support ActiveX this is the main problem.

If you want do the chart, i suggest using the flash or some graph components.

Best Regards,
Wee Siong
0
 

Expert Comment

by:ourselves
ID: 8312536
Thanks Wee Siong.
Have a good weekend!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

749 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