Dynamic report chart, legend not hiding unused pens

Take a look at this other post of mine about changing the legend:

The trick is to implement a 'custom' XYItemRenderer class that allows you to provide your own arbitrary set of legend items to display.