User (Legacy) Posted December 6, 2000 Report Posted December 6, 2000 I have a data series that under some conditions must change colors. Below is an example image of where the "Checkbook (Base)" series changes from red (November) to green (December). I use the MulitpleColors property to enable marker by marker color choices. But as you can see in the image, the rows in the data editor do not have any markers and there are erroneous column markers also. However, the chart looks fine and so does its legend. Can you suggest a fix for the data editor or another approach? I have include some code below the image. Thank you, Jim Miller PNNL 'Set the size and color of the trace markers (by series) cfxBBL.OpenDataEx COD_COLORS, 7, 0 'Base year (yellow) cfxBBL.Series(0).Color = RGB(255,255,0) cfxBBL.Series(0).MarkerSize = 7 'Previous year (white) cfxBBL.Series(1).Color = RGB(255,255,255) cfxBBL.Series(1).MarkerSize = 3 'Ledger cfxBBL.Series(5).Color = RGB(255,0,0) cfxBBL.Series(5).MarkerSize = 6 'Budget cfxBBL.Series(6).Color = RGB(0,255,0) cfxBBL.Series(6).MarkerSize = 3 cfxBBL.CloseData COD_COLORS 'Now, one at a time, set the marker colors. cfxBBL.MultipleColors = TRUE cfxBBL.OpenDataEx COD_COLORS, 7*12, 0 'When MultipleColors is set to TRUE, the index is a combination of the series 'and the point indexes. i.e. if you want to set the color for the 4Th series and 'the 7Th point, you use nIndex = (3 + (6*nSeries)) 'Range over each series For k = 0 to 6 If (k = 0) Then 'Base year (yellow) TheColor = RGB(255,255,0) ElseIf (k = 1) Then 'Previous year (white) TheColor = RGB(255,255,255) ElseIf (k = 5) Then 'Ledger (red) TheColor = RGB(255,0,0) ElseIf (k = 6) Then 'Budget (green) TheColor = RGB(0,255,0) Else '(white) TheColor = RGB(255,255,255) End If 'Range over each point, but do some special colors for the ledger trace. If (k=5) Then For j = 0 to 11 If (j > jLastValue) Then 'Green, like budget trace. cfxBBL.Color(k + (j*7)) = RGB(0,255,0) Else cfxBBL.Color(k + (j*7)) = TheColor End If Next Else For j = 0 to 11 cfxBBL.Color(k + (j*7)) = TheColor Next End If Next cfxBBL.CloseData COD_COLORS
Recommended Posts
Archived
This topic is now archived and is closed to further replies.