Page 1 of 1
Importing problem.
Posted: Sat Jun 12, 2004 1:47 am
by 9082121
Hello, All!
I am russian programmer-student. So.. sorry for bad English.
I hope somebody will help me with my problem .
Here is my problem:
I need to export and import charts to file.
When I export regular charts, all going fine.
But I need to export charts with function-series wich
datasoure is another chart series.
(I have Chart B with 1 series .
and Chart C - with function. function datasource- is the series from
Chart B. I need to export and import Chart B)
When I try to import that chart I get exception and error
So.. I get exception and error message ("No valid datasource:Series0");
PS: Steema! TeeChart is GREAT!
Posted: Sun Jun 13, 2004 10:47 pm
by Pep
Hi Yuri,
yes, this is a missing feature (allow to import Chart which contains Series of other Charts objects as DataSource). I've added this on our wish list to be considered for the next maintenance releases. In meantime you can set the DataSource to nothing and then reassign the DataSource again when the Chart has been imported, i.e. :
Code: Select all
Private Sub Command1_Click()
TChart2.Series(0).DataSource = ""
TChart2.Export.asNative.SaveToFile "c:\native.tee", True
TChart2.ClearChart
End Sub
Private Sub Command2_Click()
TChart2.Import.LoadFromFile "c:\native.tee"
TChart2.Series(0).DataSource = TChart1.Series(0)
End Sub
Private Sub Form_Load()
With TChart1
.AddSeries scLine
.Series(0).FillSampleValues (10)
End With
With TChart2
.AddSeries scLine
.Series(0).SetFunction tfAverage
.Series(0).DataSource = TChart1.Series(0)
End With
End Sub
PS: Steema! TeeChart is GREAT!
Many thanks ! I'm glad to listen this
THANKS + MORE HELP NEEDED!
Posted: Tue Jun 15, 2004 1:10 pm
by 9082121
Thanks Pep!
I tried to import charts just like in your example, its working!
Maybe its not a finest way, but its working and that is all what I need.
But I have a new problem.
I develop financical charts proggie using TChart.
Main chart window of proggie recieves quotas in real-time and displays
it as candle.
But proggie has a lot of indicators(functions to main chart window)
Some of indicators are drawn in another chart windows(such as MACD,
RSI)
Some of them are drawn in the main chart window(such as moving average,bollinger bands)
So.... new quotas come, and I need to fix them in indicator-windows.
All indicator widnows are functions to main chart window.
I jush CheckDataSource them. but.. something wrong happens.
First: When indicator is bollinger bands it causes exception after
second or third call to CheckDataSource.
Fitst call to CheckDataSource causes unexpected changes in main chart window (Bollinger function is in main chart window with main candle-chart. Candle chart recieves quotas)
Unexpected changes - left axis appears (Left axis was invisible)
But with other indicators (i.e. Moving average) all doing fine.
Second: When indicator is RSI, MACD or other (drawn in another chart windows), CheckDataSource causes dissapering of whole indicator and its
axis grids (sometimes), or dissapering of some part of indicator (i.e.
DMI+ in ADX , or one of MAVG in MACD).
I tried to Repaint() , but it caused quekes in chart windows (does`nt
looks fine)
Maybe my problem is just my incompetence. And I realize my description is not enough to solution. But maybe someone was faced with my problem already. Espetially with Bollinger-bands_CheckDataSource() -exception.
PS: Terrible sorry for BAAADDD ENGLISH
Yuri Yushchenko.
Posted: Wed Jun 16, 2004 11:14 am
by Pep
i Yuri,
I'm going to need an example with which I can reproduce the problem "as-is" here, could you please post in into the steema.public.attachments newsgroup ?