Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to plot vertical Excel 3D Chart ?

Posted on 2001-09-17
6
Medium Priority
?
466 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 900 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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…
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 video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Screencast - Getting to Know the Pipeline
Suggested Courses

783 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