TeeChart for ActiveX, COM and ASP
-
n00b
- Newbie
- Posts: 8
- Joined: Mon Nov 30, 2009 12:00 am
Post
by n00b » Thu Apr 01, 2010 6:09 am
I'm getting an error when I try to smooth the series. I'm coding in C++ and I'm trying to smooth via the following:
Code: Select all
m_wndChart.Series(SeriesIndex).GetAsContour().GetSmoothing().SetActive(TRUE);
When I add this line of code in my program, it crashes with the error shown in the attachment.
-
Attachments
-
- Invalid Class Typecast.png (16.26 KiB) Viewed 7298 times
-
Narcís
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Thu Apr 01, 2010 3:03 pm
Hello,
Code below works fine for me here using TeeChart Pro v8.0.0.8 ActiveX, which is the latest version available at the client area. Can you please check if this works fine at your end and let us know the TeeChart version you are using? If the problem persists can you please attach a simple example project we can run "as-is" to reproduce the problem here?
Code: Select all
m_Chart1.AddSeries(scContour);
m_Chart1.Series(0).GetAsContour().GetSmoothing().SetActive(true);
m_Chart1.Series(0).FillSampleValues(10);
Thanks in advance.
-
n00b
- Newbie
- Posts: 8
- Joined: Mon Nov 30, 2009 12:00 am
Post
by n00b » Wed Apr 07, 2010 12:01 am
Hi Narcis.
I just checked and our version of TeeChart Pro is v8.0.0.7. I'm downloading the new version and will post my results afterwards.
-
n00b
- Newbie
- Posts: 8
- Joined: Mon Nov 30, 2009 12:00 am
Post
by n00b » Wed Apr 07, 2010 12:52 am
I registered the new ocx but am still receiving the error. I'm beginning to think that I'm calling the wrong methods for what I'm trying to do so I'll back up a little.
On the TChart Editor there is a little check box on the bottom left hand corner called "Smooth". When I click that it seems to smooth out the appearance of the graphs. What is the methods I need to call in C++ to emulate this behaviour?
I've attached screen shots for clarity.
-
Attachments
-
- Non-Smooth.png (124.3 KiB) Viewed 7260 times
-
- Smooth.png (235.06 KiB) Viewed 7292 times
-
Narcís
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Wed Apr 07, 2010 7:43 am
Hello,
You can use AntiAlias tool as I told
here.
-
n00b
- Newbie
- Posts: 8
- Joined: Mon Nov 30, 2009 12:00 am
Post
by n00b » Thu Apr 08, 2010 1:02 am
Thanks figured it out but won't be using it for my implementation.
For those interested, the code in c++ is:
Code: Select all
myChart1.GetCanvas().SetUseAntiAlias(TRUE);