Using chart factory as spring bean.