changed chart.data to chart.config