moved dot function to datasource for line graphs