User (Legacy) Posted February 28, 2003 Report Share Posted February 28, 2003 Hi, I have a problem/question concerning labels. I was wondering why they seem to take so long to be added? Example code follows: m_pChartFX->OpenDataEx((CfxCod) (COD_VALUES|COD_REMOVE), 1, 25000); for(i=0;i<=25000;i++) { double val = rand(); m_pChartFX->GetSeries()->GetItem( 0 )->PutYvalue( i, val ); } m_pChartFX->CloseData(COD_VALUES); int i1 = GetTickCount(); ICfxAxisPtr axis = chart_fx->GetAxis()->GetItem( AXIS_X ); for(i=0;i<=25000;i++) { axis->PutLabel( i, "aa" ); } int i2 = GetTickCount(); int t = i2 - i1; m_pChartFX->RecalcScale(); When the second loop finally terminated it too almost 7 minutes...just to add the labels!! Is it supposed to take that long, or is this a possible bug of some sort? Is there any way that I might be able to speed this process up at all? I believe that you max is 32,767 labels per axis or legend( please correct me if I am incorrect )? Thank you. -Mac Dyer Link to comment Share on other sites More sharing options...
Software FX Posted February 28, 2003 Report Share Posted February 28, 2003 Two things that will dramatically improve your speed: 1) Call ClearLabels BEFORE your OpenDataEx to start with an empty label list, this is much faster than replacing labels that are already there. 2) To further improve performance you can use the StyleEx's CSE_FASTLABELS this flag however will take away some of the functionality. Check the help file for details (look for StyleEx). -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 28, 2003 Author Report Share Posted February 28, 2003 what object is CSE_FASTLABELS a flag for? Is it in Chartfx client/server 5? "SoftwareFX Support" <support@softwarefx.com> wrote in message news:pfZJi$23CHA.1844@webserver1.softwarefx.com... > Two things that will dramatically improve your speed: > > 1) Call ClearLabels BEFORE your OpenDataEx to start with an empty label > list, this is much faster than replacing labels that are already there. > > 2) To further improve performance you can use the StyleEx's CSE_FASTLABELS > this flag however will take away some of the functionality. Check the help > file for details (look for StyleEx). > > -- > FP > Software FX, Inc. > > Link to comment Share on other sites More sharing options...
Software FX Posted February 28, 2003 Report Share Posted February 28, 2003 The StyleEx property. This is a property of the Chart object. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 28, 2003 Author Report Share Posted February 28, 2003 sorry meant to ask if it was supposed to be CSE_FASTLEGENDS? "SoftwareFX Support" <support@softwarefx.com> wrote in message news:pfZJi$23CHA.1844@webserver1.softwarefx.com... > Two things that will dramatically improve your speed: > > 1) Call ClearLabels BEFORE your OpenDataEx to start with an empty label > list, this is much faster than replacing labels that are already there. > > 2) To further improve performance you can use the StyleEx's CSE_FASTLABELS > this flag however will take away some of the functionality. Check the help > file for details (look for StyleEx). > > -- > FP > Software FX, Inc. > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 28, 2003 Author Report Share Posted February 28, 2003 Also the clearlabels call did not help speed it up very noticeably....maybe a couple of seconds...if that.... "SoftwareFX Support" <support@softwarefx.com> wrote in message news:pfZJi$23CHA.1844@webserver1.softwarefx.com... > Two things that will dramatically improve your speed: > > 1) Call ClearLabels BEFORE your OpenDataEx to start with an empty label > list, this is much faster than replacing labels that are already there. > > 2) To further improve performance you can use the StyleEx's CSE_FASTLABELS > this flag however will take away some of the functionality. Check the help > file for details (look for StyleEx). > > -- > FP > Software FX, Inc. > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.