How can I use Polar chart?

TeeChart for ActiveX, COM and ASP
Post Reply
parmi
Newbie
Newbie
Posts: 1
Joined: Mon Aug 04, 2014 12:00 am

How can I use Polar chart?

Post by parmi » Thu Mar 12, 2015 1:18 am

How can I use Polar chart?

I’m trying to make for Polar chart in my project.
But I can’t success it.
I want a simple example like below my project's function "void CDlgTeeChart::SetPolarChart()".
It’s ordinary chart. It is working good.
And then similarly, I tried to make a function “void CDlgTeeChart::SetPolarChart()” for Polar chart using to “IPolarSeriesPtr”.
But ” ITChartPtr m_ctrlTChart”'s method “Series” doesn't take “IPolarSeriesPtr polarSeries” as input factor.
I already tried to find to replacement "Series" method or "ITChartPtr".
But I can't find good compatible replacement.
My project option is MFC, VS2012, TeeChart201464.ocx.

This is working good.

Code: Select all

void CDlgTeeChart::SetChart()   :D 
{
	long result;
	m_ctrlTChart->AddSeries(ESeriesClass::scLine, &result );
	ISeriesPtr series;
	BSTR label = (BSTR)L"hello";
	OLE_COLOR color = RGB( 100, 200, 100 );

	m_ctrlTChart->Series(m_index, &series);

	for(int x=0; x<100; x++)
	{
		for(int y=0; y<100; y++)
		{
			series->AddXY((double) x, (double) y, label, color, nullptr);
		}
	}
}
It's not working!!!
Please help.

Code: Select all

void CDlgTeeChart::SetPolarChart()   :cry: 
{
	long result;
	m_ctrlTChart->AddSeries(ESeriesClass::scLine, &result );
	// ISeriesPtr series;
	IPolarSeriesPtr polarSeries;
	BSTR label = (BSTR)L"hello";
	OLE_COLOR color = RGB( 100, 200, 100 );

        /////// //  :evil:  Error! I want to replace Series. ///////////////
	m_ctrlTChart->Series(m_index, &polarSeries); 

	for(int angle=0; angle<360; angle++)
	{
		for(int val=0; val<100; val++)
		{
			//series->AddXY((double) x, (double) y, label, color, nullptr);
			polarSeries->AddPolar((double) angle, (double) val, label, color, nullptr);
		}
	}
}
Last edited by parmi on Fri Mar 20, 2015 8:53 am, edited 2 times in total.

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

Re: How can I use Polar chart?

Post by Yeray » Thu Mar 12, 2015 9:56 am

Hello,

There could be some cast missing. 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

Post Reply