Finally I resolved the above query by using the following link
We need to make changes in the script according to our requirement such as type of the chart, name of the series and the scale. The link shows example of scale from 0 to 100. I want to use it for negative values i.e. Max=0 and Min=-100. So I made the changes in the global variable to support it for negative values.