P
Pat McNulty
I have looked on this site & many others at how to put
different scales for each Y-axis when there are 2.
I have even been able to get it to work using VB on my
computer with Microsoft provided sample code. (I am using
owc10.chartspace for the server side work & <object> with
a classid for the VB version, but I need it to work
serverside)
I need to make it work server side using ASP, and no
matter what I do, both Y axes pick either one or the other
scale.
Code:
'series 1
oSer2.SetData c.chDimSeriesNames, c.chDataLiteral, "Sales
Qty"
oSer2.SetData c.chDimCategories, c.chDataLiteral, Qarray
oSer2.SetData c.chDimValues, c.chDataLiteral , qty
'series 2
oSerASP.SetData c.chDimSeriesNames, c.chDataLiteral, "ASP"
oSerASP.SetData c.chDimCategories, c.chDataLiteral, Qarray
oSerASP.SetData c.chDimValues, c.chDataLiteral , ASP
Dim oAxis2
Dim oAxis1
'set left axis & put a scale max & min (not req'd)
Set oAxis1 = objChart.Axes(c.chAxisPositionLeft)
oAxis1.Scaling.Maximum = 100000000
oAxis1.Scaling.Minimum = 1000000
'ungroup series 2 so it can have a separate scale on right
Y-axis
oSerASP.Ungroup True
'add right Y axis with series 2 scale
Set oAxis2 = objChart.Axes.Add(oSerASP.Scalings
(c.chDimValues))
oAxis2.Position = c.chAxisPositionRight
'adjust scale max & min for axis 2
oAxis2.Scaling.Maximum = 80
oAxis2.Scaling.Minimum = 0
different scales for each Y-axis when there are 2.
I have even been able to get it to work using VB on my
computer with Microsoft provided sample code. (I am using
owc10.chartspace for the server side work & <object> with
a classid for the VB version, but I need it to work
serverside)
I need to make it work server side using ASP, and no
matter what I do, both Y axes pick either one or the other
scale.
Code:
'series 1
oSer2.SetData c.chDimSeriesNames, c.chDataLiteral, "Sales
Qty"
oSer2.SetData c.chDimCategories, c.chDataLiteral, Qarray
oSer2.SetData c.chDimValues, c.chDataLiteral , qty
'series 2
oSerASP.SetData c.chDimSeriesNames, c.chDataLiteral, "ASP"
oSerASP.SetData c.chDimCategories, c.chDataLiteral, Qarray
oSerASP.SetData c.chDimValues, c.chDataLiteral , ASP
Dim oAxis2
Dim oAxis1
'set left axis & put a scale max & min (not req'd)
Set oAxis1 = objChart.Axes(c.chAxisPositionLeft)
oAxis1.Scaling.Maximum = 100000000
oAxis1.Scaling.Minimum = 1000000
'ungroup series 2 so it can have a separate scale on right
Y-axis
oSerASP.Ungroup True
'add right Y axis with series 2 scale
Set oAxis2 = objChart.Axes.Add(oSerASP.Scalings
(c.chDimValues))
oAxis2.Position = c.chAxisPositionRight
'adjust scale max & min for axis 2
oAxis2.Scaling.Maximum = 80
oAxis2.Scaling.Minimum = 0