Hello.
I've implemented functions to have an adaptative size to my labels in my treemaps.
That works as expected on a webpage.
However, when I want to generate my treemap as a static image with a CLI, I don't manage to call my custom function to format the points' datalabel.
I'm running a php script that retrieve the chart's options from a .json file, then get the data, and inject it in the JSON.
The JSON is then stringified, written into a file, and used for the `-infile` parameter of the CLI.
This part works as expected.
My problem is when I try to set my custom function to the series.datalabels.formatter option.
As a JSON can't have function for value, I first `json_encode` my chart options, and then set my function with a `str_replace`.
When performing the CLI, I get an error :
"Chart input data error
ReferenceError: Can't find variable: textWithAdaptiveSize"
I guess that my custom functions are not injected correctly in my environnement.
The functions I need are defined in a .js file.
I specify `--allowCodeExecution 1` and `--callback /path/to/my/functions.js` in my CLI, but it might be where my error and missunderstanding is.
Thanks for your help.