Contrastive Learning for Time Series on Dynamic Graphs