Solved

How to plot vertical Excel 3D Chart ?

Posted on 2001-09-17
6
431 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
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 teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

863 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now