adding data model for charts
save function changes and data model work for charts