fix inventory totals chart loop