yFiles Export Capabilities

Tips & Tricks

Summary

This article describes the export capabilities of yFiles and its extension packages. It presents various file formats that are supported as graph exchange, respectively, graph export formats with yFiles.

This article was written for an older version. It is only online as a reference for customers using this old version. The information it contains is probably out of date.

The latest information can be found in the yFiles documentation

Description

Graph Exchange and Graph Export Formats

Package y.io provides the necessary functionality for both reading and writing graph structure data from and to a file, respectively. Thus said the following descriptions apply to all yFiles for Java distributions containing the Viewer part (yFiles for Java Complete and yFiles for Java Viewer)

Directly supported file formats are GML, XGML, TGF, and YGF for graph exchange, and GIF and JPG for graph export (image export). Extension packages provide further file formats like GraphML for graph exchange, and SVG, PDF, EMF, SWF, and EPS for graph export (vector graphics export). Via the Java Image I/O API (package javax.imageio, available with Java 2 Standard Edition version 1.4 and higher) additional file formats for graph export, for example PNG, are also accessible. Graph exchange and export file formats lists the features of all yFiles graph exchange and export file formats.

Table: Graph exchange and export file formats

Format Name Type Extension Package Note
GML Exchange No
XGML Exchange No XML-ish variant of GML.
TGF Exchange No
YGF Exchange No Proprietary; non-standard; binary.
GIF Export (Bitmap) No
JPG Export (Bitmap) No
GraphML Exchange GraphML Extension package XML-based; extension package is free of charge.; contained in the yFiles for Java package since version 2.7 (no extension package required for these versions)
SVG Export (Vector Graphics) ySVG Extension package XML-based; extension package is free of charge.
PDF Export (Vector Graphics) yExport Extension package
SWF Export (Vector Graphics) yExport Extension package
EMF Export (Vector Graphics) yExport Extension package
EPS Export (Vector Graphics) yExport Extension package
PNG Export (Bitmap) No Accessible via the Java Image I/O API available with J2SE 1.4 and higher.

The graph exchange formats mainly concentrate on the graph structure, which also includes nested graph structure. They do not support visual aspects that are not associated with the graph, like, e.g., zoom level, selection state, or a background image. In contrast, the graph export formats fully support these visual aspects.

Reading and writing graph structures from/to file is decribed in Reading and Writing Graph Structure Data, the section Exporting a Graph's Visual Representation explains image export of a graph's visual representation.

Categories this article belongs to:
yFiles for Java > yFiles Viewer > Input and Output > Graph Exchange and Graph Export Formats
yFiles for Java > yFiles Viewer > Input and Output > yFiles Extension Packages
Applies to:
yFiles for Java 2: 2.5, 2.6, 2.7, 2.8, 2.9, 2.10, 2.11, 2.12, 2.13
Keywords:
Graph - Exchange - Export - Format - GML - XGML - TGF - YGF - GIF - JPG - SVG - PDF - EMF - SWF - EPS - PNG