Jump to content
Software FX Community

Realtime Chart RecalcScale() issue


User (Legacy)
 Share

Recommended Posts

Hello,

I am running a realtime chart adding around 30 points every second. When I

add the points, I check if the values are larger than the current chart

max,min. If so then I call RecalcScale() on the chart after adding the new

data.

This works, but sometimes the chart looks as if the data area was redrawn,

but the axes were not (see attached image). As the chart is redrawn more

times, the axes get worse and worse.

Is there anything special to do with a realtime chart for RecalcScale()?

For the record, I'm using the Active-X Control (Client/Server) version

1.5.01.

Thanks,

Christopher Crotty

Link to comment
Share on other sites

I do the Recalc Scale after the CloseData:

Below is a snippet of my operations

// nNumData is an integer number of data points to add

m_pMTMChartFX->OpenDataEx( (enum CfxCod)(COD_VALUES |

COD_ADDPOINTS),1,nNumData);

for (int i=0;i<nNumData; i++)

{

// dValue is the current value

m_pMTMChartFX->PutValueEx(0,i,dValue);

}

//m_bActiveScroll is user selectable

if (m_bActiveScroll)

m_pMTMChartFX->CloseData( (enum CfxCod) (COD_VALUES |

COD_REALTIMESCROLL));

else

m_pMTMChartFX->CloseData( (enum CfxCod) (COD_VALUES | COD_REALTIME));

if (bScaleChart)

m_pMTMChartFX->RecalcScale();

Chris

"SoftwareFX Support" <support@softwarefx.com> wrote in message

news:Ctsi2sVcDHA.3592@WEBSERVER1...

> Do you do the RecalcScale AFTER CloseData.

>

> Make sure you don't call RecalcScale between OpenData and ColoseData.

>

> --

> FP

> Software FX, Inc.

>

>

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...