Page 1 of 1
Overlaying a Saved Native Tee file on an existing plot
Posted: Tue May 24, 2005 8:28 am
by 9525039
I am trying to find a way to load a saved file (native teechart format) and to overlay this data on an existing plot. Assuming both datasets have the same axes.
Using the Import interface and the LoadfromFile function, the existing plot is erased. One way I have though to do this is to custom create a datafile that has all the data, both the current and the saved data, however this seems clunky.
The native import facility doesnt seem to have a load to a defined series functionality.
Is there any way to achieve what I want to do without having to create a file with both datasets merged ?
Posted: Tue May 24, 2005 9:25 am
by narcis
Hi AR,
You should separate chart characteristics and chart data.
You could export/import chart characteristics using .tee file. Regarding the data you could export it to whatever format you wish using the chart export formats and then import it to the existing chart.
Posted: Tue May 24, 2005 12:43 pm
by 9525039
I dont want to be generating more than 1 data file for a save. Currently all I can see to do would be to copy the current chart data to memory, load the chart data from file and then readd the data from memory
When I tried to export to a XML data format and read the data back, I ran into the problem that the EnterSeries and exitSeries events did not fire for data read back in via the XMLdatasource component.
I only could seem to get the EnterSeries and ExitSeries events to work when I imported a tee file or I imported a tee file that had been converted to text using the supplied functions. Importing as a tee file erases the current graph.
I can solve the problem by storing the data as outlined in the 1st paragraph but this seems clunky
Posted: Tue May 24, 2005 2:38 pm
by narcis
Hi AR,
When I tried to export to a XML data format and read the data back, I ran into the problem that the EnterSeries and exitSeries events did not fire for data read back in via the XMLdatasource component.
I only could seem to get the EnterSeries and ExitSeries events to work when I imported a tee file or I imported a tee file that had been converted to text using the supplied functions. Importing as a tee file erases the current graph.
Could you please clarify which events are you using as EnterSeries and ExitSeries are not TeeChart standard events. Also what are you trying to achieve with those events, we may suggest you a solution.
Posted: Wed May 25, 2005 7:31 am
by 9525039
The events being used are
SINK_ENTRY_EX(IDC_TCHART1,DIID_ITChartEvents, 201, OnMouseEnterSeriesServicegraph)
SINK_ENTRY_EX(IDC_TCHART1,DIID_ITChartEvents,202, OnMouseLeaveSeriesServicegraph)
I am using these two events to allow the user to see via a text box the current series they are hovering over and the value at the mouse pointer.
Posted: Fri May 27, 2005 7:40 am
by narcis
Hi AR,
Are you reassigning the events after importing your chart data/series? That may be the reason because of them not being fired.
Posted: Tue May 31, 2005 12:51 pm
by 9525039
I am not reassigning them after Chart Import, will look into how to do that