Skip to content

Chart.swt is a small wrapper library for using Chart.js in SWT applications

License

Notifications You must be signed in to change notification settings

msrocka/Chart.swt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chart.swt

Chart.swt is a small wrapper library for using Chart.js in SWT applications (e.g. Eclipse RCP applications). It uses the SWT Browser widget to display a generated HTML file which contains the chart. Therefore, a temporary HTML file is created containing the chart data which is deleted when the browser widget is disposed. (Also the Chart.js library is stored locally so that no internet connection is required.)

Nearly the same configuration options as in Chart.js can be used when creating the chart via the Java API and also the data model is very similar. Using the chart component looks like this:

Browser browser = new Browser(shell, SWT.NONE);
BarConfig config = new BarConfig();
config.width = 525;
config.height = 400;
new Chart(browser).bar(createData(), config);

See also the examples for the different chart types:

Line chart example

Installation with Maven

git clone https://github.com/GreenDelta/Chart.swt.git
cd Chart.swt
mvn install
# test an example
mvn exec:java -Dexec.mainClass=chart.LineChartExample -Dexec.classpathScope=test

About

Chart.swt is a small wrapper library for using Chart.js in SWT applications

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published