Jump to content
Software FX Community

Options for import/export


Recommended Posts

We currently use ChartFx 6.2 for our Windows Forms application. We are porting our application to WPF and was evaluating ChartFx for WPF for our charting needs.

We use ChartFx 6.2 Export method to export our chart as metafiles. I didn't see any options for exporting charts in the ChartFx for WPF. Do you plan to add this feature in near future?

 Also, will you provide an import feature in ChartFx for WPF that allows chart properties to be read from an XML file?

Finally, will ChartFx for WPF be able to understand the XML settings created by ChartFx 6.2 or will these versions have no way of talking with each other?

 Thank you!

Link to comment
Share on other sites

We do support Export but only as PNG, Jpeg or Bitmap. Unfortunately there are no metafile-related APIs in WPF so this won't be supported.

In the future we could also support exporting as "plain" XAML or maybe as XPS.

About Import/Export as XML: This is not supported yet. I do not know if we will support ChartFX 6.2 XMLs, if not we can probably provide a separate utility to translate them.



Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...

Exporting to Xaml or an Xml viewstate is something that would be extremely handy for what I'm doing right now.  I basically want a clone of my chart instance and to be able to persist its visual aspects.  I tried the traditional xaml-clone method of:

Chart clone = (Chart) XamlReader.Parse(XamlWriter.Save(originalChart)); 

But that yielded me with the default chart. Right now I'm experimenting with what needs to be copied in code versus what can be done via the xaml-serialization clone:


  public object Clone()   {   Chart clone = new Chart   {   AllowDrop = this.AllowDrop,   AllSeries = new ChartFX.WPF.AllSeriesAttributes   {   PointLabels = this.AllSeries.PointLabels   },   AxisX = new ChartFX.WPF.Axis   {   Labels = this.AxisX.Labels,   Grids = (ChartFX.WPF.Grids)XamlReader.Parse(XamlWriter.Save(this.AxisX.Grids)),   Line = this.AxisX.Line,   PositionValue = this.AxisX.PositionValue   }, etc.

The underlying business need we're trying to address is being able to expose the ability for the user to change and persist visual aspects of the chart at run time.  Colors, Point Label Visibility, Chart Style, etc.

Please let me know if there's a better way to do this with the current beta.  I'm in the trial and experimentation phase at this point.



Link to comment
Share on other sites

In our currently released products (ChartFX for WinForms, ASP.NET, COM, etc.) we support Import/Export to both binary (visual aspects + data) and XML (visual aspects only).

We will support this functionality in future builds but unfortunately there is no support at all in the current builds.

Please note that most settings cannot be shared between 2 charts so you if you want to roll out your own solution you will have to clone everything (e.g. reusing AxisX.Line between 2 charts might cause refreshing issues if you later modify any of the Line properties).



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...