This commit is contained in:
Starbeamrainbowlabs 2022-05-19 22:01:00 +01:00
parent 6b2aab3391
commit 31695e534d
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -2,6 +2,7 @@
import { SVG } from 'svg.js'; import { SVG } from 'svg.js';
// TODO: Try https://plotly.com/javascript/bar-charts/ ?
class ChartStackedBar { class ChartStackedBar {
get weight_total() { get weight_total() {
return this.categories.reduce((cat, acc) => cat.weight + acc, 0); return this.categories.reduce((cat, acc) => cat.weight + acc, 0);