refactor: abstract into render_area_chart function