Directory

SO Charts - Vaadin Add-on Directory

A wrapper around the "echarts" Javascript library for creating charts. SO Charts - Vaadin Add-on Directory
# SO Charts This add-on is a wrapper around the [echarts](https://echarts.apache.org) Javascript library for using it with [Vaadin Flow](https://vaadin.com). The charts can be used just like any other Vaadin component. "echarts" is quite a rich library and bringing all the available functionalities into this add-on will require quite some effort. However, my plan is to keep integrating more and more features into this add-on as and when I have some free time. ## Architecture of the Add-on The client-side part of the add-on is a very thin LitElement wrapper around the "echarts" library. The SOChart class is the one that wraps that into the Java class to make it appear as a Vaadin Flow Component. Communication between them are through a couple of property change messages and a monolithic update call that carries all the chart data (including the configuration information) as a string parameter that can be JSONified. At the client-side, the string parameter received is used to create the structure for setting the options of the chart. Just before sending the string containing the chart data and the configuration to the client-side, it is passed through a method - `customizeJSON(String)` - so that if someone wants to debug or customize it, it is very well possible. (Starting from 2.2.0, data can be transmitted separately and that can be intercepted via a new method - `customizeDataJSON(String)`). Most classes in this add-on are either "chart components" or "chart component parts". All "chart components" can be added to the SOChart instance (the only Vaadin Flow Component). So, one instance of SOChart class (represents a "chart display") can be used for displaying any number of Charts (instances of Chart class - it is also a "chart component") and other "chart components". Starting from version 2.1.0, various shapes, including texts and images, can be defined and added to the chart display. Starting from version 2.2.0, a new method is added to transmit data separately whenever required. Starting from version 2.3.0, a new method is added to transmit data separately for a specific chart whenever required. Starting from version 3.2.5, a couple of new methods are added to append custom JSON code to the chart. This way, one can add echarts features that are not currently supported via the APIs of this component. Note: The [online demo](https://storedobject.com/examples/?login=AUTO) contains chart examples and other proprietary examples. You may use the keyword "chart" to filter out chart examples. Notes to those who use Vaadin Spring Configuration: Please make sure that you update your `application.properties` if needed. It has been reported that this add-on may not work if the add-on package is not white-listed there. (Thanks to Marcus Merten for pointing this out). See [here](https://vaadin.com/docs/latest/flow/integrations/spring/configuration) Configuration example of application.properties (Thanks to Ryan Neuharth): ``` vaadin.whitelisted-packages = com.vaadin,org.vaadin,com.storedobject ``` Credits to other contributors: (1) [Christian Asnel Ngoulla Sob](https://github.com/AsnelChristian) (2) [Stefano Bossi](https://github.com/foxpluto) (3) [Lazy Math Student](https://github.com/lazymathstudent)
API
Online Demo
View on GitHub

SO Charts version 0.0.3
Vaadin 16.0.0.rc1+ Requires Java 11 Initial versions. API changes expected.

SO Charts version 0.0.4
Vaadin 16.0.0+ Requires Java 11+ Initial versions. API changes expected.

SO Charts version 0.0.5
Vaadin 16.0.0+ Requires Java 11+ Initial versions. API changes expected. Breaking change: Axis classes are no more typed. Instead, now it has DataType as the parameter.

SO Charts version 0.0.6
Vaadin 17.0.3+ Requires Java 11+ Initial versions. Minor API changes expected.

SO Charts version 0.0.7
Compiled with Vaadin 17.0.6 and Java 11 LitComponent now extends Vaadin's LitTemplate Initial versions. Minor API changes expected.

SO Charts version 0.0.8
Compiled with Vaadin 17.0.8 and Java 11 Initial versions. Minor API changes expected. Fixed an issue in Axis class that was not rendering some features.

SO Charts version 0.0.9
Compiled with Vaadin 17.0.8 and Java 11 Initial versions. Minor API changes expected. Added new methods in Chart and LineChart.

SO Charts version 0.1.0
Compiled with Vaadin 17.0.8 and Java 11 Initial versions. Minor API changes expected. Fixed bug in DataZoom. Added new methods in LineChart. Class PointSymbol renamed to PointSymbolType. New class PointSymbol.

SO Charts version 0.1.1
Compiled with Vaadin 17.0.8 and Java 11 Initial versions. Minor API changes expected. Fixed bug in DataZoom's base class.

SO Charts version 0.2.0
Compiled with Vaadin 18.0.2 and Java 11 Initial versions. Minor API changes expected.

SO Charts version 0.2.1
Complied with Vaadin version 18.0.3 and Java 11 Minor API changes expected. Removed unwanted files from the jar.

SO Charts version 1.0.0
Complied with Vaadin version 14.4.6 and Java 11. Minor API changes expected. Removed dependency on LitTemplate and hence this should now work with Vaadin 14.x.

SO Charts version 1.1.0
Compiled with Vaadin 14.5.1 and Java 11. Compatible with Vaadin 14.5.x and 18.x upwards. echarts updated to 5.0.2

SO Charts version 1.1.1
Compiled with Java version 11+ and Vaadin 14.5.2+. Compatible with Vaadin 14.5.x and 18.x upwards. Additional constructors in Axis and more relaxed constructors/methods in BarChart.

SO Charts version 1.1.2
Compiled with Java version 11+ and Vaadin 14.5.2+. Compatible with Vaadin 14.5.x and 18.x upwards. Added formatting capabilities for axis labels.

SO Charts version 2.0.0
Compiled with Java version 11+ and Vaadin 14.5.2+. Compatible with Vaadin 14.5.x and 18.x upwards. API additions and additional classes for new features. Some of the existing code require recompilation.

SO Charts version 2.0.1
Compiled with Java version 11+ and Vaadin 14.5.3+. Compatible with Vaadin 14.5.x and 18.x upwards. Methods to get default Tooltip and Legend from the chart display. Methods in Legend to hide/show selected chart.

SO Charts version 2.0.2
Compiled with Java version 11 and Vaadin 14.5.3. Compatible with Vaadin 14.5.x and 19.x upwards. New DataChannel class to dynamically push data to the front-end.

SO Charts version 2.0.3
Compiled with Java version 11 and Vaadin 14.5.3. Compatible with Vaadin 14.5.x and 19.x upwards. Added reset() method to DataChannel class.

SO Charts version 2.1.0
Compiled with Java version 11 and Vaadin 14.5.3. Compatible with Vaadin 14.5.x and 19.x upwards. New: Shape classes. Shape instances can be added to SOChart.

SO Charts version 2.1.1
Compiled with Java version 11 and Vaadin 14.6.0. Compatible with Vaadin 14.5.x and 19.x upwards. A runtime exception is raised if any chart exception occurs while attaching the chart to the front-end.

SO Charts version 2.1.2
Compiled with Java version 11 and Vaadin 14.6.7. Compatible with Vaadin 14.5.x upwards and 19.x upwards. Rich text styles added to axis labels and chart labels.

SO Charts version 2.2.0
Compiled with Java version 11 and Vaadin 14.6.7. Compatible with Vaadin 14.5.x upwards and 19.x upwards. There are some changes in the API and architecture. So, a re-compilation of your existing code is recommended. New chart added: HeatmapChart.

SO Charts version 2.3.0
Compiled with Java version 11 and Vaadin 14.6.8. Compatible with Vaadin 14.5.x upwards and 19.x upwards. There are some additions to the API and refactoring of the code. So, a re-compilation of your existing code is recommended. New chart type: BubbleChart. Initial support for "mark areas" in charts.

SO Charts version 2.3.3
Compiled with Java version 17 and Vaadin 14.8.1 Compatible with Vaadin 14.5.x upwards and 19.x upwards. echarts updated to version 5.2.2 New chart: GraphChart (Thanks to Christian Asnel Ngoulla Sob).

SO Charts version 2.3.4
Compiled with Java version 17 and Vaadin 14.8.3 Compatible with Vaadin 14.5.x upwards and 19.x upwards. echarts updated to version 5.3.0

SO Charts version 2.3.5
Compiled with Java version 17 and Vaadin 14.8.4 Compatible with Vaadin 14.5.x upwards and 19.x upwards. Added a new method in Axis.Label to set a Javascript Function as the label formatter.

SO Charts version 2.3.7
Compiled with Java version 17 and Vaadin 14.8.4 Compatible with Vaadin 14.5.x upwards and 19.x upwards. New class: FunctionData to generate data via maths functions. Added methods for disabling emphasis and animation effects on the chart elements. Bug fixes.

SO Charts version 2.4.1
Compiled with Java version 17 and Vaadin 14.8.6 Compatible with Vaadin 14.5.x upwards and 19.x upwards. Caution: Code restructured with minor API changes. New charts: GanttChart, ActivityChart, XRangeChart. New classes: ComponentGroup, AbstractProject, Project, ActivityList, AbstractTask.

SO Charts version 3.0.0
Compiled with Java version 17 and Vaadin 23.0.9 Compatible with Vaadin 23.0.9 upwards Dependency update (Lit & echarts upgraded) Bug fixed in axis rendering (Implementation of offset and opposite were buggy)

SO Charts version 3.1.0
Compiled with Java version 17 and Vaadin 23.3.1 Compatible with Vaadin 23.1.2 upwards. New chart: CandlestickChart. Chart is now responsive to browser window size changes (Thanks to [this fellow](https://github.com/lazymathstudent)). Certain methods were made public to create charts that are not yet available in this add-on. Dependency update (echarts upgraded to 5.4.1).

SO Charts version 3.1.1
Compiled with Java version 17 and Vaadin 23.2.15 Compatible with Vaadin 23.1.2 upwards. However, there are issues with Vaadin 23.3.x versions. Bug fixed in GanttChart and ActivityChart.

SO Charts version 3.1.2
Compiled with Java version 17 and Vaadin 23.2.15 Compatible with Vaadin 23.1.2 upwards. Javascript error fixed (Semicolon missing in import statements).

SO Charts version 3.1.3
Compiled with Java version 17 and Vaadin 23.2.15 Added new methods in Toolbox.Zoom class to set applicable X/Y axes.

SO Charts version 3.2.1
Compiled with Java version 17 and Vaadin 23.2.15 Added new methods in Toolbox.Zoom class to set applicable X/Y axes. New chart: SankeyChart Code refactoring. Note: A recompilation of the existing code may be required.

SO Charts version 3.2.2
Compiled with Java version 17 and Vaadin 23.2.15 New class: Language New Method: SOChart.setLanguage

SO Charts version 3.2.3
Compiled with Java version 17 and Vaadin 23.2.15 Bug fixes: Rendering of default fonts, colors, and grid-lines.

SO Charts version 3.2.4
Compiled with Java version 17 and Vaadin 23.2.15 Added methods to set font-sizes in AbstractProject and AbstractTask classes.

SO Charts version 3.2.5
Compiled with Java version 17 and Vaadin 23.2.16 Added new methods Data, DataMatrix. GaugeChart, NightingaleRoseChart. New methods in SOChart to add custom code to component parts or at root-level. Bug fixed in Tooltip. It was not working when data provider was used in Tooltip and the data was not explicitly added to the SOChart. SVG rendering support added. echarts version updated to 5.5.0

SO Charts version 3.2.6
Adjusted the Data and DataMatrix methods to accept double arrays as parameters instead of variable arguments. This enhancement simplifies the calls to these methods by ensuring the data passed aligns with the data structure. Also incremented the version to 3.2.6.