User (Legacy) Posted December 11, 2002 Report Share Posted December 11, 2002 Hello! I am in a deadline and my customer want to have the markers on the same series with different colors depending on value at each point. I found some examples in VB on chartfx help and from the internet but I could not find any in C++. I try to play around with different setting but none is working. This is a partial code that I am working on using Chartfx 98 /////////////// m_pChartFX->MultipleColors = true; m_pChartFX->OpenDataEx((CfxCod)(COD_VALUES), 1, TotalDays); m_pChartFX->OpenDataEx((CfxCod)(COD_COLORS), TotalDays, 0); for(int i=0; i<TotalDays; i++) { m_pChartFX->ValueEx[SER_1][i] = Input[i]; if (Input[i] < 10) m_pChartFX->Series->Item[SER_1]->Color = RGB(0,0,200); // I try this but it does not work else m_pChartFX->Series->Item[SER_1]->Color = RGB(200,0,0); } m_pChartFX->CloseData(COD_VALUES); m_pChartFX->CloseData(COD_COLORS); /////////////// Could someone tell me what need to be set in the code above or show me some examples in C++ or show me the link to some examples. I would appreciate any help. Thank in advance. Young Huynh Link to comment Share on other sites More sharing options...
Software FX Posted December 11, 2002 Report Share Posted December 11, 2002 Instead of: m_pChartFX->Series->Item[SER_1]->Color = YourColor; You need to do: m_pChartFX->Color[i] = YourColor -- FP Software FX Support "John Huynh" <young.huynh@veridian.com> wrote in message news:Cp#Jq3UoCHA.3108@webserver1.softwarefx.com... > Hello! > > I am in a deadline and my customer want to have the markers on the same > series with different colors depending on value at each point. I found some > examples in VB on chartfx help and from the internet but I could not find > any in C++. I try to play around with different setting but none is > working. > > This is a partial code that I am working on using Chartfx 98 > > /////////////// > > m_pChartFX->MultipleColors = true; > > m_pChartFX->OpenDataEx((CfxCod)(COD_VALUES), 1, TotalDays); > m_pChartFX->OpenDataEx((CfxCod)(COD_COLORS), TotalDays, 0); > > for(int i=0; i<TotalDays; i++) > { > m_pChartFX->ValueEx[SER_1][i] = Input[i]; > > if (Input[i] < 10) > m_pChartFX->Series->Item[SER_1]->Color = RGB(0,0,200); // I try > this but it does not work > else > m_pChartFX->Series->Item[SER_1]->Color = RGB(200,0,0); > } > m_pChartFX->CloseData(COD_VALUES); > m_pChartFX->CloseData(COD_COLORS); > > /////////////// > > Could someone tell me what need to be set in the code above or show me some > examples in C++ or show me the link to some examples. I would appreciate > any help. > Thank in advance. > > Young Huynh > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.