Added chart image dimensions as parameters. Computed chart image
dimensions on the fly.