Charts are an important part of modern applications. The visualization of data has become a vital part, especially in the area of data science. Java as a technology allows to create charts. But its handling is tedious, that why toolkits like AWT, Swing, SWT or JavaFX have been developed to display graphical elements easily. Depending on the aforementioned technologies, specialized libraries to display graphs and time series have entered the scene. One of those is SWTChart [1], which has a well defined API and allows to create line, bar and scatter charts easily. The next enhancement of SWTChart is already developed under the hood of Eclipse as part of the Eclipse Advanced Visualization Project (EAVP) [2]. It allows to create customized charts, to define several axes and to offer several export options.
- Line Charts (time series, etc.)
- Bar Charts (histograms, etc.)
- Scatter Charts (value distributions, etc.)
Instead of having two repositories for SWTChart and its extensions, it would make sense to combine both into one repository. People would benefit from a consolidated development by making the use of both libraries even easier.
[1] http://www.swtchart.org
[2] https://github.com/eclipse/eavp/tree/chemclipse/org.eclipse.eavp.service.swtchart
Eclipse SWTChart provides the means to create rich, flexible and interactive data visualizations natively in SWT.
Eclipse SWTChart allows to create different types of charts. The API is well designed and allows to create Line, Bar and Scatter charts easily. Size, colors, axes, ranges and all aspects of the charts can be modified via code. So, it's easy to create customized charts. Moreover, the library already contains a data compression to show large data sets in a performant way. In addition to that, charts can be created even more easily with the SWTChart extensions. It uses the convention over configuration pattern and offers many additional improvements to scale axes of different type automatically or to select specific data ranges.
Figure 1 – SWTChart
Figure 2 – SWTChart Extensions
Figure 3 – SWTChart Extensions - Default Theme
Figure 4 – SWTChart Extensions - Dark Theme
There are no obvious legal issues with the code in the opinion of the author. The software has been designed and developed by the author(s). It contains no code licensed under the GPL, LGPL or AGPL.
The Eclipse Foundation is the right place to collaborate for SWTChart because of its many users, the vivid community and the Science Working Group. The Eclipse Foundation in general and the Science Working Group in particular offers great opportunities to collaborate with other projects and to find new ways for the data evaluation. The migration to the Eclipse Foundation will help SWTChart grow its open source community and makes its usage more secure due to the strong IP review process of the Eclipse Foundation. An integration into the Science Working Group helps also to adopt SWTChart more easily by its members and technologies. Why shouldn't SWTChart be merged into the existing Eclipse Advanced Visualization Project (EAVP)? SWTChart has a long history and is well known in the community. That's why the project identity should be preserved. Moreover, EAVP offers a high-level platform to offer services for various types of charts. SWTChart is a base library, which could be consumed by EAVP. A well defined separation of concerns is seen as highly beneficial in this case.
Implementation of:
- Additional export converters, e.g. SVG, PDF and EPS
- Improvements of the axis handling, e.g. a reversed axis scale
- Improvements of the performance by compression algorithms when handling huge data sets
- Fix SWTChart issues under Mac OS
The initial contribution will be made in quarter three of 2018 and the first release will happen by the end of quarter two of 2019.
Lablicate GmbH
Science Working Group Members
Yoshitaka has created the project SWTChart. He is the project owner.
Philip Wenig has created the SWTChart extensions, already managed by Eclipse via the Eclipse Advanced Visualization Project (EAVP).
- Log in to post comments
Should this simply be part of Nebula?
Submitted by Jonah Graham on Tue, 06/26/2018 - 03:50
The Nebula project contains many SWT controls already, has established release processes and with the recent example of the Opal widgets being added shows it is still growing. I would recommend this be added simply as another bundle in Nebula. The Nebula project also has it's own incubator for bundles that aren't fully read for release.
Also, why is this under Science and not Technology, it is of use to a much wider group than the Eclipse Science TLP project implies.
Re: Should this simply be part of Nebula?
Submitted by Philip Wenig on Tue, 06/26/2018 - 13:22
In reply to Should this simply be part of Nebula? by Jonah Graham
SWTChart is well known already and has a good reputation. That's why the name should be preserved as part of an own Eclipse project. Nebula plays an important and very well role in supplying widgets than can be used by the platform. But my fear is, that SWTChart becomes less important and would loose its attraction if it's just one of many parts of Nebula.
Science has been chosen as I'm familiar with it. But you're right, Technology also makes sense.
Re: Should this simply be part of Nebula?
Submitted by Wim Jongman on Wed, 07/04/2018 - 07:23
In reply to Re: Should this simply be part of Nebula? by Philip Wenig
The things you mention have to do with presentation. Giving SWTChart a special place in Nebula is perfectly possible. You can even open your own Nebula sub-project like NatTable did, but it did not take long for the original maintainers to jump ship and AFAIK it is now being maintained by one person. Kind of lonely if you ask me ;) Realisticly, SWTChart has not seen much action over the past years, therefore I foresee that this will also happen with SWTChart if you pull it to it's own little space.
I just wanted to chime in to say that you are welcome to join the Nebula project. We have committers that know how to polish a pixel. Don't expect them all to jump on SWTChart immediately but you may want to ponder this.
Cheers, Wim
Re: Re: Should this simply be part of Nebula?
Submitted by Philip Wenig on Fri, 07/06/2018 - 00:43
In reply to Re: Should this simply be part of Nebula? by Wim Jongman
Howdy Wim, a benefit of being part of Nebula like "NatTable" would be indeed, that several SWT developers lurk around in the project. We would like to use the Eclipse GitHub account as a place to host the source code. Would that also be possible with Nebula?
Let's chat the next days. I'll send you my mobile number via email. Will you attend the ECE2018?
Should be under Technology
Submitted by Andrey Loskutov on Wed, 06/27/2018 - 13:49
I also think this has wider audience, so Technology would fit better. Regarding Nebula: not sure. I have no idea how heavy weight a Nebule release process can be, I fear the burden of being a part of a much bigger project could hinder faster / simple releases. So probably I agree that a dedicated project would be a better choice.
Re: Should be under Technology
Submitted by Philip Wenig on Wed, 06/27/2018 - 14:48
In reply to Should be under Technology by Andrey Loskutov
Switching to Technology as the top-level project shouldn't be a problem. I've chosen Science, cause SWTChart is well suited to display scientific data. But you're right, it can be also used in other areas, e.g. to display the number of bugs or commits over time.
Let's wait a few days if more people vote for Technology or for Science.
Compare to BIRT
Submitted by Andrew Johnson on Fri, 07/13/2018 - 07:00
Eclipse Memory Analyzer uses BIRT for its charts which are generally just pie charts with a legend. The charts themselves are PNG as part of web pages. Occasionally they are interactive with a bit of JavaScript so that hovering over a segment gives its details. How is SWTChart different from BIRT? I don't think we would switch from BIRT unless BIRT stopped being supported and broke (as we don't have much time for non-essential changes). It is good to know there may be a choice in the future though.
Andrew Johnson
https://www.eclipse.org/mat/about/screenshots.php
http://help.eclipse.org/photon/topic/org.eclipse.mat.ui.help/tasks/runningleaksuspectreport.html
Re: Compare to BIRT
Submitted by Philip Wenig on Sun, 07/22/2018 - 09:07
In reply to Compare to BIRT by Andrew Johnson
Hi Andrew,
SWTChart renders the data live insteaf of using bitmaps. But it not offers pie charts at the moment. Supported chart types are:
The library is lightweight and offers an easy way to create a chart, e.g.:
private void createChart() throws Exception {
/*
* Create the Chart
*/
IChartSettings chartSettings = getChartSettings();
chartSettings.setCreateMenu(true);
/*
* Primary X-Axis
*/
IPrimaryAxisSettings primaryAxisSettingsX = chartSettings.getPrimaryAxisSettingsX();
primaryAxisSettingsX.setTitle("Scan");
primaryAxisSettingsX.setDecimalFormat(new DecimalFormat(("0.0##"), new DecimalFormatSymbols(Locale.ENGLISH)));
primaryAxisSettingsX.setColor(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
primaryAxisSettingsX.setPosition(Position.Primary);
primaryAxisSettingsX.setVisible(false);
/*
* Primary Y-Axis
*/
IPrimaryAxisSettings primaryAxisSettingsY = chartSettings.getPrimaryAxisSettingsY();
primaryAxisSettingsY.setTitle("Intensity");
primaryAxisSettingsY.setDecimalFormat(new DecimalFormat(("0.0#E0"), new DecimalFormatSymbols(Locale.ENGLISH)));
primaryAxisSettingsY.setColor(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
//
applySettings(chartSettings);
/*
* Create series.
*/
List<ILineSeriesData> lineSeriesDataList = new ArrayList<ILineSeriesData>();
ISeriesData seriesData = SeriesConverter.getSeriesXY(SeriesConverter.LINE_SERIES_2);
//
ILineSeriesData lineSeriesData = new LineSeriesData(seriesData);
ILineSeriesSettings lineSeriesSettings = lineSeriesData.getLineSeriesSettings();
lineSeriesSettings.setEnableArea(false);
lineSeriesDataList.add(lineSeriesData);
/*
* Set series.
*/
addSeriesData(lineSeriesDataList);
}