Jump to content
Software FX Community

Real-Time chart with Ini-Values


User (Legacy)

Recommended Posts

Hello,

I have a real-time chart (AREA) that I would like to setup INI-VALUES for.

If I try using the ini-value with an area chart things display fine, and if

I use a realtime area chart without ini-values things again display fine,

but If I use a realtime chart and set ini-values then I get an no data to

display.

How would I go about setting the ini-values?

Here is what I have tried

m_pChartFX->OpenData((enum COD)(COD_Values | COD_InsertPoints |

COD_RealTime), 2, 1);

m_pChartFX->OpenData((enum COD)(COD_IniValues | COD_InsertPoints |

COD_RealTime), 2, 1);

// Set Values

valuePtr = m_pChartFX->GetValue();

valuePtr->PutItem(0,0,value1);

valuePtr->PutItem(1,0,value2);

// Set IniValues

valuePtr = m_pChartFX->GetIniValue();

valuePtr->PutItem(0,0,iniValue1);

valuePtr->PutItem(1,0,iniValue2);

m_pChartFX->CloseData((enum COD)(COD_IniValues | COD_RealTimeScroll));

m_pChartFX->CloseData((enum COD)(COD_Values | COD_RealTimeScroll));

I have also tried to Open the ini-Values without the COD_RealTime option.

Thanks,

Chris

Link to comment
Share on other sites

Hello,

I have a real-time chart (AREA) that I would like to setup INI-VALUES for.

If I try using the ini-value with an area chart things display fine, and if

I use a realtime area chart without ini-values things again display fine,

but If I use a realtime chart and set ini-values then I get an no data to

display.

How would I go about setting the ini-values?

Here is what I have tried

m_pChartFX->OpenData((enum COD)(COD_Values | COD_InsertPoints |

COD_RealTime), 2, 1);

m_pChartFX->OpenData((enum COD)(COD_IniValues | COD_InsertPoints |

COD_RealTime), 2, 1);

// Set Values

valuePtr = m_pChartFX->GetValue();

valuePtr->PutItem(0,0,value1);

valuePtr->PutItem(1,0,value2);

// Set IniValues

valuePtr = m_pChartFX->GetIniValue();

valuePtr->PutItem(0,0,iniValue1);

valuePtr->PutItem(1,0,iniValue2);

m_pChartFX->CloseData((enum COD)(COD_IniValues | COD_RealTimeScroll));

m_pChartFX->CloseData((enum COD)(COD_Values | COD_RealTimeScroll));

I have also tried to Open the ini-Values without the COD_RealTime option.

Thanks,

Chris

Link to comment
Share on other sites

COD_InsertPoints  and COD_AddPoints is only supported for COD_Values.

Simply remove the lines:

m_pChartFX->OpenData((enum COD)(COD_IniValues | COD_InsertPoints |

COD_RealTime), 2, 1);

m_pChartFX->CloseData((enum COD)(COD_IniValues | COD_RealTimeScroll));

As long as you are initializing the IniValues before you start to add

points, and as long as you set the Value and the InitValue at the same time

(index by index) you will get what you need.

--

Francisco Padron

www.chartfx.com

post-2107-13922382385421_thumb.gif

post-2107-13922386079465_thumb.gif

Link to comment
Share on other sites

COD_InsertPoints  and COD_AddPoints is only supported for COD_Values.

Simply remove the lines:

m_pChartFX->OpenData((enum COD)(COD_IniValues | COD_InsertPoints |

COD_RealTime), 2, 1);

m_pChartFX->CloseData((enum COD)(COD_IniValues | COD_RealTimeScroll));

As long as you are initializing the IniValues before you start to add

points, and as long as you set the Value and the InitValue at the same time

(index by index) you will get what you need.

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...