Issues with plotting functionality

TeeChart for ActiveX, COM and ASP
Post Reply
roger
Newbie
Newbie
Posts: 26
Joined: Thu May 10, 2007 12:00 am

Issues with plotting functionality

Post by roger » Tue Sep 28, 2010 11:38 am

Hello,

We are using TeeChart Pro Activex Control v7 and also tested the functionality with TeeChart Pro v8 ActiveX evaluation version.

but even then we are observing following issues:

We are using following function for plotting graph which is called after every 100ms.
1. The graphs flicker a lot. Meaning they dissappear for a moment and then get plotted.

2. For the above problem we have put delay due to which the problem is resolved to some extend but the same appears but less frequently,

Is the delay necessary?

3. Graphs height expands momentarily and then restores back to normal size.

4. In the graph when user scrolls the graph we want to store the max displayed value on the left axes.
Suppose the maximum Y value is 700
and user has adjusted the graph to 715 by scrolling the axes then we want to retrieve this 715 value.
We tried with MaxVisibleValue but it returns -1 for maximum times or in some cases it returns 63 or 78, it doesnt show the right value.

Code: Select all

for(int nChartIndx = 0; nChartIndx < 4; ++nChartIndx, ++nTunTableCnt)
	{
		if (m_bDisplayGraph[nChartIndx] == true)
		{
			nMin = stTuneTable.nMinMass[nTunTableCnt];
			nMax = stTuneTable.nMaxMass[nTunTableCnt];
			nWidth = nMax - nMin;
			nNumOfIntensitiesInWnd = m_nNumPts * nWidth;
			nMinMassIndx = nIntensityCnt;
			nMaxMassIndx = nIntensityCnt + nNumOfIntensitiesInWnd;

			if(m_graph[nChartIndx].m_hWnd != NULL)
			{
				m_series[nChartIndx].SetActive(false);
				m_series[nChartIndx].Clear();
			}
			try
			{
				
				for (double dblCnt = nMin ; dblCnt < (nMax); ++nIntensityCnt, dblCnt += dblMassIncr)
				{
					dblMassVal = dblCnt;
					// converting Intensity in percentage, so highest intensity mapped to 100%
					dblIntensity = (vecdblIntensityValues[nIntensityCnt]);
					m_series[nChartIndx].AddXY(dblMassVal, dblIntensity, _T(""), SERIES_COLOR_BLUE);
				}
				Sleep(20);
				m_series[nChartIndx].SetActive(true);
				m_series[nChartIndx].RefreshSeries();
			
	CLogger::TRACE_DBG_MSG(_T(__FILE__), __LINE__, eTRAC_INFORMATION, _T("\n Value For Graph:%d LAST INDEX %d \n "),nChartIndx ,m_graph[nChartIndx].Series(nChartIndx).MaxVisibleValue(1));
				}
			catch(...)
			{
				int n = 10;
			}
		}

		//	m_graph[nChartIndx].RedrawWindow();
		//	m_graph[nChartIndx].UpdateWindow();
		//
			
	}



Please suggest us solution to resolve our issues.
Do you see any problem the way we are using graph plotting functionality.

Thanks in advance,

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Issues with plotting functionality

Post by Narcís » Wed Sep 29, 2010 10:30 am

Hello roger,

For improving 1, 2 and 3 I strongly recommend you to read the Real-time Charting article here and implement as much as possible to your application. This is a TeeChart VCL article but most of it also applies to ActiveX version.
4. In the graph when user scrolls the graph we want to store the max displayed value on the left axes.
Suppose the maximum Y value is 700
and user has adjusted the graph to 715 by scrolling the axes then we want to retrieve this 715 value.
We tried with MaxVisibleValue but it returns -1 for maximum times or in some cases it returns 63 or 78, it doesnt show the right value.
In that case you can use axis Minimum and Maximum properties. You'll find information about axes in tutorial 4. Tutorials are available at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply