Drawing the cubic spline curve and the cross hair

TeeChart for ActiveX, COM and ASP
Post Reply
rama
Newbie
Newbie
Posts: 33
Joined: Thu Jul 29, 2004 4:00 am

Drawing the cubic spline curve and the cross hair

Post by rama » Thu Jul 07, 2005 6:48 am

Hi,

Currently I am using the Teechart Pro 6.0 version. I posted a question in this forum how to draw a cubic spline curve. I got a work around to do that. It is not possible to draw a cubic spline curve without adding a new series for existing one. They told that added this to wish list.

I want to know whether in the 7.0 version drawing a cublic spline is supported with out adding a new series for the existing series and
Cross-hair functionality. If these two are supported then I will order for upgradation. Otherwise I have to look some other components which support these two features. Please reply as early as possible.

Regards,
Rama

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 Jul 08, 2005 9:37 am

Hi Rama,

The workaround that was given you satisfies all your needs in terms of functionality? If it doesn't, could you please post a code example which we can run “as-is” of what you have so far along with a detailed description of what you'd like to see?

You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
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

rama
Newbie
Newbie
Posts: 33
Joined: Thu Jul 29, 2004 4:00 am

Post by rama » Tue Jul 12, 2005 10:00 am

Hi,

Please find the previos query in the following URL

http://www.teechart.net/support/modules ... a368ab36fe

You can find the code I followed.

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

For the series1 the datasource is Series0. I am hiding the series0. In chart grid I am hiding the corresponding columns.

I am a having a problem while draging the curve. I am to drag the curve but it is moving in the line format. Not in the curve fashion. But if I drag the points of the Series0 it is moving in the curve format. The problem I am able to move a point between the previous and next point. I am not able move to anywhere I liked.
The other problem is if I drag the Series1, it is moving in the line format instead of curve.

Regards,
Rama

Marc
Site Admin
Site Admin
Posts: 1258
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Fri Jul 15, 2005 11:53 am

Hello Rama,

Thanks for you enquiry. We'll reference your points as we evaluate new functionality for upcoming versions but the current versions TeeChart can't do all that you're asking for.

Looking back at your earlier post, a simple way to only have one Series visible in a Chart is to datasource from another Chart, for example, add a TeeChart to a form and paste in the following code:

Code: Select all

Dim tchart0

Private Sub Form_Load()

    TeeCommander1.Chart = TChart1
    
    'non visible TeeChart
    Set tchart0 = CreateObject("TeeChart.TChart")
    With tchart0
        .AddSeries scLine
        .Series(0).FillSampleValues (10)
    End With
    
    'visible on-form Chart
    With TChart1
        .Aspect.View3D = False
        .AddSeries scLine
        .Series(0).SetFunction tfSmoothing
        .Series(0).DataSource = tchart0.Series(0)
    End With

End Sub
The drawback here, in terms of what you require, is that the Series contains the (in this case) 40 points calculated as the curve-fit on the original 10 point input. I understand that you'd like to show the original 10 points. That implies putting the source Series in the same Chart.

Being able to drag the points to any point on the x,y plane is possible as TeeChart supports non-ordered points (as can be seen with Bezier). For the Smoothing function to smooth x indexed points is not possible if the x values of sequential indexed points are not ordered (ascending/descending). Current versions do not support this requirement though we'll look at it as a possibility for upcoming versions.

Regards,
Marc Meumann
Steema Support

Post Reply