Change demo script to generate different format for D3