Jump to content
Software FX Community

Having a Problem Setting Individual Marker Colors


User (Legacy)
 Share

Recommended Posts

Hi,

I have been using Chart FX 98 for several years now and really like it. I

recently tried to use a method described on page 63 of your Chart FX

Programming Guide to set the individual marker colors. I think I did

everything right, but no matter what I did, all of the markers changed

color (like I was changing a property of the entire Series.). My code

snippet is shown below:

CFXTrend.MultipleColors=True

CFXTrend.OpenData Ex COD_Colors,2,0

For ii=0 to nPoints -1

'Use the procedure below to change the individual marker color when the

m_Product(ii +1) string is equal to the value the

'user chose from a combo box.

If m_Product(ii +1)=CStr(cmbProdDD.Text) Then

CFXTrend.Color(ii)=RGB(255,0,0)

Else

CFXTrend.Color(ii)=RGB(0,255,255)

End If

Next ii

CFXTrend.CloseData COD_COLORS

End If

When I step through the code in the debugging mode, it does seem to work

properly, but when I view the line x-y trend plot (line type chart), all of

the markers change to the RGB(0,255,255) color. [this happens even though

for some values of ii, the program flow IS directed to the

RGB(0,255,255) statement].

If you have any suggestions of how to do this task, please help.

Thank You,

Dick Hoffmeister

post-2107-13922394674454_thumb.jpg

Link to comment
Share on other sites

CFXTrend.OpenData Ex COD_Colors,2,0

Is allocating just two (2) colors that will repeat over and over. If you

want to assign a color to each point you need to do:

CFXTrend.OpenData Ex COD_Colors,NumberOfPoints*NumberOfSeries,0

The rest of the code looks ok though I did not test it.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...