Loading Bar chart with lots of data

TeeChart for ActiveX, COM and ASP
Post Reply
samelg
Newbie
Newbie
Posts: 2
Joined: Fri Nov 15, 2002 12:00 am
Location: U.S.A

Loading Bar chart with lots of data

Post by samelg » Sun Dec 11, 2005 2:50 am

I have created two grahs on a same chart. The top one is a price chart (OHLC) and the bottom is the volume (BAR chart). when I load the chart with 500 sets of data I don't have any problems, however when I load it with more that 1500 set of data the last volume bar does not dispay !!!

I codeing in C++ and I'm using the version 6.0.0.6

Here is the code I used to create my bar chart:

Code: Select all

	m_cTChart.AddSeries(scBar);
    m_cTChart.Series(VOL_SER).SetHorizontalAxis(aBottomAxis);
	m_cTChart.Series(VOL_SER).SetVerticalAxisCustom(0);
	m_cTChart.Series(VOL_SER).GetMarks().SetVisible(false);
	m_cTChart.Series(VOL_SER).GetAsBar().SetBarWidth(0);
	m_cTChart.Series(VOL_SER).GetAsBar().SetBarWidthPercent(100);
	m_cTChart.Series(VOL_SER).GetPen().SetWidth(0);
	m_cTChart.Series(VOL_SER).GetPen().SetStyle(psClear);
	m_cTChart.Series(VOL_SER).GetPen().SetVisible(true);
	m_cTChart.Series(VOL_SER).GetPen().SetEndStyle(esFlat);
Here is the code I'm using to load the data:

Code: Select all

while( !rs.IsEOF( ) )
	{
		for( int rowCount = 0; 
				rowCount < (int)rs.GetRowsFetched();
				rowCount++ )
		{
			m_cTChart.Series(PRICE_SER).GetAsCandle().AddCandle(rowCount+j, 
	            rs.m_Open_blk[rowCount],
	            rs.m_High_blk[rowCount], 
	            rs.m_Low_blk[rowCount],
	            rs.m_Close_blk[rowCount] );
		m_cTChart.Series(VOL_SER).Add( rs.m_Volume_blk[rowCount]/100.0 , "");
			
		// Date value MM/DD/YYYY
		t.clear();
		t.setTime(rs.m_Date_blk[rowCount], YYYYMMDD);
		m_cTChart.Series(1).SetPointLabel(rowCount+j,
                             t.toString(MM_DD_YY,/").c_str() );

			chg   = rs.m_Close_blk[rowCount] - close;
			open  = rs.m_Open_blk[rowCount];
			high  = rs.m_High_blk[rowCount];
			low   = rs.m_Low_blk[rowCount];
			close = rs.m_Close_blk[rowCount];
		}
		j += 2000;
		rs.MoveNext( );
	}

	rs.Close();
Sam Elghanian

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

Post by Narcís » Tue Dec 13, 2005 12:41 pm

Hi Sam,

It works fine here using:

Code: Select all

Private Sub Form_Load()
    TChart1.Series(0).FillSampleValues (2000)
    TChart1.Series(0).PointColor(TChart1.Series(0).Count - 1) = vbBlue
End Sub
and our latest v6.0.0.6 .ocx build. If you want I can send you the .ocx I'm using to see if it works for you.
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

samelg
Newbie
Newbie
Posts: 2
Joined: Fri Nov 15, 2002 12:00 am
Location: U.S.A

Post by samelg » Wed Dec 14, 2005 2:17 am

I have tried coloring the last bar as blue, its still does not show.

Please email me your version of OCX. Also let me know how to install and register it.

Thank you,
Sam Elghanian

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

Post by Narcís » Wed Dec 14, 2005 3:08 pm

Hi Sam,

I've just sent you our latest v6 .ocx available. Don't forget to unregister the old one and register this one using regsvr32 -u and regsvr32 respectively.
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