User (Legacy) Posted July 1, 2003 Report Share Posted July 1, 2003 Hello, I use ChartFx 98 with Visual C++ 6. I'd like to put on my graph some legend : chart's Legend and some results. But when I use SerLegBoxObj, nothing displays and I don't know where to initialize the text. So if someone could help me, thanks Under example of my code CWnd m_ChartFX; IChartFXPtr m_pChartFX; void CModChartFx::Tracebis(float *tabx[8], int n, int n1) { int i,j,k; j=0; ; allocation of points in ChartFX object m_pChartFX->OpenDataEx(COD_VALUES,n1,n); m_pChartFX->OpenDataEx(COD_XVALUES,n1,n); (m_pChartFX->SerLegBoxObj)->Left = 25; for(k=0;k<4;k++) for(i=0;i<n;i++) { m_pChartFX->ValueEx[k][i]=tabx[k*2+1][i]; m_pChartFX->XValueEx[k][i]= tabx[k*2][i]; } ; put the Legend (m_pChartFX->SerLegBoxObj)->Docked = TGFP_FIXED; (m_pChartFX->SerLegBoxObj)->BkColor=RGB(255,0,0); (m_pChartFX->SerLegBoxObj)->Width = 70; (m_pChartFX->SerLegBoxObj)->Height=50; m_pChartFX->CloseData(COD_VALUES); m_pChartFX->CloseData(COD_XVALUES); } F. Ceranski Link to comment Share on other sites More sharing options...
Software FX Posted July 2, 2003 Report Share Posted July 2, 2003 You need to show it: m_pChartFX->SerLegBox = TRUE; -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted July 2, 2003 Author Report Share Posted July 2, 2003 > You need to show it: > m_pChartFX->SerLegBox = TRUE; Thanks a lot. And to insert text (not only label of curves) in SerLegBox or DataLegBox? and sorry for my poor english. F. Ceranski Link to comment Share on other sites More sharing options...
Software FX Posted July 4, 2003 Report Share Posted July 4, 2003 Use the SerLeg property to assign string labels to each series. These labels will show inside the legend box and data editor. -- FP Software FX, Inc. Attachments.zip Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.