Jump to content
Software FX Community

Re: multiple colors, 2 series (scatter)


User (Legacy)
 Share

Recommended Posts

If you're making a Scatter Graph I'd think you would be using:

ChartFX1.Gallery = SCATTER

'open data channel

.OpenDataEx COD_VALUES, nSeries, nPoints

.OpenDataEx COD_XVALUES, nSeries, nPoints

.OpenDataEx COD_COLORS, nSeries, 0

Where nSeries is the number of pairs of data (xy) to plot, nPoints = 1. COD_VALUES gets the Y component, COD_XVALUES gets the X.

using this type of syntax:

j = 0 to NSeries -1

ChartFX1.ValueEx(j, 0) = rs.Fields(1).Value

ChartFX1.XValueEx(j, 0) = rs.Fields(2).Value

Next j

Then to color the points:

If 'Some comparison

ChartFX1.Color(j) = RGB(255,0,0)

End If

Steve

eli elhadad <ceelmh@towersemi.com> wrote in message news:6apINAoQAHA.2944@sfxserver.softwarefx.com...

> hi,

> I have two seriess (scatter) and i want to set different color(5 colors) for

> different

> point in the same series.

>

> this is my code:

>

> 'il_results holds the number of point in the graph

>

> object.OpenDataEx(COD_VALUES,2, il_results) ]

> object.OpenDataEx (COD_COLORS,????????, 0)

>

> for ...

> ..

> 'get ld_data1

> 'get ld_data2

> ..

>

> object.Series(0).Yvalue(j,ld_data1)

> object.Series(1).Yvalue(j,ld_data2)

>

> IF x='F' THEN

> object.Color(???????,RGB(255, 0, 0))

> ELSEIF x= 'O' THEN

> object.Color(???????,RGB(0,0,255))

> ELSEIF xl="V" THEN

> object.Color(??????? ,RGB(0,255,0))

> ELSEIF xl="I" THEN

> object.Color(???????,RGB(255,255,50))

> ELSE

> object.Color(???????,RGB(0,0,0))

> END IF

> Next

>

> object.CloseData(3)

> object.CloseData(1)

>

> I don't know what to put in this line - OpenDataEx (COD_COLORS,????????, 0)

> the number of colors shold be 5??? or a combination of

> the number of points and seriass , i try all sort of combination with no

> success at all.

>

> I want to set different colors only to serias number 1 (i don't care about

> the other serias colors bat i paint it)

> object.Color(???????,..) - What shold i put in this line , i try whats

> written in the help files of chartfx , again with no success.

>

> please help me.

> eli.

>

>

>

>

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...