Drawing cubic spline curve

TeeChart for ActiveX, COM and ASP
Rama
Newbie
Newbie
Posts: 13
Joined: Fri Nov 15, 2002 12:00 am
Contact:

Drawing cubic spline curve

Post by Rama » Mon Jun 07, 2004 4:00 pm

How to draw the cubic spline curve in the teechart. I am using the TeeChart 5.0 Pro ActiveX.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jun 07, 2004 4:11 pm

Hi Rama,

the spline fitting algorithm (Spline function) has been added in the TeeChart Pro v6. You can download the (fully funcional) trial version from our web site and test it.

Rama
Newbie
Newbie
Posts: 13
Joined: Fri Nov 15, 2002 12:00 am
Contact:

Post by Rama » Tue Jun 08, 2004 12:13 pm

Hi,

Thank you for your reply. I downloaded the Teechart Pro 6.0 and prototyped. I added a series as "Series0" and added another series as "Series1". Set the "Series1" datasource as "Series0" and the Function as smoothing, it is working fine. But my requirement is I should not create the extra series "Series1". I want apply the smoothing functionality on "Series0" itself. It is not working.
Please send a example and explain the algorithm used for the soomthing.
If your example meets my requirement, I will go for the upgradation.

Regards,
Rama

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Jun 08, 2004 3:55 pm

Hi Rama,

I think that you want to only see the Smoothing Series, isn't it ? In that case, always you can set the Series (0) visible to false.

Rama
Newbie
Newbie
Posts: 13
Joined: Fri Nov 15, 2002 12:00 am
Contact:

Post by Rama » Wed Jun 09, 2004 5:05 am

Hi,
I did not find property Visible for the series.
If I set the Activate=False for the "Series0", It is not showing but appearing in the legend. I am using the LegendStyle = lsSeries and Legend.Checkboxes = true. So user can check the checkbox and see the "Series0".
Is it not possible without adding the "Series1"?

Would it be possible to send a working example?

Regards,
Rama

Rama
Newbie
Newbie
Posts: 13
Joined: Fri Nov 15, 2002 12:00 am
Contact:

Post by Rama » Wed Jun 09, 2004 5:22 am

Hi,

If I set the Pointer.Visible = True to the series. It is showing huge number of points. I want set the same Pointer of the "Series0".

Now in the teecahrt points are joined by the straight line.
Is it possible join points by curve? If possible, send an example. It can solve my problem.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Jun 09, 2004 9:27 am

Hi Rama,
I did not find property Visible for the series.
Yes, sorry, I mistake me, you must use the Acitve property.
Is it not possible without adding the "Series1"?
You can set the Series(0).ShowInLegend property to false.
Would it be possible to send a working example?
Sure ..:

Code: Select all

Private Sub Form_Load()
With TChart1
    .Aspect.View3D = False
    .AddSeries scLine
    .Series(0).FillSampleValues (10)
    .AddSeries scLine
    .Series(1).SetFunction tfSmoothing
    .Series(1).DataSource = "Series0"
    .Series(0).Active = False
    .Series(0).ShowInLegend = False
    .Series(1).asLine.Pointer.Visible = True
    .Series(1).asLine.Pointer.Style = psStar
End With
End Sub
Is it possible join points by curve? If possible, send an example. It can solve my problem.
Yes, done in the example.

Rama
Newbie
Newbie
Posts: 13
Joined: Fri Nov 15, 2002 12:00 am
Contact:

Post by Rama » Wed Jun 09, 2004 10:19 am

Hi,

Thanks for your answer. I have a doubt on the Pointers displayed. We added the 10 points in the example and in the chart it is displaying fourty. May be the default factor = 4 for the smoothing function. So totally fouty points.

Is it possible to mark the point exactly what we added to the series?
Is it possible to join the points with curves without using the functions?

Would it is possible for the teecahrt team to add the Series type itself as cubic spline. Already teechart is having Bezier curve as a series type.

Rama
Newbie
Newbie
Posts: 13
Joined: Fri Nov 15, 2002 12:00 am
Contact:

Post by Rama » Thu Jun 10, 2004 10:43 am

Hi,

Could you please give the answers. I stuck with this requirement.

Your help will be appriciable.

Regards,
Rama

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Jun 10, 2004 11:00 am

Hi Rama,
Is it possible to mark the point exactly what we added to the series?
Yes, you can do :

Code: Select all

Private Sub Form_Load()
With TChart1
    .Aspect.View3D = False
    .AddSeries scLine
    .Series(0).FillSampleValues (10)
    .AddSeries scLine
    .Series(1).SetFunction tfSmoothing
    .Series(1).DataSource = "Series0"
    .Series(0).asLine.LinePen.Visible = False
    .Series(0).ShowInLegend = False
    .Series(0).asLine.Pointer.Visible = True
    .Series(0).asLine.Pointer.Style = psStar
End With
End Sub
Is it possible to join the points with curves without using the functions?
Not, that I know of.
Would it is possible for the teecahrt team to add the Series type itself as
cubic spline. Already teechart is having Bezier curve as a series type.
I'll add on our wish list to be considered for the next releases.

Rama
Newbie
Newbie
Posts: 13
Joined: Fri Nov 15, 2002 12:00 am
Contact:

Post by Rama » Thu Jun 10, 2004 1:02 pm

Hi,


Thanks a lot for your help. I have a lost question that I am attaching my chart to the ChartGrid and TeeCommander. In the ChartGrid I am seeing both Series0 and Series1. How to hide(not showing) the Series0 in the ChartGrid.

If Iopen the chart editor from the Teecommander, Both series are visible. Hoe to hide here also.

Is it possible not showing the chart editor in the TeeCommander?

Regards,
Rama

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Jun 10, 2004 6:28 pm

Hi,
ng both Series0 and Series1. How to hide(not showing) the Series0 in the ChartGrid.
You can set the Width of the Col to 0 :
ChartGrid1.Cols.Widths(2) = 0
If Iopen the chart editor from the Teecommander, Both series are visible. Hoe to hide here also.
I'm afraid the only way around this is to hide the Editor icon from the TeeCommander. You can see one example of this in the TeeChart Pro Demo Features project.

Rama
Newbie
Newbie
Posts: 13
Joined: Fri Nov 15, 2002 12:00 am
Contact:

Post by Rama » Fri Jun 11, 2004 8:56 am

hi,

I did not find the Column width property in the ChartGrid as you mentioned ChartGrid1.Cols.Widths(2) = 0 . I am using the TeeChart Pro v6.0.0.4 evaluation version. Except this all other requirements are met.

I got a sample from the demo project for adding the required controls to the TeeCommander.

Regards,
Rama

Rama
Newbie
Newbie
Posts: 13
Joined: Fri Nov 15, 2002 12:00 am
Contact:

Post by Rama » Fri Jun 11, 2004 9:33 am

HI,

If I use the workaround you given till date, I have to loss some of the good features of the teechart is providing bydefault.

Is there any plans of including the cubic spline as the series type as scline,scBar,scBezier in the teechart?

Even if you give a patch which consist the cubic spline as series type. If yes, give the details.

Regards,
Rama

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Jun 11, 2004 10:04 am

Hi Rama,
did not find the Column width property in the ChartGrid as you mentioned ChartGrid1.Cols.Widths(2) = 0 . I am using the TeeChart Pro v6.0.0.4 evaluation version. Except this all other requirements are met.
Yes, the Widths property does not appear putting a point afer the Cols property (we'll fix this) but I've writed manually (using the v6.05) and works , have you tried ?
Is there any plans of including the cubic spline as the series type as scline,scBar,scBezier in the teechart?
As I told you in my other posts it's added on our wish list to be considered for future releases, but I cannot tell for sure if will be done or when.

Post Reply