Move chart rendering into subfunction for chart type, support burnDown