User (Legacy) Posted September 2, 1999 Report Share Posted September 2, 1999 I'm using an XY chart and would like to have one series with 2 different colors. I followed the book example (p78) and it still doesnt work. Any ideas? my code: int i; //////////////////////////////////////////////////////////////////////////// //// // load each data points with X,Y values //////////////////////////////////////////////////////////////////////////// //// m_pChartFX->OpenDataEx(COD_XVALUES, 2, 50); for(i=0; i<50; i++) { m_pChartFX->ValueEx[0][i] = i*i; m_pChartFX->XValueEx[0][i] = i; m_pChartFX->ValueEx[1][i] = 2*i*i; m_pChartFX->XValueEx[1][i] = i; } m_pChartFX->CloseData(COD_XVALUES); //////////////////////////////////////////////////////////////////////////// //// // set colors for each data point //////////////////////////////////////////////////////////////////////////// //// m_pChartFX->MultipleColors = true; m_pChartFX->OpenDataEx(COD_COLORS, 2, 0); for(i=0; i<50; i++) { if (i<25) m_pChartFX->Color[i] = RGB(255,0,0); else m_pChartFX->Color[i] = RGB(0,0,255); } m_pChartFX->CloseData(COD_COLORS); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.