Label and Title is disappear when OpenGL is redraw

TeeChart for ActiveX, COM and ASP
Post Reply
pine
Newbie
Newbie
Posts: 9
Joined: Wed Jun 13, 2012 12:00 am
Contact:

Label and Title is disappear when OpenGL is redraw

Post by pine » Tue Nov 06, 2012 7:18 am

Hi there~!

I developed the application with TeeChart 2011.ocx and VS2008 MFC.
I displayed the chart through OpenGL interface every second.
And I stored the chart numeric data as *.csv files at HDD.
So it show the chart when user clicked specific time list to linked csv file.

But here is trouble portion.
OpenGL Chart display normal and successful at first time.
I create dialog with TeeChart control and show the chart which user clicked specific time. It works good!
But well-displayed chart with running background is trouble.
Label and Title of chart is disappear!!

This chart repaint every second. Why disappear this well-displayed label and title??

I'll wait for your reply.
Thanks~

Yeray
Site Admin
Site Admin
Posts: 9587
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Label and Title is disappear when OpenGL is redraw

Post by Yeray » Tue Nov 06, 2012 10:56 am

Hi,

If the series or the walls aren't overlapping these texts, I don't see why they should disappear.
I've tried to reproduce the problem but it seems to work as expected for me here. Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

pine
Newbie
Newbie
Posts: 9
Joined: Wed Jun 13, 2012 12:00 am
Contact:

Re: Label and Title is disappear when OpenGL is redraw

Post by pine » Wed Nov 07, 2012 1:41 am

I attached sample executable file.

The yellow chart window appear when you double click "LabelMissing.exe".

And the red chart window appear when you click "Create Another Window" button.

And the red chart window destroy when you click "Terminate Another Window" button.

Bingo!! You can see that yellow chart's title and label is disappear.

I'll explain the inner code routine below
------------------------------------------------------------------------------------------------------------------------------------------

Window Initialize -> Timer(trigger every seconds) turn on -> Chart will add data at timer event routine

These steps(Window initialize, Timer Set, Timer event process) are same routine adapted both MainWindow(LabelMissing) and Sub Window(NewLabelMissing).

1. Window Initialize ( Window create routine is execute 1 time)

Code: Select all

if (m_tctMain.GetSeriesCount() == 0)
{
	long index = m_tctMain.AddSeries(scTower);
	CSeries cSeries = m_tctMain.Series(index);

	cSeries.GetAsTower().SetTowerStyle(tsCube);
	cSeries.GetAsTower().SetUseOrigin(TRUE);

	m_tctMain.SetTheme(ctBlackIsBack, cpOpera);

	m_tctMain.GetPanel().GetGradient().SetVisible(FALSE);
	m_tctMain.GetPanel().SetColor(RGB(0,0,0));
	m_tctMain.GetPanel().SetMarginTop(0);

	m_tctMain.GetZoom().SetEnable(FALSE);
	m_tctMain.GetScroll().SetEnable(FALSE);
	m_tctMain.GetHeader().Show();	

	m_tctMain.GetHeader().SetCaption(_T("Main Chart"));
	m_tctMain.GetHeader().SetCustomPosition(TRUE);
	m_tctMain.GetHeader().SetLeft(10);
	m_tctMain.GetHeader().SetTop(10);
	m_tctMain.GetHeader().GetFont().SetBold(TRUE);

	m_tctMain.GetLegend().SetVisible(FALSE);

	m_tctMain.GetAspect().SetView3D(TRUE);
	m_tctMain.GetAspect().SetOrthogonal(FALSE);
	m_tctMain.GetAspect().SetChart3DPercent(100);
	m_tctMain.GetAspect().SetZoom(90);

	m_tctMain.GetAspect().SetRotation(325);
	m_tctMain.GetAspect().SetElevation(345);

	m_tctMain.GetAspect().SetPerspective(0);
	m_tctMain.GetAspect().GetOpenGL().SetActive(TRUE);

	//x axis setting
	m_tctMain.GetAxis().GetBottom().SetAutomatic(FALSE);
	m_tctMain.GetAxis().GetBottom().SetMaximum(10);
	m_tctMain.GetAxis().GetBottom().SetMinimum(0);


	//y axis setting
	m_tctMain.GetAxis().GetLeft().SetAutomatic(FALSE);
	m_tctMain.GetAxis().GetLeft().SetMinimum(0);
	m_tctMain.GetAxis().GetLeft().SetMaximum(10);

	//z axis setting
	m_tctMain.GetAxis().GetDepth().SetVisible(TRUE);
	m_tctMain.GetAxis().GetDepth().SetAutomatic(FALSE);
	m_tctMain.GetAxis().GetDepth().SetMaximum(10);
	m_tctMain.GetAxis().GetDepth().SetMinimum(0);

	m_tctMain.GetWalls().GetBack().SetVisible(TRUE);
	m_tctMain.GetWalls().GetBack().GetGradient().SetVisible(FALSE);
	m_tctMain.GetWalls().GetBack().SetColor(RGB(90,90,90));

	m_tctMain.GetWalls().GetLeft().SetVisible(TRUE);
	m_tctMain.GetWalls().GetLeft().SetColor(RGB(65,65,65));
	m_tctMain.GetWalls().GetLeft().GetPen().SetVisible(FALSE);

	m_tctMain.GetWalls().GetBottom().SetVisible(TRUE);
	m_tctMain.GetWalls().GetBottom().SetSize(1);
}
2.Timer Routine
After Window initialize, SetTimer(timer id, 1 second)

3. Timer event Routine (Execute every 1 second)

Code: Select all

m_tctMain.RemoveAllSeries();  //For memory release

if (m_tctMain.GetSeriesCount() == 0)
{
	long index = m_tctMain.AddSeries(scTower);
	CSeries cSeries = m_tctMain.Series(index);

	cSeries.GetAsTower().SetTowerStyle(tsCube);
	cSeries.GetAsTower().SetUseOrigin(TRUE);
}

CSeries cSeries = m_tctMain.Series(0);

for (int nPeriod=0; nPeriod<10; nPeriod++)
{
	for (int nPhase=0; nPhase<10; nPhase++)
	{
		int nData = rand() % 10;
		cSeries.GetAsTower().AddXYZ(nPeriod, nData , nPhase, _T(""), RGB(255,255,0));
	}
}
------------------------------------------------------------------------------------------------------------------------------------------

Push "Create Another Window" button

Code: Select all

CRedChartDlg* pNew = new CRedChartDlg;
if(pNew)
{
    pNew->Create(IDD_NEWDLG, this);
    pNew->ShowWindow(SW_SHOW);
}
------------------------------------------------------------------------------------------------------------------------------------------

Push "Terminate Another Window" button

Code: Select all

if(pNew)
{
    pNew->DestroyWindow();
    delete pNew;
    pNew = NULL;
}
Attachments
LabelMissing.zip
Sample Executable file
(68.91 KiB) Downloaded 875 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Label and Title is disappear when OpenGL is redraw

Post by Sandra » Wed Nov 07, 2012 12:43 pm

Hello Pine,

Can you please, send us your complete project, not only the .exe, so seems in your code has lost variables and we can not reproduce your problems here?

Thanks,
Best Regards,
Sandra Pazos / 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

pine
Newbie
Newbie
Posts: 9
Joined: Wed Jun 13, 2012 12:00 am
Contact:

Re: Label and Title is disappear when OpenGL is redraw

Post by pine » Thu Nov 08, 2012 1:28 am

Hello sandra!

I can't attach the sample project file because file size limit (under 512KB ㅠ_ㅠ)

So I'll afford link.. Please contact this link and download zip file.

Link is http://sdrv.ms/PYjLGF

Thanks

pine
Newbie
Newbie
Posts: 9
Joined: Wed Jun 13, 2012 12:00 am
Contact:

Re: Label and Title is disappear when OpenGL is redraw

Post by pine » Thu Nov 08, 2012 5:50 am

Hello again Sandra.

If you can't download above line, I send to you E-mail message.

So you can check code in my project.

Thanks~!

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Label and Title is disappear when OpenGL is redraw

Post by Sandra » Fri Nov 09, 2012 4:43 pm

Hello pine,

We have investigating your problem ans I answer you asap.

Thanks,
Best Regards,
Sandra Pazos / 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

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Label and Title is disappear when OpenGL is redraw

Post by Sandra » Thu Nov 15, 2012 2:01 pm

Hello pine,

Sorry for the delay. We have had many tests and we consider your problem as a bug with number[TA05016415]. We will try to fix it to upcoming versions of TeeChartActivex. At the moment, you can enable and disable the TeeOpenGl or Redraw the Chart because the labels appears.

Thanks,
Best Regards,
Sandra Pazos / 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