Need sample code to draw Histogram Series in VC++ (MFC)

TeeChart for ActiveX, COM and ASP
Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Need sample code to draw Histogram Series in VC++ (MFC)

Post by Frances » Thu Jan 03, 2008 11:20 am

I need to add TeeChart control to draw "Histogram Series" in one of my VC++(MFC) application.I found information to draw "Histogram Series" for .NET applications , but that is not useful for me because I want to write application in VC++(MFC).

So could you please send me VC++(MFC) or C++ sample code or any help information to draw "Histogram series" using TeeChart control ?

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

Post by Narcís » Thu Jan 03, 2008 11:39 am

Hi Frances,

You can either use a histogram series:

Code: Select all

	m_Chart1.AddSeries(scHistogram);
	m_Chart1.Series(0).FillSampleValues(8);
or a histogram function:

Code: Select all

	m_Chart1.AddSeries(scLine);
	m_Chart1.AddSeries(scBar);

	m_Chart1.Series(0).FillSampleValues(8);		
	
	m_Chart1.Series(1).SetDataSource(COleVariant("Series0"));
	m_Chart1.Series(1).SetFunction(41); //tfHistogram
	m_Chart1.Series(1).GetMarks().SetVisible(true);
	//m_Chart1.Series(1).GetFunctionType().SetPeriod(0);
	m_Chart1.Series(1).CheckDataSource();
For further information about VC++ applications with TeeChart please read Tutorial 15 - MS VC++ Applications and have a look at the examples at C:\Program Files\Steema Software\TeeChart Pro v8 ActiveX Control\Examples\Visual C++. I also recommend you to have a look at Tutorial 7 - Working with Functions.
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

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Thu Jan 03, 2008 11:57 am

Could you please let me know where I will get these tutorial applications?

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Thu Jan 03, 2008 12:01 pm

Hi ,

I also need sample code to draw Histogram Series polygon in MS VC++ application . and how to set color for each point in Histogram Series.

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

Post by Narcís » Thu Jan 03, 2008 12:14 pm

Hi Frances,

You'll find the tutorials and examples at TeeChart's program group at Start Menu->All Programs.
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

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Thu Jan 03, 2008 12:17 pm

Hi ,

Thanks for reply.
I am having examples and tutorial for .NET not for MS VC++ Applications . Please send me examples and tutorials for MS VC++.

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

Post by Narcís » Thu Jan 03, 2008 12:27 pm

Hi Frances,

Which TeeChart for version are you using? The examples and tutorials I mentioned belong to TeeChart Pro v8 ActiveX as you posted to the forum for this TeeChart version.
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

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Thu Jan 03, 2008 12:34 pm

Thanks for reply..

Tee Chart Version I am using is that 5.0.6.0...

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Thu Jan 03, 2008 12:35 pm

Version that I am using TeeChart Pro Activex v5.0.6.0

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

Post by Narcís » Thu Jan 03, 2008 12:38 pm

Hi Frances,

Ok, in that case you should have the tutorials in the location I mentioned. Examples should be found at C:\Program Files\TeeChart Pro v5 ActiveX Control\Examples\Visual C++ (Default English installation). However, with this version, you'll only have histogram series, histogram function support was added for TeeChart Pro v8 ActiveX.
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

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Thu Jan 03, 2008 12:59 pm

Hi ,

I have only TeeChart5.ocx file present on my system for "TeeChart Pro Activex v5.0.6.0" version .

Could you please send me installer for TeeChart Pro Activex v5 so I can get MS VC++ examples and tutorial for this perticualr version after installing this vesion ActiveX on my system. I don't have a

"C:\Program Files\Steema Software\TeeChart Pro v5 ActiveX Control\Examples\Visual C++" folder on my system.

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

Post by Narcís » Thu Jan 03, 2008 1:13 pm

Hi Frances,

You should find the installer at the client download area using your licensing details.

If you don't have this information please contact our Sales Dept. at sales@steema.com. If you purchased your license via a software reseller you may want to contact them.
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

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Fri Jan 04, 2008 4:32 am

I am drawing histogram using Tee Chart . Could you please let me know how I will draw Polygons of histogram and how I will fill colors in that polygons.

Please give me smaple code example for above queries.

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

Post by Narcís » Fri Jan 04, 2008 8:27 am

Hi Frances,

Sorry but I don't understand what do you exactly mean. Could you please give us more detailed information about what you are trying to achieve?

Thanks in advance.
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

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Fri Jan 04, 2008 10:30 am

Hi ,

I am developing one application in which I want to draw Line and Histogram series using TeeChart5.ocx. This I want to develop in MS VC++ technology. I am having TeeChart5.ocx , that I have used in my application to use TeeChart functionlity.

Now I am okey to draw line series using TeeChart . but I am not able to understanding how I will draw Histogram using TeeChart .

I am having four coordinates i.e left , right , top , bottom to draw histogram but I don't know which are the methods or properties required to draw histogram series. also I don't know how to fill color in histogram series.

So could you please send me some sample code for MS VC++ technology which contains example to draw histogram series using Teechart activeX .


You had suggested me to use following,

For further information about VC++ applications with TeeChart please read Tutorial 15 - MS VC++ Applications and have a look at the examples at C:\Program Files\Steema Software\TeeChart Pro v8 ActiveX Control\Examples\Visual C++. I also recommend you to have a look at Tutorial 7 - Working with Functions

but I don't have these materials on my machine .

So this my request if you could send me MS VC++sample code to draw histogram series using TeeChart5.ocx component , this will be very helpful for me to complete my assignment.

Post Reply