This proposal has been approved and the Eclipse SWTChart project has been created.
Visit the project page for the latest information and development.

Eclipse SWTChart

Tuesday, June 26, 2018 - 02:01 by Philip Wenig
This proposal is in the Project Proposal Phase (as defined in the Eclipse Development Process) and is written to declare its intent and scope. We solicit additional participation and input from the community. Please login and add your feedback in the comments section.
Parent Project
Proposal State
Created
Background

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

Scope

Eclipse SWTChart provides the means to create rich, flexible and interactive data visualizations natively in SWT.

Description

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

Why Here?

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.

Future Work

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
Project Scheduling

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.

Interested Parties

Lablicate GmbH

Science Working Group Members

Initial Contribution

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).

Source Repository Type

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.

In reply to 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.

In reply to 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

In reply to 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?

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.

In reply to 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.

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

In reply to 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:

  • Line Charts
  • Bar Charts
  • Scatter Plots

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);

    }