Jump to content
Software FX Community

Unpredictable behavior with MultipleColors


User (Legacy)

Recommended Posts

Posted

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?

Posted

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

--

FP

Software FX, Inc.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...