Page 1 of 1

Inserting a point in the spline curve after shown the curve

Posted: Fri Jul 15, 2005 6:57 am
by 9083326
Hi,

I am using the Teechart Pro V6. I am drawing the cubic spline graphs. I am displaying the chart Grid also. I am able to add the points at the end of the graph by entering the values in the chart grid. Now my question is whether we can insert the point in the curve by inserting the row in the Grid and entering the values.

Thanks and Regards,
Rama

Posted: Fri Jul 15, 2005 11:40 am
by narcis
Hi Rama,

It works fine here if you use CheckDataSource method in the OnBeforeDrawSeries event for the function series. I add the values in the ChartGrid at the source series at the next X value to the last one.

Code: Select all

Private Sub Form_Load()
    ChartGrid1.Chart = TChart1
    TChart1.Series(0).FillSampleValues 10
    TeeCommander1.Chart = TChart1
End Sub

Private Sub TChart1_OnBeforeDrawSeries()
    TChart1.Series(1).CheckDataSource
End Sub

Posted: Mon Jul 18, 2005 8:44 am
by 9083326
Hi,

I am able to add a point after the last one. What I am looking is adding a point in between. For example I want to add a point between 5th and 6th point. First I do not know How to add a row in the chart grid.

Thanks and regards,
Rama

Posted: Mon Jul 18, 2005 4:43 pm
by Pep
Hi Rama,

unfortunately the TeeChart ChartGrid doesn't support the advanced Grid
features you require although cursor position can be obtained by returning
Rows.Row & Cols.Col from the OnClick event of the Grid.