Solved

How to plot vertical Excel 3D Chart ?

Posted on 2001-09-17
6
434 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
  • 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 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