Samyukta,
The issue seems to be with the approach of looping through ‘Values’ object. Please take a look at this stackoverflow thread for more information on looping through the properties of a JavaScript object.
If this doesn’t help you fulfill your requirements, kindly brief us more about your requirements so that we can understand it better and help you achieve the same.
—
Vishwas R
Team CanvasJS