SWT XYGraph Overview

SWT XYGraph is an xy graph component based on SWT and Draw2D, which could be used not only in any SWT applications, but also has the ability to be integrated in any GEF based applications.

SWT XYGraph has most of the functionalities for an xy graph, plot or chart in the field of science and engineering:

  • line chart, scatter chart, bar chart, step chart, area chart...
  • Abundant interactive operations: Five Zoom Types, Panning, Auto Scale, Add/Remove Annotations, Undo/Redo, Take snapshot.
  • Configure properties during running, such as trace color, line width and axis color etc,.
  • multiple axes
  • log scale, date time format
  • group legends by axes
  • annotations could be free or snapped to a trace
  • The possiblity to implements your own data provider based on a simple interface.
  • ...

Toolbar Armed XYGraph

Based on SWT/Draw2D

SWT XYGraph is based on SWT and Draw2D, if you implement Eclipse plug-ins, SWT-based stand alone applications or GEF based projects, SWT XYGraph would be the best candidate for your plot or chart functionality requirements.

Comprehensive functions and Easy to use

The APIs of adding/setting a trace or axis are quite straightforwardly. Each part of the XYGraph(Trace, Axis, Grid, Annotation...) is a draw2d figure. You can easily hook listeners to any part or the whole XYGraph. Besides, you can easily zoom, panning, take snapshot, add/remove annotation, configure all the graph components settings from the toolbar. Finally, all the operations are undo/redoable.

Light Weight and High Performance

Even with powerful functionality, the source code of SWT XYGraph is no more than 300KB. It doesn't have any dependencies other than SWT and Draw2D. For Eclipse user, the only additional required plug-in is Draw2D, which can be easily downloaded from Eclispe official website. There are also several design and algorithm optimization inside the code, which bring us the high performance when drawing large amount of data.