I believe I have located the issue. it appears to be due to the fact that a 'latest year' filter is applied as part of the default filters I applied when the page is loaded. When the year is selected from the list, the chart is changed to reflect this and so this appears to be working, but the category is removed for some reason. However, when I cleared the 'latest year' selection, the category selection stayed as it should. I also found that there was a synchronicity issue, which I had to use a deferred object to resolve. First of all I cleared the latest year selection, then when the deferred object had been resolved, I applied the selection of the year from the drop-down list. All appears to be working correctly now.
I'm still not sure exactly what caused the category selection to be removed, so if anyone has any ideas about this, I would be interested to hear.