Resize the plotarea of OWC.Chart

J

J Kruger

I want to know how to resize the plotarea (inside part of a graph
where all the bars/lines are) in asp or vbscript.
I tried the same code that excel use, which is:
objChart.PlotArea.Width = 50 , but it does not work in asp/vbscript.


my code begins:
set objCSpace = server.CreateObject("OWC.Chart")
set objChart = objCSpace.Charts.Add()
objChart.Type = 5
With objCSpace.Charts(0).Axes(myAx)
.HasTickLabels = true
.Scaling.Maximum = 5
.Scaling.Minimum = 0
.MajorUnit = 1
End With

this will work:
objChart.PlotArea.Interior.Color = "red"

but not this:
objChart.PlotArea.Width = 50
or:
objChart.PlotArea.Left = 50


I export the files with:
sFullFileName = Server.MapPath(".") & "\Graph1.gif"
objCSpace.ExportPicture sFullFileName, "gif", 560, 50

I used office XP and 2003 to test, both asp and client-side vbscript.
Help appreciated.
 
T

Thao Moua [ms]

You must turn on custom layout if you wish to resize/reposition chart
elements. Do a search for 'custom layout' in the OWC help file for more info.

----------------------------------------------------------------------
Thao Moua
OWC Chartspace Support

This posting is provided "AS IS" with no warranties, and
confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top