0👍
I found what the problem was. When loading the ‘bar_chart.html’ with hx-get I didn’t define the ‘backgroundcolor’ variable. This missing variable blocked the execution of the script.
I will also look further how I can use the suggestion made by ‘mariodev’.
Thanks for the suggestion.
Source:stackexchange.com