Wigan were able to come out on top in a thriller at the DW Stadium, beating Bolton 3-2 to arrest their losing run.