Included logic for chart.