Samyukta,
Categorising dataseries based on the legendText (Short/Answer column in database) instead of doing it based on month number should work fine in this case. Please take a look at this JSFiddle which shows categorizing dataseries based on label from JSON.
—
Manoj Mohan
Team CanvasJS