Chart with variable canvas height

The complete code of the above sample of Sales Performance is given below: