modified chart method, using line.js from g.raphael