Updating write data function to a single ajax call. Performance improvements for PIM scatterplot.