Closed lcuone closed 3 months ago
Technically, you need to set nonce
as a property of Root
:
let root = am5.Root.new("some-id");
root.nonce = "some-nonce";
That being said, not all stylesheets were being populated with this nonce, including Modal's.
We'll fix it in the next version. Will ping you here when it's out.
Thanks!
Fixed in 5.10.1.
fillGradient
setting added to Label
.LineSeries
fixed.PieSeries
tick was not visible if pie had two equal slices.root.nonce
was not being added to all dynamically-loaded stylesheets.ValueAxis
in some very rare cases.Make sure you clear your browser cache after upgrading. And feel free to contact us again if you are still experiencing this issue.
Setting the nonce does not work with StockChart and produces an error when working without "unsafe-inline" in CSP rules.
let root = am5.Root.new("some-id", {"nonce": "some-nonce"});
Further details should not be necessary since it's obvious that the nonce is not passed as 4th parameter here:
https://github.com/amcharts/amcharts5/blob/2899773c08838de20090dbab4ba9cb441f1cf4ab/src/.internal/core/util/Modal.ts#L28
While StyleRule itself has the parameter implemented:
https://github.com/amcharts/amcharts5/blob/2899773c08838de20090dbab4ba9cb441f1cf4ab/src/.internal/core/util/Utils.ts#L462C14-L462C114