Jump to content
Software FX Community

Importing XML formatting using the ChartFX Wrapper


Matt Dupuis

Recommended Posts

Hello,

I'm using the ChartFX Wrapper to implement ChartFX for VS 2005 and I'm having an issue importing FileFormat XML that's from a previous version of ChartFX (ChartFX for .NET 6.2).  The code compiles fine and runs without asserting but the saved formatting doesn't show up in the charts.  Is there a good way to work around this?  Do I need to go into the XML and change things around to work with the newer version?  Any help you could offer would be much appreciated.

 

Thanks,

Matt   

Link to comment
Share on other sites

You can not import a 6.2 XML file using just the wrapper. What you need to do is use the Exporter assembly (ChartFX.WebForms.Wrapper.Exporter.dll) as follows:

SoftwareFX.ChartFX.Chart chartOld = new SoftwareFX.ChartFX.Chart();

chartOld.Import(SoftwareFX.ChartFX.

FileFormat.XML,"fileName");ChartFX.WinForms.Wrapper.Exporting.Exporter exporter = new ChartFX.WinForms.Wrapper.Exporting.Exporter(chartOld);

exporter.ExportChart(chartNew); // chartNew is a Chart FX 7.0 chart where the file contents will be loaded.

You can also convert all your old XML files to Chart FX 7.0 format using a command-line tool provided with Chart FX 7.0:

C:/>chartfx.winforms.exporter /xml inputFile outputFile

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...