We are utilising display of a chart onto a Portal but need to change the x-axis label to something more meaningful to our portal users.
We have found out how to update the x-axis label via javascript but I am looking for how to make sure the script doesn't execute until the charts finish loading on the page.
Currently i am using setTimeOut function on our sandbox but not ideal - any suggestions for something better would be much appreciated!
Other methods tried so far:
- We tried updating the chart xml, but this only displays in CRM. The portal still shows the original label for the x-axis.
- $(document).ready(function () is too early (the DOM is ready before the charts load, and so the scripts execute before the label is present to be updated).
- Doing a custom chart per this article seems overkill when the only issue is the x-axis label, although maybe I am missing a shortcut:
https://colinvermander.com/2017/04/24/dynamics-365-portals-use-aggregate-fetchxml-queries-and-chart-js/
#CustomerEngagement #PowerApps
------------------------------
Robert Ward
Chubb Australia
------------------------------