https://discord.umbraco.com logo
Umbraco charts
# package-development
p
Does anyone know if Umbraco has any charts/graph library in the core package? Was thinking off adding some charts, but wasn't sure about which library to use for it
j
We do not have any charts in the core, except for a custom donut chart web component (used in the Log Viewer). If you want to stay within the theme of Umbraco products, Umbraco Commerce uses Chart.js (canvas driven) and Umbraco Cloud uses ApexCharts (SVG driven)
p
Ah, good to know. Thank you Jacob!
j
We considered adding charts to the Umbraco UI library at one point, but honestly would be a lot of wiring up properties from one component to the other without gaining much. The libraries are already so good, so why wrap them in an additional layer of web components if you need to customise them anyway.
p
Yeah. Better to choose one and go with that instead of trying to make it generic
Would be nice if Umbraco did choose a library just to ensure the bundle size doesn't increase that much if every package developer chooses their own chart library
j
Yes, but then we need to maintain and update it, and we don't have a use for charts in the core
Better that someone made a package that exports a charts library through the importmap that everyone could then decide to use
If a package chooses to make libraries available through the importmap, they will only be loaded if a plugin actually calls on it
p
Hmm, that does make sense
I do remember the angular backoffice having one included, but I don't remember where the charts were actually used
j
Yes, the library was called angular-chart.js and its sole purpose was to render the donut chart in the Log Viewer 😊
so essentially an AngularJS wrapper around Chart.js
17 Views