Code: Select all
With Me.tchGrafiek
.RemoveAllSeries
.AddSeries scSurface
With .Series(.SeriesCount - 1).asSurface
.NumXValues = 100
.NumZValues = 23
.SmoothPalette = True
dblMax = -9000000000000#
dblMin = 9000000000000#
For lngT = 1 To 100
For lngV = 1 To 23
.AddXYZ lngJaar(lngT), dblLVOMatrix(lngT, lngV), ngLVOjaar(lngV), "", clTeeColor
If dblLVOMatrix(lngT, lngV) < dblMin Then dblMin = dblLVOMatrix(lngT, lngV)
If dblLVOMatrix(lngT, lngV) > dblMax Then dblMax = dblLVOMatrix(lngT, lngV)
Next lngV
Next lngT
.Pen.Visible = False
.UsePalette = True
.UseColorRange = False
' number of pallettesteps
lngAantal = 25
.PaletteSteps = lngAantal
' clear palette
.ClearPalette
' build palette
For lngJ = 1 To lngAantal
dblValue = dblAXmin + lngJ * dblStep
strRegel = IniGetString("COLORMAP", Format(intJ, "00"), "")
intR = Val(strtok(1, strRegel, ";")) * 255#
intG = Val(strtok(1, "", ";")) * 255#
intB = Val(strtok(1, "", ";")) * 255#
.AddPalette dblValue, RGB(intR, intG, intB)
Next lngJ
End With
.Repaint