I wrote the following code, but I don't know how to highlight the moving bar.
bsort[list_] :=
Module[{A = list, tmp},
tmp = Reap[
Do[If[A[[j]] > A[[j + 1]],
Sow[A]; {A[[j + 1]], A[[j]]} = {A[[j]], A[[j + 1]]}], {i,
Length@A}, {j, Length@A - i}]][[2, 1]];
Append[tmp, A]]
d = bsort@RandomSample@Range@10;
ListAnimate[
BarChart[#, ChartLabels -> Placed[Style[#, 15] & /@ #, Above]] & /@ d]
I want it to look like this:





