Using the BarWithNegativeStack example chart throws a javascript exception on the tooltip formatter when moving the mouse over
a chart series, giving as error code "ReferenceError: Highcharts is not defined".
The chart code is copied straight from the repository here and added to a brand new, java only, jetty-based project from the Vaadin starter.
The tooltip itself looks as follows:
Tooltip tooltip = new Tooltip(); tooltip.setFormatter("function() {return '<b>'+ this.series.name +', age '+ this.point.category +'</b><br/>'+ 'Population: '+ Highcharts.numberFormat(Math.abs(this.point.y), 0)}"); conf.setTooltip(tooltip);
Description
Using the BarWithNegativeStack example chart throws a javascript exception on the tooltip formatter when moving the mouse over a chart series, giving as error code "ReferenceError: Highcharts is not defined". The chart code is copied straight from the repository here and added to a brand new, java only, jetty-based project from the Vaadin starter.
The tooltip itself looks as follows:
Tooltip tooltip = new Tooltip(); tooltip.setFormatter("function() {return '<b>'+ this.series.name +', age '+ this.point.category +'</b><br/>'+ 'Population: '+ Highcharts.numberFormat(Math.abs(this.point.y), 0)}"); conf.setTooltip(tooltip);
The strange thing is it seems to be working on the Vaadin charts demo here https://demo.vaadin.com/charts/BarWithNegativeStack which seems to use the exact same code.
Expected outcome
The tooltip to render without exceptions.
Actual outcome
Upon rendering the tooltip an exception is thrown when using Highchart methods in the formatter.
Live Demo (optional)
Minimal reproducible example
An example project can be found here: https://github.com/thomasdewaelheyns/vaadin14charterror This runs like a normal vaadin project (mvn -U clean jetty:run) and all example code is contained in MainView.java.
Or create the following chart and add it to a layout
Steps to reproduce
Environment
Browsers Affected