Jump to content
Software FX Community

trouble with multiple colours


User (Legacy)

Recommended Posts

hi 

I'm having trouble with multiple point colours within a series of an xy

chart. (vb6, chfx98 release.15)

The intended effect is that the whole of each series should be set to the

color in the position in the color array matching its series number, unless

a criteria is not met, in which case the individual point should be black.

What happens is that the whole series is rainbow coloured using the colors

in the array in sequence. pretty but useless! any help will be greatly

appreciated. I include a summary of my code below.

Shaun Fletcher

(assuming graphcols is an array (0-11) of rgb colors, color 0 being black)

my code is far too extensive to include, but the relevant lines for the

colour setting are:

cfxdata.OpenDataEx COD_COLORS, 11, 0

cfxdata.OpenDataEx COD_VALUES, seriesmax, COD_UNKNOWN

cfxdata.OpenDataEx COD_XVALUES, seriesmax, COD_UNKNOWN

npoints = (calculated for each series)

For i = 0 To seriesmax - 1

For j = 0 To npoints - 1

If (point criteria checked here) then

cfxdata.Series(i).Yvalue(j) = (point value)

cfxdata.Series(i).Xvalue(j) = (point datetime)

cfxdata.Color(i + (seriesmax * j) ) = graphcols(i + 1)

(other stuff here)

else

cfxdata.Series(i).Yvalue(j) = (point value)

cfxdata.Series(i).Xvalue(j) = (point datetime)

cfxdata.Color(i + (seriesmax * j)) = graphcols(0)

(other stuff here)

end if

Next j

Next i

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...