Upgrading highcharts in vaadin charts


We use flow 14.4.5 / vaadin-charts-19.0.3
This last version of vaadin-charts brings highcharts-8.1.2
I would like to try highcharts 8.2.2, (to fix that : https://github.com/highcharts/highcharts/issues/13710)

What is the correct flow way to upgrade the NPM import ?


Well, it was simple

@NpmPackage(value="highcharts", version = "8.2.2")
public class CustomChart extends Chart  {

But vaadin-charts doesn’t compile with this version.
I have to find a way to patch the 8.0.2.


It doesn’t look so simple to patch a transitive NPM dependency.
Some solutions I imagine :

  • Install a local NPM repository with the patched version… pfff
  • Use something like https://www.npmjs.com/package/patch-package, but at the first sight, it doesn’t look trivial to use it with the Maven plugin (We’ve wrapped the maven plugin in a custom gradle plugin)

What would you do if you’re facing the same kind of problem ? (I’m not experienced with node, as you can see)

Hi, can you try adding this to your package.json file, under the dependencies entry?

"dependencies": {
  "highcharts": "^8.2.2"