Pep,
Originally I was using the AddArray function to add the trace data array (values and times arrays): this worked as expected. Code used was:
Code: Select all
TChart1.Series(i + 1).AddArray UBound(avValue) + 1, avValue, adtTimestamp
In order to be able to correctly display NULL values, I modified the code to use the following mechanism to add each value pair:
Code: Select all
TChart1.Series(currentDatasetIndex+1).AddXY adtTimestamp(j),avValue(j),"",g_TraceColors(currentDatasetIndex)
When I use this code, the color of the line does not get changed when setting the TChart1.Series(optTraceNum.value).Color = lColor.
I modified (per your suggestion) the code to use the
Code: Select all
TChart1.Series(currentDatasetIndex+1).AddXY adtTimestamp(j),avValue(j), "", clteeColor
setting, but the line always appears as black and still does not get changed when processing the TChart1.Series(optTraceNum.value).Color = lColor line of code.
For our application, our users have identified a specific set of colors that are to be used (and the order) when traces are added. Hence the use of a color array g_TraceColors(currentDatasetIndex) when invoking the AddXY method. Is there something else I need to do on the initial setup of the Series to allow runtime changes of the trace color?
Thanks
Scott Small