Chart FX-Chart Export
Chart FX provides the Export method that enables you (or your end users) to save chart files, images and data in a variety of formats. Some of the formats available differ from platform to platform, as only web based products (i.e. Chart FX WebForms) will generate web formats (i.e. PNG or JPEG).
There are also other file types in Chart FX called "Chart Templates" that allow you to save the appearance (Colors, Chart Types and Styles, Visible Tools, etc.) of the chart in a file so you can later apply it to another chart. This allows you to reuse code instead of setting the same attributes for all of your individual charts.
Note: Templates save all the information that is not data related. This means, it will not save the values, number of series or points, or any other property related to this data, such as MultiType settings and Min, Max values in the chart axes.
File Formats
The following file formats are supported by the Export method:
Binary: Exports and imports chart settings to a binary file.
BinaryTemplate: Exports chart settings to a binary file with 'Template' pre-assigned, using the FileMask property.
XML: Exports chart settings to an XML file.
Text: Exports chart data to a Text File.
Bitmap: Exports the chart as a Windows Bitmap.
Metafile: Exports the chart as a Windows Metafile.
JPEG: Exports the charts as a JPEG image (only supported in web server versions).
PNG: Exports the chart as a PNG image (only supported on web server version).
External: Uses an external encoder to export the file (only supported on Web Forms version).
The Export Method
This method is used to export the chart data and/or set properties to the clipboard, file or stream in different formats.
The External File Format
The External file format is only supported by Chart FX Server based products and provides support for other formats, using external encoders. In order to use the External format, the chart's ImageTags property must be loaded with the format to be exported:
The FileContents Property
Whether you are saving chart files in Binary or XML format, you can control what is saved in the file by manipulating the FileContents property. The Binary format will save visual attributes and data; XML will save only visual attributes.
This property is particularly useful because it allows you to customize how chart files are saved. This way, you can build your own chart templates. By default, this property is set to save all visual attributes including the data.
However, if you want to save everything but the titles in the chart, this could be done by simply excluding the Titles using this mask property.
This property is a mask property, which means all settings represent a bit in the word that you need to turn on or off accordingly. For this purpose you'll use the bitwise operators (And, Or, Not, Xor) provided by your development tool. Because it is a mask property, you must make sure you use these operators to turn on/off bits and avoid losing previous settings to the property.
© Copyright 2000-2023 COGITO SOFTWARE CO.,LTD. All rights reserved