DBChart Colors
Posted: Wed Jul 28, 2004 4:15 pm
Using a DBChart, I use the following to set the series colors in the BeforeDrawSeries event. I would like to do the same for a QRDBChart that I am using in the same program. I cannot seem to get it to work however. The events are not the same and no matter what I do, the series are drawn in the default color.
int iIdx = _series->XValues->Count;
// Before the chart is drawn, scan through each data point in each Series
//data set and set the colors of each based on its amplitude.
//THIS WORKS FOR TDBCHART, BUT NOT TQRDBCHART!
for(i=0;i<iIdx;i++){
int iVal = _series->YValue;
if(iVal > 50)
_series->ValueColor = clRed;
}
thanks,
kev
int iIdx = _series->XValues->Count;
// Before the chart is drawn, scan through each data point in each Series
//data set and set the colors of each based on its amplitude.
//THIS WORKS FOR TDBCHART, BUT NOT TQRDBCHART!
for(i=0;i<iIdx;i++){
int iVal = _series->YValue;
if(iVal > 50)
_series->ValueColor = clRed;
}
thanks,
kev