Jump to content
Software FX Community

Different colors for ponts in a series ?


User (Legacy)

Recommended Posts

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);

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...