changed javascript create graph string formatting to use .format