tigresz
asked on
How to plot vertical Excel 3D Chart ?
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 .Applicati on")
' -- Create a new workbook
Set wb = xlapp.Workbooks.Add(xlWork sheet)
' -- 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.Te xt = "No of Postings"
crt.Chart.Axes(2, 1).HasTitle = True
crt.Chart.Axes(2, 1).AxisTitle.Characters.Te xt = "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
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
' -- Create a new workbook
Set wb = xlapp.Workbooks.Add(xlWork
' -- 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
crt.Chart.HasTitle = True
crt.Chart.BarShape = 3
crt.Chart.Axes(1, 1).HasTitle = True
crt.Chart.Axes(1, 1).AxisTitle.Characters.Te
crt.Chart.Axes(2, 1).HasTitle = True
crt.Chart.Axes(2, 1).AxisTitle.Characters.Te
... 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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
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
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
Thanks Wee Siong.
Have a good weekend!
Have a good weekend!
xl3DBarClustered for Excel 97 using, if not wrong :)
Regards,
Wee Siong