Jump to content
Software FX Community

two questions


User (Legacy)
 Share

Recommended Posts

Hi, i'am using chartfx client server and i have two questions:

1.- How i put an string point label in some points, not all?

2.- How i change colors of the same points depending from text?

My chart is a line chart, and all points are black with no point label, but

i need to put an string on point label and change color of the same point,

value depending.

Thank for your time and your answer.

Regards,

Link to comment
Share on other sites

> 1.- How i put an string point label in some points, not all?

You can capture the GetPointLabel event to customize the Point label on each

point.

> 2.- How i change colors of the same points depending from text?

You can change the color of each point independently by setting the

MultipleColors property to True and assigning a color to each point.

Something like this (from the help file)

'First Turn on the MultipleColors property

Chart1.MultipleColors = TRUE

'Then open the comm. channel with COD_COLORS.

nTotalPoints=Chart1.Nalues

Chart1.OpenDataEx COD_COLORS,nTotalPoints,0

'Obtain the total number of points

'Finally assign colors depending on their value using the Color Property

for j=0 to (nTotalPoints-1)

if (Chart1.Value(j) <0) Then

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

else

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

End If

Next j

Chart1.CloseData COD_COLORS

--

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