Vaadin Charts addon

Current implementation of Vaadin Charts addon doesn’t have some native chart support listed at Does Vaadin have a plan to support all native charts or give us some examples or tutorial how to extend Vaadin current implementation to support all native charts?



Do you have plan to support Highcharts 6? I need some charts such as Sankey. If you don’t support them, can you give us some examples or tutorials so we can extend current implementation and add more charts?



The current Vaadin Charts for Vaadin Framework 8 uses Highcharts 4.2.6 and should have all the feature set between the two should be on par. Is there some certain chart type that you are looking for?

Highcharts 6 was recently released and that one brings some new chart types with it, which are not today available in Vaadin Charts for Framework 8


We do not have a plan to add them yet. It might come but I can’t say for how certain, or when.

Changing the Highcharts version yourself on a released Charts version might be possible but it has not been tested so I can’t guarantee that it works. I can however point out how I think it should work.

  1. You have to replace the Hichcharts files found in the project. This is the place that they are in in current Charts:
    . You can probably overshadow these files by making a package with the same path (src/main/resources/com/vaadin/addon/charts/client) in your project and putting new versions of the needed
    Highcharts files
    there. Not that HC6 might have added some new files as well that you need to be able to use the new charts, but I didn’t see one specifically for Sankey in the
    file list

  2. You need new API to be able to use the new options. For example
    does not have an option for Sankey as it is, and won’t have just by updating the JS files. Updating the Java files is possible to do due to all the model Java classes are used to build a json tree that is given to HighCharts. So you can extend the basic Vaadin Charts classes, add the missing options there, and use your extension instead of the main class. For ChartType it would look something like this: (pseudocode written directly in forum)

public class HC6ChartType extends ChartType { public static final ChartType SANKEY = new ChartType("sankey"); } Then you should be able to use it like this:

Chart chart = new Chart(HC6ChartType.SANKEY); I hope this gets you to the correct direction.

Do you have plan to support Highcharts 7 in the near future?