Solved

How to plot vertical Excel 3D Chart ?

Posted on 2001-09-17
6
424 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
Comment Utility
tigresz,

Try change :

crt.Chart.ChartType = xl3DBarClustered

To:

crt.Chart.ChartType = VtChChartType3dBar

Regards,
Wee Siong
0
 
LVL 7

Expert Comment

by:weesiong
Comment Utility
tigresz,

xl3DBarClustered for Excel 97 using, if not wrong :)


Regards,
Wee Siong
0
 
LVL 7

Expert Comment

by:weesiong
Comment Utility
tigresz,

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

Regards,
Wee Siong
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Expert Comment

by:ourselves
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks Wee Siong.
Have a good weekend!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

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 information …
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

763 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

15 Experts available now in Live!

Get 1:1 Help Now