Jump to content
Software FX Community

Unpredictable behavior with MultipleColors

User (Legacy)

Recommended Posts

I'm trying to set the color of specific points (in a line chart) to a color

different from the rest of the series. It works fine with one series in the

chart, but is very unpredictable with more than one series. Does anyone

know why the problems occur with multiple series? Also, the .NValues

property. Not all of my series have the same number of points to plot. Is

.NValues set to the number of points of the largest series?

Link to comment
Share on other sites

It gets a little tricky when you have multiple series because the array of

colors is one-dimensional. The way the colors are used from the color array

is as follows:

Color Array (Series,Point)

Index Index

0 (0,0)

1 (1,0)

2 (2,0)




NumSeries-1 (NumSeries-1,0)

NumSeries (0,1)

NumSeries + 1 (1,1)

NumSeries + 2 (2,1)




In general the formula is:

ColorIndex = SeriesIndex + PointIndex*NumSeries

You need to make sure the array of colors is big enough for all the points

in the chart by doing:

ChartFX1.OpenDataEx COD_COLOR, ChartFX1.NSeries * ChartFX1.NValues, 0



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.

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.


  • Create New...