updated write_data to write historical data
updated write_data to write historical data

stelb/graphite-setup,gengmao/graphite-setup,Banno/graphite-setup,gengmao/graphite-setup,Banno/graphite-setup,stelb/graphite-setup,Banno/graphite-setup,stelb/graphite-setup,stelb/graphite-setup,gengmao/graphite-setup