Problem with changing colors

H

Hans JEnsen

Hi Group

I cant change any colors in my graph ?

Please help!

<%@ language="vbscript" %>
<%

Response.Buffer = TRUE
Response.ContentType= "image/gif"

Dim oChart, oConst, oSeries1, oSeries2, oSeries3, RS

Set oChart = CreateObject("OWC11.ChartSpace")

Set oConst = oChart.Constants

oChart.Charts.Add

With oChart
.Charts(0).HasTitle = True
.Charts(0).HasLegend = True
.Charts(0).Legend.Position = oConst.chLegendPositionBottom
.Charts(0).Title.Caption = "Kompetenceområder – Alle - Medarbejdere"
.Charts(0).Type = oConst.chChartTypeRadarLine
End With

Dim fnt

set fnt = oChart.Charts(0).Title.Font
fnt.Name = "arial"
fnt.Size = 14
fnt.Bold = True


'****************************

Set oSeries1 = oChart.Charts(0).SeriesCollection.Add
Set oSeries2 = oChart.Charts(0).SeriesCollection.Add
Set oSeries3 = oChart.Charts(0).SeriesCollection.Add

Dim tmpTopicsArr()
Dim tmpValueArr1()
Dim tmpValueArr2()
Dim tmpValueArr3()

Dim i, rsCount
Dim Session_MID
Dim Session_LID
Dim objQMark

Session_MID = Request.QueryString("SESSION_MID")
Session_LID = Request.QueryString("SESSION_LID")

i=0

Set objQMark = Server.CreateObject("WebApp.QMark")

Session_MID = 32975373
Session_LID = 11428190

Set RS = objQMark.GetAssesmentsAnswers(CDbl(Session_MID),
CDbl(Session_LID), 3)

rsCount = RS.RecordCount

Redim tmpTopicsArr(rsCount)
Redim tmpValueArr1(rsCount)
Redim tmpValueArr2(rsCount)
Redim tmpValueArr3(rsCount)

While Not RS.BOF And Not RS.EOF
i = i + 1
tmpTopicsArr(i) = Trim(RS("TOPIC"))
tmpValueArr1(i) = RS("SVAR_NU")
tmpValueArr2(i) = RS("SVAR_ANVENDELSE")
tmpValueArr3(i) = RS("SVAR_FREMTID")
RS.MoveNext
Wend

With oSeries1

.Caption = "Kompetenceområder - Nu"
.SetData oConst.chDimCategories, oConst.chDataLiteral, tmpTopicsArr
.SetData oConst.chDimValues, oConst.chDataLiteral, tmpValueArr1
End With

With oSeries2
.Interior.Color = "red" ' <-------- NOT WORKING!
.Line.Color = "red" ' <-------- NOT WORKING!
.Caption = "Kompetenceområder - Anvendelse"
.SetData oConst.chDimCategories, oConst.chDataLiteral, tmpTopicsArr
.SetData oConst.chDimValues, oConst.chDataLiteral, tmpValueArr2
End With

With oSeries3
.Caption = "Kompetenceområder - Fremtid"
.SetData oConst.chDimCategories, oConst.chDataLiteral, tmpTopicsArr
.SetData oConst.chDimValues, oConst.chDataLiteral, tmpValueArr3
End With

Set objQMark = Nothing

Response.BinaryWrite oChart.GetPicture ("GIF", 600, 412)

Response.End


%>
 
C

Carlos

Hi, try tu put the code that NOT WORKING at the end of with
instruction. If don't work. try
ChartName.SeriesCollection(0).Interior.Color = "Red"
 

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