AAChartCore-Kotlin icon indicating copy to clipboard operation
AAChartCore-Kotlin copied to clipboard

Highcharts version update

Open PieterWvdV opened this issue 6 months ago β€’ 2 comments

Hi

Loving the library! Works great when working back from a web preview JS. Would just like to ask if it would be possible to update the version of highcharts embedded in the SDK? I see you have v10.0.0 but some of the newer features added to v12.2.0 are things I need. EG: Full support for inline styling when using formatter and useHTML in the tooltips.

Thanks

PieterWvdV avatar Jun 12 '25 16:06 PieterWvdV

Just want to add.

I have tried to take the v12 js and put it into my app's main/assets with the same name as this library uses. My app then uses the new version of the js, however the graphs do some crazy things. I was hoping this would be a simple update but clearly will be a bigger project to complete the upgrade.

PieterWvdV avatar Jun 13 '25 10:06 PieterWvdV

This enhancement does not need to be rushed as I have managed to get the formatting to work.

By putting a copy of the library AAChartView.js and AAChartView.html in my main assets folder android saves them to the built files. This allows me to change the code in the html to include custom JS and CSS. When needing a formatter I can simply pass my custom JS function name through the library like this: .formatter("function() { return tooltipView(this); }") This allows me to write real JS functions and not have to try escape a stringified function. Also when defining html to be used from the JS function, css classes can be added to tags and then used in the webview when it draws. To use custom css though, I had to add Highcharts.AST.bypassHTMLFiltering = true; into the AAChartView.js loadTheHighChartView function.

PieterWvdV avatar Jun 13 '25 13:06 PieterWvdV