You did identify the main steps required.
Before I'll go into the details, I should mention that Tersus has built in charting support, provided in the Charts category of the palette.
If you want to go ahead using the 3rd party package expecting XML, you'll need to model a process similar to the following schematic screen shot:
Note the following:
What remains is how you plan to integrate the chart into your application, which depends on the method by which the charting package is called, and how it outputs the chart, which requires more intimate knowledge of the charting package.
Other, more closely integrated approaches would make use of any of the following:
For best results, use the Firefox browser..