What's new

[DEV] Chart.js v3.9.1 or v2.9.4

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

dave14305

Part of the Furniture
With the upcoming breaking changes for addons with Web UI pages using Chart.js, some choices need to be made.

I've opted for an "almost-do-nothing" approach. For FlexQoS, I will no longer rely on the chart.min.js provided by the firmware, but will instead load chart.min.js from one of the CDNs (e.g. jsDelivr).

Git:
-<script type="text/javascript" src="/js/chart.min.js"></script>
+<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js" integrity="sha256-t9UJPrESBeG2ojKTIcFLPGF7nHi2vEc7f5A2KpH/UBU=" crossorigin="anonymous"></script>

This will let me keep supporting the same addon code across 3 different firmware branches (386, 388, 102). And since FlexQoS works the best on 386, so-so on 388, and not at all on 102 (A.QoS currently broken), I'm not in a rush to abandon the users on older models.

Jack Yaz was smart and bundled his own chart.js into his addons from the start. And did the same for Adam’s Skynet GUI.

Thoughts, comments, advice welcome.
 
Last edited:
I’ll pipe in when I get that not sponsored by ASUS Router I just ordered.
 
Using a CDN copy is probably a valid option to ensure a specific version is always used, however I would consider eventually migrating to a newer version, both for security and for future browser compatibility reasons. It only took me a few hours to migrate the Sysinfo page (QoS took longer because that code wasn't as recent to my memory).


Biggest changes that I recall were axies defitions, and tooltip/legend-related definitions are moved to a plugin section.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top