Jump to content
Software FX Community

Different colors for ponts in a series ?


User (Legacy)
 Share

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...