TTeeXMLSource

TTeeXMLSource
Hierarchy     Properties     Methods     Events     

Unit
TeeXML

Description
Use this component as an XML data provider to Series or Chart components.

Usage steps:

1) Set the Chart property to desired Chart.
2) Set the XML property to desired file containing series data in XML format.
3) Call the Open method or set Active property to True to import XML data.

Format :

The XML format must be the same as when exporting Series data to XML format.

See TSeriesDataXML class for info about exporting Series data to XML.

Multiple series can coexist in the XML source.

The SeriesNode property can be set to choose an individual series.

Example:

var PointSeries : TPointSeries;
XML : TTeeXMLSource;

// Create a sample series...
PointSeries:=TPointSeries.Create(Self);
Chart1.AddSeries(PointSeries);

// Create an XML source...
XML:=TTeeXMLSource.Create(Self);

// Configure XML...
XML.XML.Text:=Memo2.Text; // <--- set text string with XML data

// XML.FileName:='c:\mydata.xml'; <--- or load xml file

XML.Series:=PointSeries; // <-- series to fill
XML.SeriesNode:='Series1'; // <-- xml node to use
XML.ValueSource:='Y'; // <-- xml "point" attribute to use as value

// Load data, fill series...
XML.Open;